Problem/Motivation
I noticed some odd formatting. Using a separate issue so other issues are less noisy.
Proposed resolution
- Improve formatting
- Add text that didn't convert. That was 2 headings that have special characters.
- Fix links, using existing headings
- Rename several .md files
Note that the real documentaion site is https://project.pages.drupalcode.org/coding_standards/ which gets re-built when a maintainer runs a pipeline in this issue.
The temporary issue-fork documentation site is https://coding-standards-3527545-5994d4.pages.drupalcode.org/ which gets re-built when anyone who is a non-maintainer runs a pipeline in this MR
Follow up in infrastructure for redirects, #3530663: Redirects for Coding standard pages to GitLab pages
Follow up #3530664: Updates for using GitLab pages to update this projects main page and adjust the Coding Standards update process.
Remaining tasks
Check Data types section
User interface changes
Issue fork coding_standards-3527545
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- main
compare
- 3527545-formatting
changes, plain diff MR !5
- 3527545-fix-missing-file
changes, plain diff MR !6
Comments
Comment #2
quietone commentedComment #3
quietone commentedAre there any other formatting changes to make here? Anything for consistency across the sections?
Comment #4
jonathan1055 commentedWould you like this branch to temporarily build the actual documentation site, then we could check the built pages. I can add that here if it would be helpful.
Comment #6
quietone commentedYes, it would be helpful. And I copied your work from the other issue and the pages are deployed for testing.
Comment #7
quietone commentedComment #8
quietone commentedI went a bit all out on renaming files for simplicity and consistency.
Comment #9
jonathan1055 commentedThere could be a few conflicts here, so I suggest we get MR2 and MR4 merged first, then see where we are.
Comment #10
jonathan1055 commentedI have aligned the pipeline changes with 'main' so we now run cspell and do not allow it to fail.
Comment #11
jonathan1055 commentedThe pipeline failed but it seems that some of the spelling errors are in files that have been renamed. I updated the issue fork (using the gitlab UI when browing the repository) but that has not solved it. It is only two words (mymodule and docblock) and we can use the comparison in the MR to undo those particular line changes, and even make code suggestions that can be applied within the MR.
Comment #12
quietone commented@jonathan1055, apologies for the poor rebase I did. And thanks for the fixes.
Comment #13
jonathan1055 commentedNo problem. I used the MR suggestions, to make it easier to see what was original and which new changes needed to be reverted.
Point 1 in PHP -> Quotes does not seem to be rendered properly. I have not done an exhaustive review of all the pages, but just mentioning things as I spot them. But it may be good to get these renames committed soon(ish) so that we don't get rebase errors again if new issue branches are opened.
Comment #14
quietone commentedThis Data types section it not in sync with the d.o pages. This is one where I reverted the changed due to feedback in Slack and I didn't get back to properly review the situation. The discuss tab for that page has more details. I'll make an effort to look into that today.
Comment #15
quietone commentedThe compared the text on d.o with the issue #3468236: Adopt phpstan phpdoc types as canonical reference of allowed types and it is mostly correct text. There is one sentence still there that should not be. I have made that change on d.o and to the MR.
Comment #16
jonathan1055 commentedI have added links to the documentation sites, as it can be confusing having two outputs here. This is only due to the temporary override in the .gitlab-ci.yml.
I'm going to see if we can find a better way to do this in Gitlab Templates generally, so that there is only one temporary documentation site, and the "live" site would only get updated on merging into the main repo.
Comment #17
quietone commentedFinally back here to finish this. There were eslint errors on the mkdocs.yml file, which don't make sense as that file is formatted correctly. And since there are no .js files here I have changed this to not run eslint.
If there are no objections then the only thing to do is to remove the temporary code in .gitlab-ci.yml and commit this.
Comment #18
jonathan1055 commentedI think the mkdocs file was clean before, but the new links had the wrong indentation. That can be fixed easily, then we can run the eslint job. I can do that here if you like, and also remove the temporary code.
Comment #19
jonathan1055 commentedAlso the phpcs job (that currently runs) can be ignored, because Gitlab Templates has been corrected to better determine if php files can be checked. On the next release of the templates this job will not run.
All jobs are green, including eslint.
Comment #20
quietone commentedHowever, the changes to mkdocs.yml actually violate the current standard for YAML, which uses 2 spaces for indentation not four. So, those should be reverted.
Comment #21
quietone commentedYes, that page was written about config files but 2 spaces seems to be the norm in core.
Comment #22
quietone commentedI removed php/automated-tests.md based on #3131946: [policy] Remove PHPUnit assertion messages when possible, and standardize remaining messages .
This is the list of remaining items from the original 'convert' issue.
Comment #23
jonathan1055 commentedYes you are right that the yml standard for indentation is 2, and this is also enforced in the core .eslintrc.jon setting. For simple yml structures it is easy to see that two spaces are always used, but
mkdocs.ymlhas a more complex nested structure. Here is an example which I did not change, it was alerady correct:The "enabled" is indented 2 spaces from the start of "privacy" which actually menas 4 spaces from the '-' before the 'privacy'. But this looks fine and we did not complain. It looks at a passing glance that indentation of 2 is adhered to.
In a menu of nested links, the same principle applies:
But in this case it looked wrong to you, because the new line also starts with '-'. The '- Coding' is indented 2 spaces from the start of the word 'Drupal' so it is actually 4 spaces from the '-' in front of Drupal. This may appear odd but it is what the eslint job is programmed to expect and report on. So I suggest we leave it as-is in the MR and we keep the eslint job running. The alternative is not to run eslint at all, but that would likely be worse as we'd potentially miss other violations of standards.
Comment #24
quietone commentedOK, fair enough.
I went to commit this but the diff stat doesn't match. GitLab shows
32 files + 725 − 664and locally I get34 files changed, 725 insertions(+), 804 deletions(-). I don't yet see why that is happening.Comment #25
quietone commentedThere are two files which were renamed but appear locally as a delete and new file, one affected 32 lines and the other 108. So together they account for the 2 extra files locally and the extra 140 deletions.
Comment #27
quietone commentedWith this committed it seemed time to advertise that the docs are available via GitLab pages. So, I updated the top of the project page to indicate that.
These are still to do.
For
1. @jonathan1055 did a lot of review here so this should be fine. And anyone can open an issue to make corrections.
2. Should be an issue because this effects the issue template and the process.
3-5. Talk to infrastructure first, I think.
Leaving at NW to come back to make the follow ups.
Edit: I mistakenly said that jonathan1055 did a lot of reviews when I was referring to the content. They did do some updates to pages but to imply it was an in depth content review was wrong. I apologize for any confusion.
Comment #28
jonathan1055 commentedActually, on #27 point (1) I did not do any of that checking. I thought you did most of it, and maybe @borisson_ on #3521924: Convert Coding Standards to GitLab pages but it wasn't me. I helped with the links, the gitlab-ci file and jobs, and the spelling and linting, but not any of the actual content of the pages.
Comment #29
claudiu.cristeaautomated-tests.md was removed but it's still in TOC
Comment #30
jonathan1055 commentedWe need to lend support for #3492951: Use mkdocs --strict option to verify .md links then this could have been picked automatically and fixed before merging.
Comment #32
jonathan1055 commentedMR6 is ready for review.
The site is built at
Comment #33
jonathan1055 commentedActually the doc site has not been rebuilt because we don't have the temporary code in place to trigger the "pages" job.
I want to make this more user-friendly for checking documentation fixes.
See #3507126: Only rebuild documentation when source has changed and
#3515276: Add documentation .md files to test the pages job.
Comment #34
jonathan1055 commentedHere is the updated site
https://coding-standards-3527545-5994d4.pages.drupalcode.org/
I've now removed the temporary code again. MR6 ready for review.
Comment #38
quietone commentedI created the issues needed from #27, #3530663: Redirects for Coding standard pages to GitLab pages and #3530664: Updates for using GitLab pages.
I think that completes this phase of the conversion. That just needs to be confirmed and then this can be set to 'fixed'.
Comment #39
jonathan1055 commentedFor #27.1 I repeat that it was not me who did any content review. There may have been updates to some pages since the initial commits.
There was a discussion of the tasks and sequencing on #3521924: Convert Coding Standards to GitLab pages so maybe it would be good to check against that, as the issue was closed before the tasks were marked off. It looks like most things have been covered though.
Comment #40
quietone commentedI have added a correction to my earlier comment about @jonathan1055 doing content review. @jonathan1055, is that change satisfactory?
Comment #41
jonathan1055 commentedOh yes absolutely, and no apology is needed :-) I just didn't want people to think that all the content had been checked by me. I recall that you checked some 'last updated' dates previously and there was not much (if anything) that had been changed on the existing pages.
I have added your second follow-up issue to the summary.
Comment #42
jonathan1055 commentedIn the minutes #3527210: Coding Standards Meeting Wednesday 2025-06-25 0900 UTC we agreed that this issue is fixed.