-
-
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] Further template the CSS API descriptions #24360
Conversation
docs/scripts/buildApi.ts
Outdated
const TEST = false; | ||
// const TEST = 'Accordion'; |
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.
It seems to me we can remove this and related code entirely in favor of yarn docs:api --grep ButtonBase
which got introduced in #21731.
Or is you workflow not supported by --grep
?
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.
I had missed that it's now supported by yarn docs:api
. That works for me! 👍🏼
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.
I'll try to remember to mention script changes in slack (as a simple form of a changelog).
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.
The review of the API generation is a bit more challenging now. I have felt the need to display the HTML output to review these changes.
/** Class name applied to the root element if `color="primary"`. */ | ||
/** Styles applied to the root element if `color="primary"`. */ | ||
colorPrimary?: string; |
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.
I think that "Class name" makes more sense in v5. The component does no longer apply any style with these classes cc @mnajdova.
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.
Agree, we should use "Class name" - another bullet point for me to check if it is updated in all components.
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.
I had missed that "Class name" was used for unstyled components. I'll revert that commit.
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.
Should it also be used for the styled components? (ahead of time of the whole migration to emotion)
I was conscious of the trade-off. If it proves to be a problem, it should be straightforward to test that the "reconstructed" string matches the source. |
This reverts commit 4ef119d.
I've simplified it, so it should be much clearer now. |
7abef31
to
27e4591
Compare
Minimise manual translations on Crowdin