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

[docs] Convert alpha component docs to new docs template #392

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

colmtuite
Copy link

@colmtuite colmtuite commented May 2, 2024


{{"demo": "UnstyledNumberFieldIntroduction", "defaultCodeOpen": false, "bg": "gradient"}}
Base UI components are all available as a single package.
Copy link

Choose a reason for hiding this comment

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

🚫 [vale] reported by reviewdog 🐶
[MUI.MuiBrandName] Use a non-breaking space (option+space on Mac, Alt+0160 on Windows or AltGr+Space on Linux, instead of space) for brand name ('Base UI' instead of 'Base UI')


{{"demo": "UnstyledSwitchIntroduction", "defaultCodeOpen": false, "bg": "gradient"}}
Base UI components are all available as a single package.
Copy link

Choose a reason for hiding this comment

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

🚫 [vale] reported by reviewdog 🐶
[MUI.MuiBrandName] Use a non-breaking space (option+space on Mac, Alt+0160 on Windows or AltGr+Space on Linux, instead of space) for brand name ('Base UI' instead of 'Base UI')


{{"demo": "UnstyledCheckboxIntroduction", "defaultCodeOpen": false, "bg": "gradient"}}
Base UI components are all available as a single package.
Copy link

Choose a reason for hiding this comment

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

🚫 [vale] reported by reviewdog 🐶
[MUI.MuiBrandName] Use a non-breaking space (option+space on Mac, Alt+0160 on Windows or AltGr+Space on Linux, instead of space) for brand name ('Base UI' instead of 'Base UI')

@michaldudak michaldudak changed the title Convert alpha component docs to new docs template [docs] Convert alpha component docs to new docs template May 2, 2024
@michaldudak michaldudak added the docs Improvements or additions to the documentation label May 2, 2024
@michaldudak
Copy link
Member

Maybe it's something to address separately (and later): I find the style of these three components' demos quite different. It would be great if we restyled them so they feel like they belong to the same design system.

@colmtuite colmtuite requested a review from michaldudak May 2, 2024 08:45
@colmtuite
Copy link
Author

colmtuite commented May 2, 2024

I find the style of these three components' demos quite different.

@michaldudak Yep the design consistency, design quality, CSS consistency, and CSS quality needs to be improved. I'll do it in a separate PR.

@colmtuite colmtuite requested a review from michaldudak May 2, 2024 10:13

## Accessibility

Ensure the number field has an accessible name via a `label` element.
Ensure the number field has an accessible name via a `<label/>` element.
Copy link
Contributor

Choose a reason for hiding this comment

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

<label> rather than <label/> is used for the other documents. It would be good to have a code example like they do as well here.

Comment on lines +220 to +222
```jsx
<NumberField.Input render={(props) => <MyCustomInput {...props} />}> />
```
Copy link
Contributor

Choose a reason for hiding this comment

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

We should show the two methods now that we support them:

<NumberField.Input render={<MyCustomInput />} />

This is where it's important to mention that the components need to forwardRef and spread all props to the underlying DOM element ("be open for extension")

(This one also has a stray > that I've removed)

<NumberField.Input render={(props) => <MyCustomInput {...props} />} />

Copy link
Author

Choose a reason for hiding this comment

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

Since this impacts most components and is duplicate content, I'm gonna move this into the global page in the "getting started" section. We can still include this little section on each page with a link to the more detailed page, but I think we should avoid duplicating this large block on every component page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants