-
-
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
[material-ui][docs] Revise the Accordion page #40284
[material-ui][docs] Revise the Accordion page #40284
Conversation
Netlify deploy previewBundle size report |
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.
Sweet! Thank you, @anle9650, for kicking this one off! Took advantage of this PR to expand the scope a bit and already revisef the Accordion page as a whole! 👌 Tagging @samuelsycamore for a further content review, too!
(PS: I'm seeing a hydration error that I didn't quite figure out where yet)
@danilo-leal nice! I fixed the hydration error in 802eb4a |
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.
Love to see the improvements here! @danilo-leal do you think we should give this page the full editorial makeover (#35158) or try to limit the scope to #39952?
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com> Signed-off-by: Andy Le <andy.le@ucdenver.edu>
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com> Signed-off-by: Andy Le <andy.le@ucdenver.edu>
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com> Signed-off-by: Andy Le <andy.le@ucdenver.edu>
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com> Signed-off-by: Andy Le <andy.le@ucdenver.edu>
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com> Signed-off-by: Andy Le <andy.le@ucdenver.edu>
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com> Signed-off-by: Andy Le <andy.le@ucdenver.edu>
@samuelsycamore, appreciate the review! 🙏 Are you foreseeing any other changes to this PR? I applied the latest template you put together for the Material UI docs on my first edit, and with these edits, I think it's looking pretty good. What do you think? |
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.
couple more tiny style edits
One thing that's not entirely clear to me is how comprehensive the component demo pages should be, compared with the API reference pages. There are several props that are documented in the API page (like |
Good call—pushed a commit adding a few more sections for other props available to the Accordion! One that is still broken, though, that I couldn't figure out properly, is the transition demo. Would appreciate some help here! It seems there's a TypeScript issue with passing another transition component using the |
This comment was marked as resolved.
This comment was marked as resolved.
Uhm, I'm hesitant to change things on the source code of the Fade component to pull this PR off — maybe there's another way out that I'm just not seeing? |
@danilo-leal I'm seeing that ---TransitionProps & { children?: React.ReactElement<any, any> }
+++TransitionProps & { children: React.ReactElement<any, any> } Maybe Accordion was supposed to also be included in #29028 updates, but was missed? |
Oh, interesting; it does seem to solve the TypeScript issue, but not the uncollapsed Accordion Details panel. Maybe @mnajdova or @DiegoAndai could help us out with this matter? 😬 |
Hi! I discussed with @mnajdova, and we think that the best path forward is to:
Does that make sense? Regarding this:
By replacing the |
@DiegoAndai appreciate the guidance! Let me know if the way I did it up there works well — didn't use a custom transition but instead toggled the styles conditionally using the Accordion's expanded state. 🤙 |
docs/data/material/components/accordion/AccordionExpandDefault.js
Outdated
Show resolved
Hide resolved
docs/data/material/components/accordion/AccordionExpandDefault.tsx
Outdated
Show resolved
Hide resolved
Signed-off-by: Diego Andai <diego@mui.com>
@danilo-leal yeah! that looks good 😊 |
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.
Yay, this is looking good to me! Thanks for kicking it off & working with us throughout @anle9650! 🎉
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.
looks great!
Thanks for all your help and feedback on this! |
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com> Co-authored-by: Diego Andai <diego@mui.com>
Part of #39952. Adds documentation for accordion's complementary components.
https://deploy-preview-40284--material-ui.netlify.app/material-ui/react-accordion/#introduction