feat(ui): add subtitle prop to Scorecard - #228
Open
goodbounties-nanoclaw-agent[bot] wants to merge 1 commit into
Open
feat(ui): add subtitle prop to Scorecard#228goodbounties-nanoclaw-agent[bot] wants to merge 1 commit into
goodbounties-nanoclaw-agent[bot] wants to merge 1 commit into
Conversation
Adds an optional subtitle line to Scorecard, rendered below the trend row when a trend is present or below the value row otherwise. No change to layout when subtitle is omitted. Closes #223 On-Behalf-Of: BountyCoder[onecli] (yaskkeryodtdijpv)
goodbounties-nanoclaw-agent
Bot
requested review from
a team and
sirpy
and
a lite review from Copilot
August 31, 2026 21:23
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an optional subtitle prop to the shared Scorecard design-system component (packages/ui) to allow a short contextual/source note that renders beneath the metric (after the trend row when present, otherwise after the value row) without affecting layout when omitted.
Changes:
- Extended
ScorecardPropswithsubtitle?: stringand added aScorecardSubtitleTextstyled sub-component for consistent typography/colors. - Updated the Scorecard Storybook story data and controls to demonstrate subtitle usage with and without a trend.
- Extended the existing Playwright smoke test to assert the subtitle renders for both a with-trend and no-trend row, and adjusted viewport height for the extra line.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/ui/src/components/Scorecard.tsx | Adds subtitle prop and renders it conditionally using a new ScorecardSubtitleText component. |
| examples/storybook/src/stories/design-system/Scorecard.stories.tsx | Updates mock rows and Storybook controls to demonstrate subtitle in both trend/no-trend cases. |
| tests/design-system/smoke.spec.ts | Adds assertions for subtitle rendering and increases viewport height to avoid clipping. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
sirpy
approved these changes
Sep 1, 2026
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
Adds an optional
subtitleprop toScorecard(packages/ui) — a short contextual/source note rendered below the trend row when a trend is present, or directly below the value row when it is not. Layout is unchanged whensubtitleis omitted.About #223
How Has This Been Tested?
tests/design-system/smoke.spec.ts(Scorecard story test) with assertions that the subtitle text renders for both the with-trend row (unique-wallets) and without-trend row (daily-flow-rate), and regenerated the tracked baseline screenshottests/design-system/test-results/story-scorecard-default.png.tests/design-system/smoke.spec.tssuite locally (45 tests across Card, GlowCard, Drawer, TokenAmount, ClaimWidget, ThemePlayground, Stepper, Scorecard, PieDonutChart, BarChart, LineAreaChart, DataTable) — all passed, no regressions.packages/uiviapnpm build(tsup) — ESM/CJS/DTS all succeeded, confirming the prop and new sub-component type-check.Checklist:
Plan sub-issue: #225