Skip to content

feat(Accordion): add AccordionGroup, Text headers and find-in-page search - #3409

Draft
Lisa18289 wants to merge 1 commit into
nextfrom
claude/accordion-component-review-15064b
Draft

Lisa18289 wants to merge 1 commit into
nextfrom
claude/accordion-component-review-15064b

Conversation

@Lisa18289

@Lisa18289 Lisa18289 commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Stacked accordions inherited their parent's gap and read as separate, bulky blocks; a Label header left the accordion out of the page outline; badges in the header broke out of the toggle; and collapsed content was invisible to find-in-page. Closes #1838.

AccordionGroup renders its accordions as one block with separators, so the parent's gap only applies around it. Single-expand is opt-in, and the controlled state uses React Aria's prop names. The group keeps its own expansion state instead of using DisclosureGroup, which ignores an item's defaultExpanded.

The Accordion builds on useDisclosure: collapsed panels are hidden="until-found" and expand on a find match, which drops Flow's Activity from the accordion. Heading stays a heading (now h3 by default, at its own font size), Text renders a plain toggle with a smaller chevron. Label renders a plain toggle as well. variant is deprecated as a whole: "outline" no longer draws a frame, so the prop has no effect left and warns when passed. The migration entry accordion-variant-deprecated removes it with a codemod and points to AccordionGroup for separators. Header and content text sit on the surrounding content's edge via a negative inline margin, and heading spacing follows section.spacing and the section's sub-heading spacing. Navigation moves onto the menu tokens with the same alignment, and the List's filter modal groups its accordions.

Collapsed content now always mounts, so find-in-page reaches it. Flow's Activity no longer defers it until expansion: effects and data loading inside a collapsed accordion run on page load. Every consumer still passing variant="outline" loses the frame.

Worth a look: the new accordion.* token values were tuned in review, not by UX; the default heading level moves from 4 to 3, which changes every accordion without an explicit level.

🤖 Generated with Claude Code

@Lisa18289 Lisa18289 self-assigned this Oct 8, 2026
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

🚀 Preview Deployment

Preview environments are ready:

Type URL
docs pr-3409.docs.review.flow-components.de
storybook pr-3409.storybook.review.flow-components.de

Images:

  • docs: ghcr.io/mittwald/flow/docs:pr-3409
  • storybook: ghcr.io/mittwald/flow/storybook:pr-3409

@Lisa18289
Lisa18289 force-pushed the claude/accordion-component-review-15064b branch from 2c44ec6 to eb0b759 Compare October 8, 2026 08:31
@Lisa18289 Lisa18289 added the update-screenshots Label a PR to update the screenshots used for visual regression testing label Oct 8, 2026
@github-actions github-actions Bot removed the update-screenshots Label a PR to update the screenshots used for visual regression testing label Oct 8, 2026
@Lisa18289 Lisa18289 added the update-screenshots Label a PR to update the screenshots used for visual regression testing label Oct 8, 2026
@github-actions github-actions Bot removed the update-screenshots Label a PR to update the screenshots used for visual regression testing label Oct 8, 2026
@Lisa18289 Lisa18289 added the update-screenshots Label a PR to update the screenshots used for visual regression testing label Oct 8, 2026
@github-actions github-actions Bot removed the update-screenshots Label a PR to update the screenshots used for visual regression testing label Oct 8, 2026
@Lisa18289 Lisa18289 added the update-screenshots Label a PR to update the screenshots used for visual regression testing label Oct 9, 2026
@github-actions github-actions Bot removed the update-screenshots Label a PR to update the screenshots used for visual regression testing label Oct 9, 2026
…arch

Stacked accordions inherited their parent's gap, a Label header left the
accordion out of the page outline, badges broke out of the toggle, and
collapsed content was invisible to find-in-page. Closes #1838.

`AccordionGroup` renders accordions as one block with separators.
Single-expand is opt-in, and the controlled state uses React Aria's prop
names. The group keeps its own expansion state, because `DisclosureGroup`
ignores an item's `defaultExpanded`.

The Accordion builds on `useDisclosure`: collapsed panels are
`hidden="until-found"` and expand on a find match, so Flow's `Activity` no
longer defers their content. `Heading` stays a heading (`h3` by default),
`Text` and `Label` render a compact toggle. `variant` is deprecated as a
whole; `"outline"` no longer draws a frame. The migration entry
`accordion-variant-deprecated` removes the prop with a codemod. Header and
content text sit on the surrounding content's edge, heading spacing follows
`section.spacing`, Navigation moves onto the menu tokens, and the List's
filter modal groups its accordions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Lisa18289
Lisa18289 force-pushed the claude/accordion-component-review-15064b branch from d184a48 to ab7f383 Compare October 9, 2026 05:38
padding-x:
value: "{size-px.s}"
padding-y:
value: "{size-px.s}"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

wenn Padding x und padding y beide auf size s gehen könnten wir einfach nur Padding haben. Unten text-padding und content-padding ist ja okay wenn diese noch mal spezieller sind.

value: "{size-px.s}"
padding-y:
value: "{size-px.s}"
text-padding-y:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Frage sollten wir nicht lieber padding-text-y als token schreiben ich glaube so haben wir es doch auch immer beim rest gleiches gilt für content und header.

This branch has not been deployed

No deployments
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.

2 participants