StackedProgress excluded sections - #16535
Open
JamieB-gu wants to merge 2 commits into
Open
Conversation
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.
|
Hello 👋! When you're ready to run Chromatic, please apply the You will need to reapply the label each time you want to run Chromatic. |
JamieB-gu
force-pushed
the
stacked-progress-excluded-sections
branch
from
August 10, 2026 14:05
fc7a582 to
945eeec
Compare
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
force-pushed
the
stacked-progress-excluded-sections
branch
from
August 10, 2026 17:19
945eeec to
d92ee56
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for "excluded" sections in the
StackedProgresscomponent. 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
playfunctions to several stories to verify some of the component's calculations.