-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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(ContentSwitcher): update docs #6650
docs(ContentSwitcher): update docs #6650
Conversation
Deploy preview for carbon-elements ready! Built with commit 625cde0 |
Deploy preview for carbon-components-react ready! Built with commit 625cde0 https://deploy-preview-6650--carbon-components-react.netlify.app |
a4ee8c5
to
7d280f2
Compare
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.
Seems great! This is definitely one of our most problematic components, it seems 😬 It's nice to have these docs up though, and I'm curious what you would recommend we change in v11 🤔
It seems like we leave a lot up to our users, and don't implement the accordion pattern if I'm looking at this correctly. Would be great if the component handled switching sections for folks.
Separately, would we want to leave a reference to the current bug with onChange
that I have a PR up for over in #6257 ? Or is that better not listed here?
@joshblack are we sure that it will always be toggling a content section? I could see this also toggling data in a table, toggling view modes, filtering unread/all email, etc.. so I kind of like that it isn't too prescriptive. Would be worth looking into and getting some feedback (if we haven't compiled that somewhere already). Will definitely add a note in the PR. Do we want to add anything to the actual docs? |
Closes #6630
Updates
ContentSwitcher
to new CSF format and adds in prop documentationDone
ContentSwitcher.mdx
and fill out with templateChangelog
New
Docs
tab now includes detailed descriptions of eachprop
as well as examples and code snippetsTesting / Reviewing
Check updated docs for grammar usage and that the examples look correct
Questions for reviewers:
I've updated the Docs table for both
Button
andContentSwitcher
to include theprop
subsections for easier access. I can remove it if this is too distracting.Notes for V11
onChange
when using keyboard (fix(content-switcher): call onChange with correct data with keyboard #6257)