feat(OneDataCollection): let secondary actions show a counter - #5249
Conversation
A secondary action that concerns a set of items — "3 to review", "5 to approve" — could name the count only in its label, which reads as a sentence rather than a button. F0Button already renders a counter to the right of its label; this threads `counterValue` through the collection's secondary-action descriptor to it, so the count sits in a pill beside the label. Collapsed into the overflow menu the value is ignored, as menu items have no counter slot.
🔍 Review policy: FeatureThe PR title starts with Required approvals
How this was decided
Policy source: |
✅ No New Circular DependenciesNo new circular dependencies detected. Current count: 0 |
🔍 Visual review for your branch is published 🔍Here are the links to: |
📦 Alpha Package Version PublishedUse Use |
✅ No breaking public API changesNo public exports were removed, renamed, or had existing props/types changed in a breaking way compared to Comparing
|
♿ Accessibility (axe) — components changed in this PR6 issues across 3 stories — all non-blocking (
Scope: only stories in the files/component folders this PR changed. It can't yet flag downstream ripple from shared-code/token changes, or diff against |
Coverage Report for packages/react
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||
✅ No untranslated copy addedEvery user-visible string in this PR comes from the i18n layer. Codebase total unchanged at 133. |
✅ Storybook docs — no pages lostEvery page reachable on Links point at this PR's Storybook build — browse the full Storybook. Snapshot of the Storybook index (docs pages + stories) compared against |
What
Lets a
OneDataCollectionsecondary action carry a counter, rendered on its button.Changes
SecondaryActionItemgains an optionalcounterValue?: number.CollectionActionsforwards it to the action'sF0Button.Tests
CollectionActions.test.tsx— assertscounterValuereaches the rendered button.Note
Additive; existing callers unaffected. How that counter looks is the paired
F0ButtonPR #5225.