Skip to content

feat: s2 donut binary - #888

Draft
madelineluke wants to merge 1 commit into
mainfrom
feat/donut-binary-secondary-color-labels
Draft

feat: s2 donut binary#888
madelineluke wants to merge 1 commit into
mainfrom
feat/donut-binary-secondary-color-labels

Conversation

@madelineluke

@madelineluke madelineluke commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Description

Forces the non-primary segment of a boolean (isBoolean) donut to always render chart.donut.color.secondary-gray (#C6C6C6), regardless of the categorical color scale/domain - matching the same fixed-token precedent already used for the empty-state ring. Adds a new non-pre-alpha Donut/Features Storybook location (stories/Donut/Features/DonutBinary.story.tsx) for upcoming s2 donut feature work. Revises planning/specs/donut/donut-binary.json: drops the "primary-only SegmentLabel" requirement after confirming the design skill's "only the primary segment is labeled" note refers to the existing center-hole DonutSummary value, not the outside-ring SegmentLabel component (which remains intentionally suppressed for binary donuts).

Related Issue

Implements planning/specs/donut/donut-binary.json - first (smallest/no-dependency) spec in the planning/specs/donut/ s2 donut feature series. No GitHub issue tracked.

Motivation and Context

The 2-segment (isBoolean) donut's secondary segment currently renders via the normal categorical color scale instead of the fixed design token, so consumers had to manually pass a gray color as a workaround.

How Has This Been Tested?

  • yarn test --testPathPattern="vega-spec-builder-s2/src/donut" - 57/57 passing
  • yarn test --testPathPattern="react-spectrum-charts-s2" - 491/491 passing
  • yarn lint - clean
  • yarn tsc --noEmit - no new errors (pre-existing unrelated errors confirmed present on main)
  • Verified visually in Storybook (Donut/Features/Binary) that the secondary segment renders gray regardless of data order/color domain

Screenshots (if appropriate):

N/A - verified in Storybook, see test plan above.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

…ry segment

The isBoolean (2-segment) donut always rendered its secondary arc via
the normal categorical color scale instead of the fixed
chart.donut.color.secondary-gray token the design requires, so
consumers had to manually pass a gray color as a workaround. The
secondary segment now always resolves to secondary-gray, matching the
same fixed-token precedent already used for the empty-state ring.

Revised the donut-binary spec after confirming the skill's "only the
primary segment is labeled" note describes the existing center-hole
DonutSummary value, not the outside-ring SegmentLabel component -
SegmentLabel remains intentionally suppressed for binary donuts.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

@madelineluke
madelineluke marked this pull request as draft August 19, 2026 19:35
@madelineluke madelineluke changed the title Donut Binary — force secondary segment to secondary-gray feat: s2 donut binary Aug 19, 2026
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.

1 participant