Skip to content
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

[core] Replace relative links to absolute ones in JSDocs #43472

Merged
merged 7 commits into from
Aug 27, 2024

Conversation

alexfauquette
Copy link
Member

Follow up of #42472

Restart of #42528 to get a clearer commit history.

would use full URLs to the stable API for the .d.ts files. We use relative URLs for the link on the docs pages. It's not perfect, but it's still better than what we have today, so a step forward to improving the DX.

#42528 (comment)

After this PR links in all props should have an absolut link to the docs, allowing user to click on them from their IDE

@alexfauquette alexfauquette changed the title Use absolute paths in .d.ts files [core] Replace relative links to absolute ones in JSDocs Aug 27, 2024
@alexfauquette alexfauquette added the core Infrastructure work going on behind the scenes label Aug 27, 2024
@mui-bot
Copy link

mui-bot commented Aug 27, 2024

Netlify deploy preview

https://deploy-preview-43472--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against 3960692

@DiegoAndai
Copy link
Member

@alexfauquette a couple of questions:

  • Is there a way to test that this doesn't break in the future?
  • How should we deal with new major versions in the future? for example, when v7 is released, the v6 docs should be modified mui.com -> v6.mui.com

@alexfauquette
Copy link
Member Author

Is there a way to test that this doesn't break in the future?

Not really. It's like a standard. People writing links in JSDocs look at how other links are done. And so if they see all links starting with https://mui.com they will do the same.

For the docs aspect, we could check the links looking for xxx.mui.com and making sure all the xxx are coherent.

How should we deal with new major versions in the future? for example, when v7 is released, the v6 docs should be modified mui.com -> v6.mui.com

When doing a major you would have two steps:

  1. When creating the next branch should do a "find and replace replace" as follow: ://mui.com -> ://next.mui.com
  2. When moving master to v6 do ://mui.com -> ://v6.mui.com
  3. When renaming next to master do ://next.mui.com -> ://mui.com

Copy link
Member

@DiegoAndai DiegoAndai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @alexfauquette!

@DiegoAndai
Copy link
Member

When doing a major you would have two steps:

I added this to our major release guide

@alexfauquette alexfauquette merged commit a879a93 into mui:master Aug 27, 2024
22 checks passed
@alexfauquette alexfauquette deleted the manual-replacement2 branch August 27, 2024 18:26
@oliviertassinari oliviertassinari added the scope: docs-infra Specific to the docs-infra product label Aug 28, 2024
Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, a step forward

@@ -17,13 +17,13 @@
},
"default": "{}",
"deprecated": true,
"deprecationInfo": "use the <code>slots</code> prop instead. This prop will be removed in v7. See <a href=\"/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
"deprecationInfo": "use the <code>slots</code> prop instead. This prop will be removed in v7. See <a href=\"https://mui.com/material-ui/migration/migrating-from-deprecated-apis/\">Migrating from deprecated APIs</a> for more details."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future, I think that we want to automatically remove https://mui.com/ from those links to have relative URLs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes scope: docs-infra Specific to the docs-infra product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants