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): use native <details> element #2190

Closed

Conversation

eirikbacker
Copy link
Contributor

@eirikbacker eirikbacker commented Jul 29, 2024

Question: It is now implemented so search-in-page only works when using defaultOpen, as a controlled open should not be affected by user interaction. Just checking - does this make sense to you guys as well? :)

Copy link

changeset-bot bot commented Jul 29, 2024

⚠️ No Changeset found

Latest commit: 844b850

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@eirikbacker eirikbacker changed the title fix: use native <details> element for accordion feat(Accordion): use native <details> element Jul 30, 2024
@mimarz
Copy link
Collaborator

mimarz commented Jul 31, 2024

Welcome back from vacay!

Thanks for making this, we'll have a look at this when the rest of the team is back :D

Just fyi, I am making some bigger architecture and ci improvements during the summer so things might be broken in next and/or so merge conflicts might arise 😅

@eirikbacker
Copy link
Contributor Author

Thanks @mimarz :D
No stress - not back until next week anyway here - looking forward to hear and learn about rewrites :)
Hope summer was good!

@eirikbacker
Copy link
Contributor Author

Closed as this will be replaced by #2363

@eirikbacker eirikbacker closed this Sep 2, 2024
eirikbacker added a commit that referenced this pull request Sep 16, 2024
- Fixes #2100 🥳 
- Deprecates #2176, #2190
- Built on top of `<u-details>` for [better accessibility on
mobile](https://u-elements.github.io/u-elements/elements/u-details#accessibility)
- Removes `level` from `AccordionHeader` as this is not supported by
native `<details>`
- Removes `onHeaderClick` from `AccordionHeader` as this is identical to
adding a `onClick` handler
- JS-based animation can be removed and replaced by CSS when
`calc-size(auto)` is fully supported 🚀
- Fixes shrinking chevron on mobile/zoom
- Fixes text-align in AccordionHeader on mobile/zoom
- Follows: #2295 
- Also works in `dir="rtl"`

Question: It is now implemented so search-in-page only works when using
`defaultOpen`, as a controlled `open` should not be affected by user
interaction. Just checking - does this make sense to you guys as well?
:)
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.

Use of <details> in Accordion
2 participants