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

feat(Accordion): allow multiple accordions inside a group to be expanded at the same time #3726

Merged
merged 7 commits into from
Jun 25, 2024

Conversation

joakbjerk
Copy link
Contributor

@joakbjerk joakbjerk commented Jun 19, 2024

  • Add expansion behavior prop instead

Copy link

vercel bot commented Jun 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
eufemia ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 21, 2024 0:51am

@joakbjerk joakbjerk requested review from tujoworker, langz and AadneRo and removed request for tujoworker June 19, 2024 12:17
Copy link

codesandbox-ci bot commented Jun 19, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

context.flush_remembered_state,
context.expanded_id,
props.expanded,
props.id,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
props.id,
id,

Is there a reason we don't use the deconstructed props like this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope 😄 We should propably clean that up in a seperate pr, since there seem to be a lot of those occurances


it('should allow all accordions inside a group to be expanded at the same time', async () => {
render(
<Accordion.Group allowAllExpanded>
Copy link
Member

@tujoworker tujoworker Jun 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the prop name allowAllExpanded is misleading. What if we rather add a expandBehavior prop? That defaults to "single" or something. But can be changed to "multi".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, that seems more readable 👍

Copy link
Member

@tujoworker tujoworker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice 👍

@joakbjerk joakbjerk merged commit 68d3b0b into main Jun 25, 2024
10 checks passed
@joakbjerk joakbjerk deleted the feat/accordion-group-open-multiple branch June 25, 2024 06:15
tujoworker pushed a commit that referenced this pull request Jun 26, 2024
## [10.38.0](v10.37.0...v10.38.0) (2024-06-26)

### 🐛 Bug Fixes

* **Accordion:** add missing bottom border on hover ([#3723](#3723)) ([41fb027](41fb027))

### 📝 Documentation

* **Button:** add 'small' button size as supported ([#3735](#3735)) ([686cb90](686cb90))

### ✨ Features

* **Accordion:** allow multiple accordions inside a group to be expanded at the same time ([#3726](#3726)) ([68d3b0b](68d3b0b))
* **Card:** add support for nesting a Section with breakout until edge of card ([#3728](#3728)) ([97e92c2](97e92c2))
* **forms:** add property compensateForGap to Visibility ([#3733](#3733)) ([3094b18](3094b18)), closes [#3732](#3732)
* **forms:** add support for nested `Section` and `ArraySelection` fields ([#3734](#3734)) ([d4b3bb4](d4b3bb4)), closes [#3733](#3733)
* **HeightAnimation:** add property `compensateForGap` ([#3732](#3732)) ([b0c4199](b0c4199))
@tujoworker
Copy link
Member

🎉 This PR is included in version 10.38.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants