-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[docs-infra] Display deprecation messages in API pages #42352
[docs-infra] Display deprecation messages in API pages #42352
Conversation
Netlify deploy previewhttps://deploy-preview-42352--material-ui.netlify.app/ Bundle size report |
2aff948
to
e4253ba
Compare
@michaldudak is it worth applying the changes to Base UI docs? I'm not sure what the status of Base UI docs is so I don't want to spend time there if it's going to go away soon. |
The current Base UI docs will be replaced sometime in the future, so I don't think it's worth spending time on them now. The new Base UI docs can make use of it, but it's not urgent. We're not stable yet, so we don't think about deprecated APIs now :) |
e4253ba
to
0a9a789
Compare
Updated the PR leveraging Danilo's Alerts standardization and switched the target branch to be next. |
Now that we're able to use JSDoc tags to annotate components and hooks (see #42327), we can use
@deprecated
JSDoc tags from components and hooks as the source of truth to automatically display deprecation alerts in API pages.Changes included in this PR:
deprecated
property in docs json files (e.g. docs/pages/material-ui/api/hidden.json)deprecationInfo
property in docs translation json files (e.g. docs/translations/api-docs/hidden/hidden.json)deprecationInfo
field is empty, display a generic message.ℹ️ Important: the changes work in API pages from Material, Joy, and System. The deprecation alert is not displayed in Base UI pages for now. I've pinged the Base UI to see if it's also worth applying the changes there.
Preview link: https://deploy-preview-42352--material-ui.netlify.app/material-ui/api/hidden/