Skip to content
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

[SD-207] Accordion slots #1327

Merged
merged 5 commits into from
Sep 26, 2024
Merged

Conversation

waitingallday
Copy link
Member

@waitingallday waitingallday commented Sep 16, 2024

Issue: https://digital-vic.atlassian.net/browse/SD-207

What I did

  • Support the use of slots in accordions, using the RplAccordionItem child wrapper e.g.
  <RplAccordion id="accordion1">
    <RplAccordionItem id="item1">
      <template #title>
        Title content here
      </template>
      <p>Body content here</p>
    </RplAccordionItem>
    <RplAccordionItem id="item2" :active="true">
      <template #title>
        Title content here
      </template>
      <p>Body content here</p>
    </RplAccordionItem>
  </RplAccordion>
  • Note in the sample above, accordion content needs to be properly marked up i.e. <p>Body content here</p> not just text - the slot is handed to a RplContent component.

How to test

  • Storybook

Checklist

For all PR's

  • I've added relevant changes to the project Readme if needed.
  • I've updated the documentation site as needed.
  • I have added unit tests to cover my changes (if not applicable, please state why in a comment)

For new components only

  • I have added a story covering all variants
  • I have checked a11y tab in storybook passes
  • Any events are emitted on the event bus

@waitingallday waitingallday added this to the 2.17.0 milestone Sep 16, 2024
@waitingallday waitingallday self-assigned this Sep 16, 2024
@waitingallday waitingallday linked an issue Sep 16, 2024 that may be closed by this pull request
4 tasks
Copy link

cypress bot commented Sep 16, 2024

ripple-framework    Run #2230

Run Properties:  status check passed Passed #2230  •  git commit 621ea1a9ee: refactor(@dpc-sdp/ripple-ui-core): :recycle: use a single collector index
Project ripple-framework
Branch Review feat/sd-207-accordion-slots
Run status status check passed Passed #2230
Run duration 09m 31s
Commit git commit 621ea1a9ee: refactor(@dpc-sdp/ripple-ui-core): :recycle: use a single collector index
Committer Jason Smith
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 196
View all changes introduced in this branch ↗︎

@dylankelly
Copy link
Contributor

Would be great to add cypress component test for both props and slot interfaces

@waitingallday
Copy link
Member Author

Merging this now to get in the release, will followup to add the cypress component test separately

@waitingallday waitingallday merged commit 8f1390a into release/2.17.0 Sep 26, 2024
13 of 14 checks passed
@waitingallday waitingallday deleted the feat/sd-207-accordion-slots branch September 26, 2024 05:25
@waitingallday waitingallday mentioned this pull request Oct 3, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow passing accordion title/content via slots
3 participants