- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 258
[docs] Move API section last on the components page #3088
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
base: master
Are you sure you want to change the base?
Conversation
| commit:  | 
| Bundle size report
 Check out the code infra dashboard for more information about this PR. | 
| ✅ Deploy Preview for base-ui ready!
 To edit notification comments on pull requests, go to your Netlify project configuration. | 
| parts="Root, Value, Icon, Input, Clear, Trigger, Chips, Chip, ChipRemove, List, Portal, Backdrop, Positioner, Popup, Arrow, Status, Empty, Collection, Row, Item, ItemIndicator, Group, GroupLabel, Separator" | ||
| /> | ||
|  | ||
| ## useFilter | 
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 the useFilter section should follow the reference to the end as well ~
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.
You mean having this order of the sections?
Hero
Usage guidelines
Anatomy
TypeScript inference
Examples
useFilter
API
Typically on the other pages the explanation and code samples are first, and they are all the examples, this is why I didn't change the order. Happy to revisit this tough. We have a hook documentation on the autocomplete and the toast pages too, and they are all following this order. cc @atomiks as he wrote the documentation on these 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.
useFilter is "part" of the API reference, but just a hook instead of a component. Our docs don't distinguish them properly though. I'd place it at the very end, after the API reference (same with e.g. Toast)
I would also change "Accessibility guidelines" to "Usage guidelines" as well so it's consistent on all pages
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 would also change "Accessibility guidelines" to "Usage guidelines" as well so it's consistent on all pages
Would you add them after the examples? I thought it make sense for them to be before the examples as they explain something about the component.
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's kept at the top intentionally as it's important to read. Only the hooks/API reference should go at the end
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.
"General usage" under Toast should also be changed to "Usage guidelines" as well (it's the only "General usage" heading we have)
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 second dot point isn't a guideline though, more of just how it can work
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.
Ok, we are on the same page then regarding the order 👌 I agree around renaming "General usage" to "Usage guidelines". Yep, the second dot is an information, but I think it still fit in this section, I wouldn't move it.
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 wonder if Global Manager and Stacking and animations shouldn't be subsection of the Usage guidelines.
Closes #3028