Skip to content

Commit db217f8

Browse files
DSE-335 :: Link family FE update (#200)
* feat: update link family components * fix: preserve right link icon layout * fix: refine link family naming and guidance * docs(prompts): tighten token conformance checks * chore: refresh canonical link-family references * chore(release): prepare link family release * docs(prompts): preserve full Jira keys in PR metadata * fix: address link family review feedback * docs: align link family docs across storybook and site * chore(release): bump link family react version to 0.9.0 * docs(storybook): refine link family stories
1 parent afddabf commit db217f8

File tree

95 files changed

+2200
-482
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+2200
-482
lines changed

CHANGELOG.md

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,43 @@ We are following [Semantic Versioning](https://semver.org/spec/v2.0.0.html), as
66

77
## Monorepo Package Releases (`toolkit-v*`, `react-v*`)
88

9-
### Unreleased
9+
### 2026-04-09
10+
11+
#### @ourfuturehealth/toolkit 4.10.0 (`toolkit-v4.10.0`)
12+
13+
##### Changed
1014

11-
#### @ourfuturehealth/react-components 0.8.0 (`react-v0.8.0`)
15+
- Renamed the public link-family docs, examples, and canonical toolkit component paths to match Figma and Jira terminology:
16+
- `action-link` is now taught as `link-action`
17+
- `back-link` is now taught as `link-icon`
18+
- `skip-link` is now taught as `link-skip`
19+
- Preserved low-risk toolkit compatibility aliases for the previous macro paths and examples while moving docs navigation, examples, and site templates to the canonical names
20+
- Expanded the canonical `link-icon` guidance to cover usage, placement, accessibility notes, and the broader icon-led link pattern instead of only back-navigation
21+
- Aligned link-family spacing, typography, focus, and visible-state token usage with the current Figma spec
22+
23+
#### @ourfuturehealth/react-components 0.9.0 (`react-v0.9.0`)
1224

1325
##### ⚠️ BREAKING CHANGES
1426

1527
- React `Icon` and `Card` icon configuration no longer accept `spritePath`. React icons now always render from bundled toolkit SVG data.
1628

29+
##### Changed
30+
31+
- Reorganized React Storybook so the link family is taught under `Components / Link / ...`
32+
- Expanded `LinkIcon` stories to support the full icon set and an optional icon-colour override while keeping the default icon behaviour aligned with the label colour
33+
- Updated React docs, stories, and tests to use the canonical `LinkAction`, `LinkIcon`, and `LinkSkip` names
34+
35+
##### Added
36+
37+
- First public React release of the link family:
38+
- `LinkAction`
39+
- `LinkIcon`
40+
- `LinkSkip`
41+
1742
##### Fixed
1843

1944
- React icons now render correctly in published-consumer installs by inlining the requested bundled SVG symbol instead of referencing a bundled `data:` sprite URL.
2045

21-
### 2026-04-09
22-
2346
#### @ourfuturehealth/toolkit 4.9.0 (`toolkit-v4.9.0`)
2447

2548
##### ⚠️ BREAKING CHANGES

UPGRADING.md

Lines changed: 46 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This guide provides detailed migration instructions for upgrading between versio
88

99
| Version | Date | Breaking Changes | Migration Complexity |
1010
| ------------------------------------------------------- | ------------- | -------------------------- | ---------------------------------------- |
11-
| [React v0.8.0](#upgrading-to-react-v080) | April 2026 | React `spritePath` removal | 🟢 Low - Remove the deprecated prop |
11+
| [v4.10.0 / React v0.9.0](#upgrading-to-v4100--react-v090) | April 2026 | React `spritePath` removal | 🟢 Low - Remove the deprecated prop and adopt canonical names for new usage |
1212
| [v4.9.0 / React v0.7.0](#upgrading-to-v490--react-v070) | April 2026 | Icon naming sync | 🟡 Medium - Search/replace icon names |
1313
| [v4.8.0 / React v0.6.0](#upgrading-to-v480--react-v060) | March 2026 | No breaking changes | 🟢 Low - only relevant if you adopted the earlier TextInput prototype |
1414
| [v4.7.0 / React v0.5.0](#upgrading-to-v470--react-v050) | March 2026 | Card family realignment | 🟡 Medium - API migration recommended |
@@ -20,55 +20,74 @@ This guide provides detailed migration instructions for upgrading between versio
2020

2121
---
2222

23-
## Upgrading to React v0.8.0
23+
## Upgrading to v4.10.0 / React v0.9.0
2424

2525
**Planned:** April 2026
2626
**Affected packages:**
2727

28-
- `@ourfuturehealth/react-components` v0.8.0+
28+
- `@ourfuturehealth/toolkit` v4.10.0+
29+
- `@ourfuturehealth/react-components` v0.9.0+
2930

3031
### Breaking Changes
3132

3233
`@ourfuturehealth/react-components` removes the `spritePath` prop from the public `Icon` API and from `Card` icon configuration. React icons now always render from bundled toolkit SVG data.
3334

35+
Toolkit macro paths and site routes now teach the canonical names below, while compatibility aliases remain available in this release:
36+
37+
| Preferred toolkit name | Compatibility alias |
38+
| ---------------------- | ------------------- |
39+
| `link-action` | `action-link` |
40+
| `link-icon` | `back-link` |
41+
| `link-skip` | `skip-link` |
42+
43+
### Release Overview
44+
45+
This release introduces the public React link family and aligns the toolkit link-family naming and IA to the current design-system terminology used in Figma and Jira.
46+
47+
- React consumers can adopt the new public `LinkAction`, `LinkIcon`, and `LinkSkip` components directly.
48+
- Toolkit consumers can continue using the old macro paths temporarily, but new usage should move to the canonical names above.
49+
- The canonical docs, examples, and Storybook surfaces now teach `Link action`, `Link icon`, and `Link skip`.
50+
3451
### Migration Steps
3552

36-
1. Remove any `spritePath` prop from `Icon` usage.
37-
2. Remove any `spritePath` field from `Card` icon configuration objects.
38-
3. Re-run visual checks for icon-bearing surfaces such as `Icon`, `Select`, `Card`, and `Checkboxes`.
53+
1. Remove any `spritePath` prop from `Icon` usage and any `spritePath` field from `Card` icon configuration objects.
54+
2. Adopt the new public React `LinkAction`, `LinkIcon`, and `LinkSkip` components where you want React parity for the link family.
55+
3. Prefer the canonical toolkit macro paths and macro names when touching existing templates.
56+
4. Re-run manual QA for keyboard and focus behavior, especially for `LinkSkip`, `LinkIcon`, and any icon-bearing surfaces such as `Icon`, `Select`, and `Card`.
3957

4058
#### React example
4159

42-
**Before:**
60+
**New in `react-v0.9.0`:**
4361

4462
```tsx
45-
<Icon name="Search" spritePath="/assets/icons/icon-sprite.svg" />
46-
47-
<Card
48-
icon={{
49-
name: 'Search',
50-
spritePath: '/assets/icons/icon-sprite.svg',
51-
}}
52-
/>
63+
import {
64+
LinkAction,
65+
LinkIcon,
66+
LinkSkip,
67+
} from '@ourfuturehealth/react-components';
5368
```
5469

55-
**After:**
70+
### Toolkit reminder
5671

57-
```tsx
58-
<Icon name="Search" />
72+
Toolkit/Nunjucks icon consumers are unchanged. They must still serve `icon-sprite.svg` at a public URL, default `/assets/icons/icon-sprite.svg`, or override that URL with `spritePath`.
5973

60-
<Card
61-
icon={{
62-
name: 'Search',
63-
}}
64-
/>
65-
```
74+
#### Toolkit example
6675

67-
If an application previously passed `spritePath` in React, that prop should now be removed.
76+
**Before (`toolkit-v4.9.0`):**
6877

69-
### Toolkit reminder
78+
```njk
79+
{% from "components/action-link/macro.njk" import actionLink %}
80+
{% from "components/back-link/macro.njk" import backLink %}
81+
{% from "components/skip-link/macro.njk" import skipLink %}
82+
```
7083

71-
Toolkit/Nunjucks icon consumers are unchanged. They must still serve `icon-sprite.svg` at a public URL, default `/assets/icons/icon-sprite.svg`, or override that URL with `spritePath`.
84+
**After (`toolkit-v4.10.0`):**
85+
86+
```njk
87+
{% from "components/link-action/macro.njk" import linkAction %}
88+
{% from "components/link-icon/macro.njk" import linkIcon %}
89+
{% from "components/link-skip/macro.njk" import linkSkip %}
90+
```
7291

7392
## Upgrading to v4.9.0 / React v0.7.0
7493

docs/installation/installing-with-npm.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ You can also import toolkit layers individually:
104104

105105
```scss
106106
@import '@ourfuturehealth/toolkit/core/all';
107-
@import '@ourfuturehealth/toolkit/components/action-link/action-link';
107+
@import '@ourfuturehealth/toolkit/components/link-action/link-action';
108108
```
109109

110110
## Importing JavaScript
@@ -138,7 +138,7 @@ import Details from '@ourfuturehealth/toolkit/components/details/details';
138138
import ErrorSummary from '@ourfuturehealth/toolkit/components/error-summary/error-summary';
139139
import Header from '@ourfuturehealth/toolkit/components/header/header';
140140
import Radios from '@ourfuturehealth/toolkit/components/radios/radios';
141-
import SkipLink from '@ourfuturehealth/toolkit/components/skip-link/skip-link';
141+
import LinkSkip from '@ourfuturehealth/toolkit/components/link-skip/link-skip';
142142
import '@ourfuturehealth/toolkit/polyfills';
143143

144144
document.addEventListener('DOMContentLoaded', () => {
@@ -148,7 +148,7 @@ document.addEventListener('DOMContentLoaded', () => {
148148
ErrorSummary();
149149
Header();
150150
Radios();
151-
SkipLink();
151+
LinkSkip();
152152
});
153153
```
154154

docs/prompts/component-pr-readiness-template-prompt.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This prompt assumes the implementation phase already included the main template'
2323
I'm working on the `[ComponentName]` update in this worktree.
2424

2525
Context:
26-
- Ticket: `[JIRA URL or ID]`
26+
- Ticket: `[JIRA URL or ID]` (preserve the full Jira key exactly, for example `DSE-335`, not a shortened `DS-335`)
2727
- Intended base branch: `[origin/main or another branch/PR]`
2828
- Local site/docs server: `[http://localhost:8080]`
2929
- Local Storybook server: `[http://localhost:6006]`
@@ -57,12 +57,16 @@ Workflow I want you to follow:
5757
- explain the reasoning briefly in user-facing terms
5858
- if this branch is expected to be independently releasable, apply the version bump instead of only suggesting it
5959
- if no package version, changelog entry, or migration guidance is updated for an affected releasable package, treat that as a merge-readiness failure and fix it before sign-off
60-
6. Check public API and migration clarity:
60+
6. Check public API, token conformance, and migration clarity:
6161
- confirm deprecated compatibility paths exist only where intended
6262
- confirm toolkit vs React consumer expectations are documented clearly
6363
- confirm Storybook controls policy and prop docs are still coherent after any late changes
6464
- confirm no interactive single-component stories are still relying on raw JSON controls for stable nested props when clearer story-specific controls would be more usable
6565
- confirm no story is exposing controls for values the component visibly ignores or overrides
66+
- do a final token conformance pass for every public surface changed in this review unit, even if the ticket was not framed as a token migration
67+
- verify typography, spacing, icon sizing, and state-color tokens against the Figma token map used during implementation
68+
- do not treat inherited global styles as acceptable by default; confirm whether any inherited `a`, `p`, `ul`, `li`, `h*`, or body styles are intentional
69+
- if the rendered result only matches Figma because of accidental inheritance, treat that as a merge-readiness failure and fix it
6670
- if the component was touched by a spacing/typography token migration, do a final spot-check for same-number static-token substitutions where Figma expected responsive tokens
6771
- do a final spot-check for accidental semantic-element inheritance (`p`, `ul`, `li`, `h*`, `a`) that may have reintroduced wrong spacing or typography
6872
- confirm release/version metadata is internally consistent for every affected releasable package:
@@ -125,6 +129,8 @@ Workflow I want you to follow:
125129
- add a second context paragraph only when it genuinely helps, for example rebases, stacked dependencies, release baseline shifts, or why the branch goes beyond a narrow ticket interpretation
126130
- keep the body review-oriented: explain what changed, why it changed, release impact, and where reviewers should focus
127131
- avoid padding the PR with empty, repetitive, or low-information sections just to match a template
132+
- when linking Jira tickets, preserve the exact key and use the full browse URL, for example `https://ourfuturehealth.atlassian.net/browse/DSE-335`
133+
- never silently shorten or rewrite Jira keys when drafting PR metadata
128134
14. Do not push. Give me the exact `git push` command(s) to run manually.
129135

130136
Important constraints:
@@ -136,6 +142,7 @@ Important constraints:
136142
- Keep toolkit and React parity in scope where that is part of the intended component API.
137143
- If docs/examples are missing what is needed for consumers or reviewers, improve them.
138144
- If release or migration docs are expected for this repo, include them so the PR is review-ready rather than code-only.
145+
- Do not rely on lint, tests, or build checks to prove token correctness; they only confirm mechanical health, not design-token conformance.
139146
- Do not leave temporary dependency stand-ins implicit. Remove them if the real dependency is now available, or document them clearly if they must remain temporarily.
140147
- If the branch depends on another PR landing first, do not force a merge from the wrong base just to satisfy the workflow.
141148
- Leave unrelated modified or untracked files alone unless I explicitly ask you to include them.

docs/prompts/component-update-template-prompt.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,33 @@ Compare Figma ↔ Toolkit ↔ React:
196196
- React API simplification opportunities where toolkit-style class or macro APIs could become clearer semantic props
197197
- Documentation gaps
198198

199+
### 5a. Token Alignment Report (MANDATORY OUTPUT BEFORE IMPLEMENTATION)
200+
201+
Before you change code, produce a short token-alignment report for every public subcomponent or public variant surface being updated.
202+
203+
For each surface, list at minimum:
204+
205+
- typography token(s) used in Figma
206+
- spacing token(s) used in Figma, including icon gaps and invisible hit-area spacing
207+
- icon size token(s) used in Figma
208+
- color tokens used for default, hover, focus, active, disabled, and visited states where applicable
209+
- whether each token is expected to be static or responsive
210+
- the current code primitive used today
211+
- whether that current code primitive is correct, incorrect, or inherited implicitly
212+
213+
Format the report as:
214+
215+
- `aligned`
216+
- `must fix before QA`
217+
- `acceptable inherited behavior`
218+
219+
Rules:
220+
221+
- Do not treat implicit inheritance from global `a`, `p`, `ul`, `li`, `h*`, or page/body styles as aligned unless you explicitly verified that Figma intends the component to inherit that token rather than declare it itself.
222+
- If Figma defines an explicit component typography or spacing token and the implementation only reaches that value by accident through global inheritance, treat that as `must fix before QA`.
223+
- If a component has multiple public surfaces in one review unit, do not stop after auditing only the primary one.
224+
- Do not move to implementation summary or manual QA handoff until every `must fix before QA` item is either fixed or explicitly escalated to the user as intentional follow-up scope.
225+
199226
### 6. Design Token & Pattern Alignment (MANDATORY)
200227

201228
**This step is REQUIRED, not optional. Do not skip even if the JIRA ticket is narrow in scope.**
@@ -223,6 +250,7 @@ Review the entire component implementation against design system standards:
223250
- Hover states change correct properties (color, background, border)
224251
- Active states are visually distinct from focus states
225252
- [ ] **Document design spec vs. code discrepancies** before any implementation
253+
- [ ] **Produce the Token Alignment Report** described above and keep it updated as you implement
226254

227255
**Design Tokens Audit:**
228256

@@ -242,6 +270,9 @@ Review the entire component implementation against design system standards:
242270
- [ ] Audit semantic-element inheritance:
243271
- check whether global `ul > li`, `p`, `h*`, or link styles are adding margins/typography the component did not ask for
244272
- add explicit overrides when Figma requires component-specific spacing or typography
273+
- [ ] Audit inherited state colors:
274+
- check whether focus/active/visited colors are coming from generic global link styling rather than the component spec
275+
- if the first visible state in Figma uses a different token from the default inherited link token, implement that component-level override explicitly
245276
- [ ] Audit shared-primitives inheritance:
246277
- check whether reused primitives such as labels, hints, error messages, form groups, or wrappers are contributing margins, gaps, or typography that compound with the component's own layout rules
247278
- verify the computed browser output, not just the source SCSS intent

docs/prompts/component-validation-qa-template-prompt.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,28 @@ Workflow I want you to follow:
4646
- the exact reason those values are expected, not just a vague design note
4747
- the exact element/class I should inspect in DevTools when visual validation is not enough
4848
- any shared primitive or layout-object classes whose computed margins/gaps should also be inspected because they might still be affecting the rendered result
49-
4. Then walk me through that QA script one step at a time.
50-
5. After each step, stop and wait for my response in the format:
49+
4. Before giving me QA steps, give me a concise agent-side token conformance summary for the review unit:
50+
- each public component surface reviewed
51+
- typography token status
52+
- spacing/icon-gap token status
53+
- state-color token status
54+
- any inherited-style overrides added or still missing
55+
- whether there are any remaining MUST FIX token mismatches
56+
5. Then walk me through that QA script one step at a time.
57+
6. After each step, stop and wait for my response in the format:
5158
- `pass`
5259
- `fail - ...`
5360
- `other - ...`
54-
6. Treat `other` as feedback for refinement, missing demo clarity, missing docs clarity, Storybook demo issues, or follow-up questions.
55-
7. If I report `other` or `fail`, make the necessary code/story/docs refinements, run the required targeted checks, then resume the same QA step.
56-
8. Keep going until all QA steps pass.
57-
9. Once all QA is validated on my side, summarize:
61+
7. Treat `other` as feedback for refinement, missing demo clarity, missing docs clarity, Storybook demo issues, or follow-up questions.
62+
8. If I report `other` or `fail`, make the necessary code/story/docs refinements, run the required targeted checks, then resume the same QA step.
63+
9. Keep going until all QA steps pass.
64+
10. Once all QA is validated on my side, summarize:
5865
- what was validated
5966
- any fixes made during QA
6067
- whether any temporary internal adapter or dependency workaround was introduced during implementation
6168
- any residual risks or follow-ups
6269
- whether the branch is ready for the PR-readiness prompt
63-
10. Do not create final commits or PR text unless I explicitly ask for that in this session.
70+
11. Do not create final commits or PR text unless I explicitly ask for that in this session.
6471

6572
Important constraints:
6673
- Run `npm test` after modifying JavaScript or TypeScript files.
@@ -71,6 +78,7 @@ Important constraints:
7178
- Treat raw JSON controls for stable nested props as implementation misses when the story could reasonably offer clearer text/select/boolean controls instead.
7279
- Treat controls for values the component visibly ignores or overrides as implementation misses to be fixed before QA is considered complete.
7380
- Treat responsive token mismatches or accidental inherited element styles (`p`, `ul`, `li`, `h*`, `a`) as implementation misses to be fixed before QA is considered complete.
81+
- Treat missing explicit component-level typography, spacing, or state-color tokens as implementation misses when the current appearance only works because of inherited global styles.
7482
- Treat spacing or typography contributed by reused shared primitives or layout objects (`label`, `hint`, `error-message`, `fieldset`, `form-group`, list wrappers, etc.) as implementation misses when they make the rendered output diverge from Figma.
7583
- Treat React components that depend on toolkit progressive-enhancement classes such as `.js-enabled` for core interactive behavior as implementation misses to be fixed before QA is considered complete.
7684
- Treat Storybook docs-page examples that share effective IDs or form names across stories and interfere with each other as implementation misses to be fixed before QA is considered complete.

0 commit comments

Comments
 (0)