-
-
Notifications
You must be signed in to change notification settings - Fork 79.2k
Docs: add Usage section with JavaScript guide for Accordion component #40768
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
Conversation
@julien-deramond Thoughts on linking to Collapse usage docs instead as mentioned? |
Eh, it's a similar situation to tooltips/popovers, so going to just roll with it. |
9fe658a
to
71b7c9a
Compare
As you mentioned, it's pretty much the same situation as with tooltips and popovers—the only real difference is that the word "tooltip" or "popover" is swapped out, and here it's just "collapse" instead. The content is nearly identical. I don't mind the temporary duplication, though. We can always revisit this once the docs are migrated to Astro. It'll likely be easier to create reusable content there, especially since Hugo doesn’t handle nesting partials or shortcodes very well (at least from what I remember). |
71b7c9a
to
2243be3
Compare
Co-authored-by: Tommaso Allegretti <[email protected]>
2243be3
to
c7829b5
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.
Thanks for the PR, @TommasoAllegretti!
I’ve rebased your commit and adapted it to the updated Astro architecture, incorporating content from the Collapse component.
I haven’t yet managed to extract the content into a reusable form, but I’ve added a task for that to #41380 for future exploration.
I’m good with the changes.
@mdo, feel free to give it a final review and merge if all looks good.
Description
Added a section in the Accordion documentation to explain how to handle it via JavaScript, the section is almost identical to the one in the Collapse documentation (since it is the same) with a few minor changes.
It might be better to just link to the Collapse docs instead?
Type of changes
Checklist
npm run lint
)Live previews
Related issues
Closes #40760