bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

Docs: add Usage section with JavaScript guide for Accordion component

Open TommasoAllegretti opened this issue 1 year ago • 3 comments

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

  • Documentation enhancement (non-breaking change)

Checklist

  • [x] I have read the contributing guidelines
  • [x] My code follows the code style of the project (using npm run lint)
  • [x] My change introduces changes to the documentation
  • [x] I have updated the documentation accordingly
  • (N/A) I have added tests to cover my changes
  • [x] All new and existing tests passed

Live previews

Related issues

Closes #40760

TommasoAllegretti avatar Aug 23 '24 14:08 TommasoAllegretti

@julien-deramond Thoughts on linking to Collapse usage docs instead as mentioned?

mdo avatar Apr 03 '25 06:04 mdo

Eh, it's a similar situation to tooltips/popovers, so going to just roll with it.

mdo avatar Apr 09 '25 05:04 mdo

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.

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).

julien-deramond avatar Apr 09 '25 14:04 julien-deramond