Skip to content

feat(web-components): support flex item dividers - #4612

Open
sylvesterkaczmarek wants to merge 2 commits into
mi6:developfrom
sylvesterkaczmarek:feat/4075-divider-flex-item
Open

feat(web-components): support flex item dividers#4612
sylvesterkaczmarek wants to merge 2 commits into
mi6:developfrom
sylvesterkaczmarek:feat/4075-divider-flex-item

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Summary of the changes

Add a flexItem prop to IcDivider so vertical dividers can stretch correctly when used as children of flex containers without an explicit height.

When enabled on a vertical divider, the host uses align-self: stretch and the divider line and labelled segments grow to fill the available height. Existing behaviour remains unchanged by default.

A focused unit test verifies the prop applies the flex-item state.

Related issue

Closes #4075

Validation

  • flexItem defaults to false
  • Vertical flex-item dividers stretch within an intrinsically sized flex container
  • Labelled vertical dividers can grow their line segments
  • Existing divider behaviour is unchanged when the prop is omitted
  • Unit regression coverage added

@GCHQ-Developer-530 GCHQ-Developer-530 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @sylvesterkaczmarek, thanks for making these changes. Just a few comments from me.
Please could you squash all of your web-components commits into one?
Also I think this change would benefit from a Cypress visual regression test so that we can see the prop in action. Would you be able to add one and commit it with the react scope?
Additionally please could you add a story to demonstrate this change both for web-components and react?
Thank you

@sylvesterkaczmarek

Copy link
Copy Markdown
Author

@GCHQ-Developer-530 Thanks. I've squashed the web-components changes into one commit, added a React-scoped Cypress visual regression test with its generated baseline, and added flex item stories for both Web Components and React.

@lz405

lz405 commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Hi, thanks for the contribution. We generally keep Cypress tests in one file per component.

@GCHQ-Developer-299
GCHQ-Developer-299 force-pushed the develop branch 2 times, most recently from e3b71bd to 1b185ad Compare August 20, 2026 12:06
@sylvesterkaczmarek

Copy link
Copy Markdown
Author

Thanks for the guidance. I've moved the Cypress coverage into the existing IcDivider test file and moved the baseline to match. The web-components and React changes remain separated by scope. The new Actions runs are currently waiting for maintainer approval.

@GCHQ-Developer-530

Copy link
Copy Markdown
Contributor

Please rebase this branch

@GCHQ-Developer-530
GCHQ-Developer-530 force-pushed the feat/4075-divider-flex-item branch 2 times, most recently from 0aec5e3 to cc9133f Compare August 25, 2026 13:00
Comment thread packages/web-components/src/components/ic-divider/ic-divider-flex-item.stories.js Outdated
@GCHQ-Developer-530
GCHQ-Developer-530 force-pushed the feat/4075-divider-flex-item branch from cc9133f to 1a4a6ac Compare August 27, 2026 12:02
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.

4 participants