feat: add single-donut Binary story and story tests for donut-binary - #906
Open
c-lamoureux wants to merge 2 commits into
Open
feat: add single-donut Binary story and story tests for donut-binary#906c-lamoureux wants to merge 2 commits into
c-lamoureux wants to merge 2 commits into
Conversation
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.
Description
Follow-up from reviewing #888:
Binarystory alongside the existing two-chartBooleanexample: a single<Donut isBoolean>using the normal (default) categorical color scheme, matching the design mock (88.3% "Satisfied", pinkcategorical-600primary). Proves the secondary-gray override in feat: s2 donut binary #888 works standalone, without requiring a second donut or explicit color overrides.DonutBinary.test.tsx, following the existingDonut.test.tsxpattern (render the story, assert on rendered marks/text), covering:Boolean: each chart's primary segment keeps its explicit color; secondary segment is forced tosecondary-grayin both charts.Binary: primary segment renders via the normal color scale; secondary segment is still forced tosecondary-gray; center-hole value and label render correctly.Notes
isBoolean's summary value format is hardcoded to.0%(0 decimals) indonutSummaryUtils.ts, so0.883renders as88%, not88.3%as in the design mock. TheBinarytest asserts the actual current behavior (88%). This predates this PR (and feat: s2 donut binary #888) and isn't fixed here — separate fromnumberFormat, which is already threaded through for the non-boolean summary path but not the boolean one. Worth a follow-up issue.How Has This Been Tested?
yarn test --testPathPattern="DonutBinary"— 6/6 passingDonut/Features/BinaryandBoolean)