Skip to content

StackedProgress excluded sections - #16535

Open
JamieB-gu wants to merge 2 commits into
mainfrom
stacked-progress-excluded-sections
Open

StackedProgress excluded sections#16535
JamieB-gu wants to merge 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
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant