Skip to content

StackedProgress excluded sections - #16535

Merged
JamieB-gu merged 2 commits into
mainfrom
stacked-progress-excluded-sections
Aug 20, 2026
Merged

StackedProgress excluded sections#16535
JamieB-gu merged 2 commits into
mainfrom
stacked-progress-excluded-sections

Conversation

@JamieB-gu

@JamieB-gu JamieB-gu commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Add support for "excluded" sections in the StackedProgress component. This could be used for elections in which there are "holdovers", i.e. seats that are not up for election this time. The US Senate is an example of this, with roughly a third of seats up for election and two thirds not.

In this scenario, the excluded sections are represented on the bar using a different pattern (vertical stripes) to the included sections. They are also excluded from calculations on the progress of the election.

This change also updates the corresponding stories file to use Storybook's CSF Next factory functions, introduces an additional story for the US Senate, and adds play functions to several stories to verify some of the component's calculations.

Light Dark
stacked-progress-light stacked-progress-dark

Add support for "excluded" sections in the `StackedProgress` component.
This could be used for elections in which there are "holdovers", i.e.
seats that are not up for election this time. The US Senate is an
example of this, with roughly a third of seats up for election and two
thirds not.

In this scenario, the excluded sections are represented on the bar using
a different pattern (vertical stripes) to the included sections. They
are also excluded from calculations on the progress of the election.

This change also updates the corresponding stories file to use
Storybook's CSF Next factory functions, introduces an additional story
for the US Senate, and adds `play` functions to several stories to
verify some of the component's calculations.
@JamieB-gu JamieB-gu self-assigned this Aug 10, 2026
@JamieB-gu JamieB-gu added the feature Departmental tracking: work on a new feature label Aug 10, 2026
@github-actions

Copy link
Copy Markdown

Hello 👋! When you're ready to run Chromatic, please apply the run_chromatic label to this PR.

You will need to reapply the label each time you want to run Chromatic.

Click here to see the Chromatic project.

@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown

@JamieB-gu JamieB-gu added the run_chromatic Runs chromatic when label is applied label Aug 10, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Aug 10, 2026
@JamieB-gu JamieB-gu added the run_chromatic Runs chromatic when label is applied label Aug 10, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Aug 10, 2026
@JamieB-gu
JamieB-gu force-pushed the stacked-progress-excluded-sections branch from fc7a582 to 945eeec Compare August 10, 2026 14:05
@JamieB-gu JamieB-gu added the run_chromatic Runs chromatic when label is applied label Aug 10, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Aug 10, 2026
When we display stories with horizontal or vertical splits there are
multiple instances of the component present. Therefore we need to check
each one in the tests.
@JamieB-gu
JamieB-gu force-pushed the stacked-progress-excluded-sections branch from 945eeec to d92ee56 Compare August 10, 2026 17:19
@JamieB-gu JamieB-gu added the run_chromatic Runs chromatic when label is applied label Aug 10, 2026
@github-actions github-actions Bot removed the run_chromatic Runs chromatic when label is applied label Aug 10, 2026

@marjisound marjisound 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.

Great work 👏 👏 👏

@JamieB-gu
JamieB-gu added this pull request to the merge queue Aug 19, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Aug 19, 2026
@JamieB-gu
JamieB-gu added this pull request to the merge queue Aug 20, 2026
Merged via the queue into main with commit 4a9737d Aug 20, 2026
32 checks passed
@JamieB-gu
JamieB-gu deleted the stacked-progress-excluded-sections branch August 20, 2026 11:19
@gu-prout

gu-prout Bot commented Aug 20, 2026

Copy link
Copy Markdown

Seen on PROD (merged by @JamieB-gu 8 minutes and 44 seconds ago) Please check your changes!

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

Labels

feature Departmental tracking: work on a new feature Seen-on-PROD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants