ElectionTracker component - #16574
Draft
JamieB-gu wants to merge 11 commits into
Draft
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.
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.
Allow the `Versus` component to support more design variations by making it optional to include an image or to have the text appear in the colour for a group. Also updated the stories to use Storybook's CSF Next factory functions.
A small component that can be used in election trackers. Represents progress towards a total in text form. For example, "300/650 seats declared" or "290/435 races called".
Handles a common design pattern, where components are placed above one another at narrower breakpoints and side-by-side at wider ones.
An `OnwardLink` component for linking to a full results page from an election tracker.
A component for displaying results from an election to the US Congress. The `USHouse` and `USSenate` components could also be used to view results separately. This change includes stories with example data from 2024.
This adds support for "Others" and independents in the `USHouse` and `USSenate` components.
There are multiple links in split mode, because the story is rendered multiple times.
Create a component designed to handle multiple different election tracker layouts.
JamieB-gu
force-pushed
the
election-trackers-us-congress
branch
from
August 20, 2026 11:19
8e4579c to
b1873fd
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.
Create a component designed to handle multiple different election tracker layouts.