-
Notifications
You must be signed in to change notification settings - Fork 22.5k
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
fix: rename files/slugs with parens #20470
Conversation
Preview URLs (6 pages)Flaws (5)Note! 3 documents with no flaws that don't need to be listed. 🎉 URL:
URL:
URL:
(comment last updated: 2023-01-23 10:57:01) |
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.
This PR is removing parentheses from all URLs.
Two thoughts:
1.This requires approval by @Rumyra and possibly OWD (cc @Elchi3).
2. If the parentheses cause issues, there needs to be a check that prevents these from landing in the repository again.
I think it should be possible to fix the issues without having to rename the pages. But if folks were planning on the those braces anyways, let's do it.
The issue of this morning has been fixed without removing the braces. Onkar made the workflow more resilient. I have no strong feeling about keeping them or removing them |
I'm not aware of anything that would depend on the braces (although you never know what is hidden in all the weird sidebar implementations 😄 ) I think it makes sense to only allow unproblematic ("friendly") URLs for MDN pages (and in mdn translations). |
There are a few other restrictions (like no accented characters) that we hit a long time ago (with |
No it's still an issue, but is no longer failing the build. These files with braces in the name are just silently failing to be linteted, as Markdownlint treats them as a regex and fails to match them. |
@@ -3626,7 +3628,7 @@ | |||
/en-US/docs/Glossary/Web_Sockets /en-US/docs/Glossary/WebSockets | |||
/en-US/docs/Glossary/World_Wide_Web_Consortium_(W3C) /en-US/docs/Glossary/W3C | |||
/en-US/docs/Glossary/XForm /en-US/docs/Glossary/XForms | |||
/en-US/docs/Glossary/XMLHttpRequest /en-US/docs/Glossary/XHR_(XMLHttpRequest) |
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.
Since it looks like this is going back to the previous naming, I wonder if an extra redirect for the a plain /XHR
and the other acronyms that are being dropped would make sense
a8fa55d
to
3c02fab
Compare
As a note, Wikipedia does allow parentheses in slugs. (Not saying we should too) |
I have a slight preference to keeping parentheses in slugs (mostly because Wikipedia does that as well). Maybe we can remove them from file paths? |
I think Wikipedia uses them for disambiguation. I think the only one that falls into that bucket might be |
🚀 Automation 🚀 leads to many surprises, especially on such a large repository! 😄 We are learning little by little how to do it optimally. That's great. 🎉 I think there should be a discussion at https://github.com/mdn/mdn-community/discussions before going forward. Especially, I think the following points should be presented:
I don't have time to open this myself (especially as I'll be away for a few weeks) but feel free to start it. (I don't have a strong opinion here so I won't come bikeshedding after the facts) Meanwhile, we maybe want to transform this PR into a draft to show it is not ready to move forward. |
3c02fab
to
16612d7
Compare
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.
Add back removed metadata spacing
1160b3e
to
e1ef02e
Compare
Thanks all, I've opened a discussion so we can come to an agreement on how to move forward here: mdn/mdn-community#293 |
This pull request has merge conflicts that must be resolved before it can be merged. |
Minor conflicts after #23602 has landed. Regarding the changes, I am +1 on at least renaming the files, i.e. the following looks fine to me:
Is it necessary to also change the slugs? |
Yes. yari throws error: if (Document.urlToFolderPath(document.url) !== document.fileInfo.folder) {
throw new Error(
`The document's slug (${metadata.slug}) doesn't match its disk folder name (${document.fileInfo.folder})`
);
} |
Of course, I forgot about that, thanks for clarifying. |
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.
Going to leave a +1
on this. Would be good to get another approval from the team before merging (and resolving conflicts).
Looks good to me, and it seems that we have reached a consensus that we want to do this. My only question is whether we want, need, or have addressed this point from Claas:
|
@schalkneethling ATM markdownlint pr check fails when a file name has content/.github/workflows/pr-test.yml Lines 135 to 141 in fd75bb8
We can do it only after this PR lands. :) |
Thanks, everyone. Merging this one shortly 👍🏻 |
CI check for parens in file paths taken care of in follow-up
FYI, hit a minor regression with Yari, so sent in #23849 for the Kitchen Sink tests. As far as I can tell, it just wasn't expecting a redirect on that test page |
The brace characters can sometimes cause issues for tools that use regex.