-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Content update changes in PHP Coding Standards #65
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dingo-d Thank you for doing this! Looks great!
- If we're now changing the text to markdown anyway, what about using definition links instead of inline links ? May need verification that the WP Parser handles those correctly though.
A definition link in markdown is:Some text with a [descriptive link]. [descriptive link]: http://link.to/
- Some code samples use characters which need escaping in HTML, like
>
in->
. I seem to remember there were problems with double escaping when parsing those in the past.
We may need to verify that after this change is merged, they are still displayed correctly, i.e. displayed as->
not->
and if not, may need to selectively revert those changes.
While reading the code diff, I also noticed various other things. I've left inline comments for these and marked them as "not directly related to this PR".
Those comments don't need to be addressed in this PR, but might warrant a follow-up PR.
Thanks for the review @jrfnl. I'll wait on comments on some of the issues you've mentioned from the rest of the team @GaryJones @ntwb @SergeyBiryukov before making changes.
I kinda like inline links more. They do clutter markdown file a bit, but it's easier to see what the link points to.
Yes, I remember people having to replace those, I cannot test this so I'm unsure if this will cause breakage. I didn't find any instances of encoded HTML in the JavaScript chapter, so I just presumed as long as they are contained in backticks, we should be good (🤞🏼). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming the renderer can handle standard Markdown, then changes generally look good.
I'd agree with keeping inline links - easier to follow when reading raw markdown than have to skip to the end of the paragraph/section/file to look for a URL, especially when most/all of the links are unique.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, I've added a couple of minor nits, I've got a linting configuration setup locally, I created this quite some time ago using Remark-Lint, I started updating it last night to use Markdown Lint as that's what WordPress are now using for MD linting... I'll try to get this pushed up here in the coming days....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay.... so originally this PR was a PR to update the document from using HTML to using markdown.
Unfortunately, it has now evolved to include more extensive changes to the document, including removing sections and rewriting some texts.
For the purpose of having a clean history, I'd personally prefer we'd split this PR into two (or more PRs), with the markup changes in one PR and the textual changes in one or more follow-up PRs.
That would also prevent this PR from lingering as the original change proposal was perfectly fine and only gathered very few comments regarding the actual markup changes.
This PR could have (and should have) been merged already, but the PR is now being delayed/dragged out due to the scope of the PR creeping into different territories.
What about if we split this into the following separate PRs ?
- Purely the markup changes from HTML to Markdown.
- Textual updates for outdated content (removing references to PEAR, removing the Changelog, updating texts relating to PHP functionality which has since changed etc).
- Update the code samples for a) correct capitalization and punctuation of inline comments and b) correct use of output escaping in the code samples (and any other suggestions made).
- Whatever remains.
Having said that, as textual changes are now happening anyway (either in this PR or in follow-up PRs), I've gone through the document again with a fine toothcomb (including the parts of the document which were untouched by the original PR) and left a range of remarks to address.
IMO, nearly all these comments should be addressed in follow-up PRs and not so much in this PR.
@GaryJones @ntwb do you agree that I create a separate PR just for markdown changes made (the first few commits), then I can rebase this one and we can handle the changes Juliette suggested here? |
Of course :-) |
f777d31
to
be3efbe
Compare
Textual update of the PHP coding standards document. Includes: * Removing outdated references to PEAR, BackPress and the defunct Hackers mailinglist. * Updating various texts to be in line with the current state of PHP. * Removed unnecessary "PHP" H2 subheader. * Changed the rest of the headers from H3 to H2. * Removed the credits and changelog as they were wildly inaccurate and out of date. * Various small textual clarifications and grammar improvements.
ebb105b
to
f51392f
Compare
@GaryJones @ntwb Juliette and I did a pass through and fixed all the content update changes, can you give it another go so that we can merge this? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thanks for getting this sorted @dingo-d ! Looking forward to the next PR with the code sample updates. Great momentum to get it all shiny now.
Co-authored-by: Gary Jones <[email protected]>
Co-authored-by: Gary Jones <[email protected]>
Co-authored-by: Gary Jones <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Crossing our t's and dotting our i's... just two final remarks.
Put the inline documentation above the WPCS mention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get this merged!
Thanks for the PR! Left one minor suggestion with a typo fix, looks good to me otherwise 👍 |
Co-authored-by: Sergey Biryukov <[email protected]>
This is the first part of the updates to the WPCS PHP documentation. In this PR I've gone through the text and replaced all the HTML with markdown syntax.
Some links have been updated - some HTTP to HTTPS replacements; data validation now points to the plugins handbook (as a part of the move from codex to developers documentation); added title refs to trac tickets.
I've looked at the JS coding standards documentation and markdown is used there, so don't see why it shouldn't be used here as well.
The second part of the updates will see what rules can be added from the make post in 2020. There are some ongoing discussions that are not resolved, but I'll add only the one that nobody had any issues with within the comments.
@jrfnl and I agreed that we should add this to the handbook so that the WPCS 3.0.0 release can be made in line with the new additions.
But I'll open a separate PR for that 🙂
Fixes: #19