Skip to content

DSE-332 :: Tag update#181

Open
diogo-filipe-costa wants to merge 3 commits intomainfrom
codex/dse-332-tag-update
Open

DSE-332 :: Tag update#181
diogo-filipe-costa wants to merge 3 commits intomainfrom
codex/dse-332-tag-update

Conversation

@diogo-filipe-costa
Copy link
Contributor

@diogo-filipe-costa diogo-filipe-costa commented Mar 17, 2026

Description

This PR delivers DSE-332 Tag alignment with Figma across the toolkit, React component library, site examples, Storybook, migration/release documentation, and the reusable component workflow prompts used on this branch.

Refreshed on 2026-03-17 by rebasing the current main after #179 landed.
The release scope in this PR is now:

  • @ourfuturehealth/toolkit -> 4.5.0 (tag: toolkit-v4.5.0)
  • @ourfuturehealth/react-components -> 0.4.0 (tag: react-v0.4.0)
  • site/docs changes are included in-repo (no independently versioned release tag)

Ticket: DSE-332

Breaking Changes

  • Tag defaults and naming are now aligned with Figma:
    • .ofh-tag now renders the neutral treatment by default
    • .ofh-tag--grey is deprecated in favour of .ofh-tag--neutral
    • consumers that relied on the old default blue Tag should move to .ofh-tag.ofh-tag--blue
  • Affected usages:
    • toolkit CSS classes and any wrappers that depended on the old default-blue Tag
    • site/docs examples and templates
    • migration docs and consumer guidance

Key Changes

1) Toolkit Tag alignment with Figma

  • Updated Tag styling to match the latest Figma/Jira spec for typography, spacing, border treatment, and semantic colour tokens
  • Changed the base .ofh-tag treatment to neutral instead of blue
  • Added a new ofh-tag--brand modifier
  • Added canonical ofh-tag--neutral naming and kept ofh-tag--grey as a deprecated compatibility alias
  • Moved the previous blue default onto the explicit ofh-tag--blue modifier

2) Site docs, examples, and regression-safe consumer updates

  • Refreshed the toolkit Tag README, design-system Tag page, macro options, examples page, and examples index
  • Removed stale legacy Tag variants from docs/examples (white, aqua-green, purple, pink, orange)
  • Updated the Tag docs and examples to consistently show the supported set: neutral, brand, blue, green, yellow, and red
  • Preserved repo-owned surfaces that depended on the old default-blue appearance, including the beta banner and example callout labels

3) React Tag component with a simpler public API

  • Added a new Tag component to @ourfuturehealth/react-components
  • Exposed a semantic React API built around variant and children, while still mapping to the toolkit Tag classes internally
  • Added Storybook docs and stories for the default interactive Tag, all variants, and usage examples
  • Added unit and accessibility coverage for variant mapping, children rendering, passthrough props, and ref support

4) Release and migration documentation

  • Added changelog entries for the planned toolkit 4.5.0 / react-components 0.4.0 release scope
  • Added migration guidance to UPGRADING.md for:
    • the new neutral default
    • explicit blue usage
    • grey -> neutral replacement
    • React Tag usage with the new semantic API

5) Reusable component workflow prompt updates

  • Added reusable prompt templates for interactive component QA and PR-readiness cleanup
  • Refined the implementation template so future component work treats toolkit/React parity as feature parity, while allowing the React API to prefer simpler semantic props over toolkit class-based APIs

Validation

  • npm test
  • pnpm lint
  • pnpm build
  • pnpm --filter=@ourfuturehealth/react-components run build:storybook
  • Manual QA on local docs/examples and Storybook:
    • neutral default / explicit blue migration path
    • variant coverage for neutral, brand, blue, green, yellow, and red
    • regression checks for example callout labels and unpublished-banner Tag usage
    • React Storybook docs and stories for variant + children

Reviewer Focus

  • Toolkit Tag visual alignment with Figma, especially the new neutral default and brand variant
  • Migration clarity for .ofh-tag, .ofh-tag--blue, .ofh-tag--grey, and .ofh-tag--neutral
  • React Tag API simplicity and capability parity with the toolkit variants
  • Docs/example consistency across toolkit, site, Storybook, changelog, and upgrading guidance
  • Prompt template guidance around feature parity vs React API parity

@netlify
Copy link

netlify bot commented Mar 17, 2026

Deploy Preview for ofh-design-system-docs ready!

Name Link
🔨 Latest commit 380ae8c
🔍 Latest deploy log https://app.netlify.com/projects/ofh-design-system-docs/deploys/69b9965a2e55f9000864c239
😎 Deploy Preview https://deploy-preview-181--ofh-design-system-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the design-system Tag styling and documentation to align with the latest design tokens/variant naming, and introduces a first-party React <Tag /> wrapper that maps to the toolkit modifiers.

Changes:

  • Refresh toolkit Tag styles (neutral-by-default) and introduce the ofh-tag--brand modifier while deprecating ofh-tag--grey in favour of ofh-tag--neutral.
  • Update site examples + design-system docs to reflect the new canonical variants and default behaviour.
  • Add Tag to @ourfuturehealth/react-components with tests and Storybook stories, and document the breaking change in release docs.

Reviewed changes

Copilot reviewed 21 out of 21 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
packages/toolkit/components/tag/_tag.scss Updates Tag base + variant styling tokens; adds brand variant; makes neutral the default styling.
packages/toolkit/components/tag/README.md Updates toolkit Tag usage examples, supported modifiers list, and migration notes.
packages/site/views/examples/components/tag/index.njk Updates example page to show the canonical Tag variants and new default behaviour.
packages/site/views/examples/components/all.njk Keeps the “all components” examples page consistent with updated Tag variants/default.
packages/site/views/design-system/components/tag/macro-options.json Updates Tag macro option docs (required flags + variant guidance).
packages/site/views/design-system/components/tag/index.njk Updates design-system guidance text, deprecation note, and last-updated date.
packages/site/views/design-system/components/tag/default/index.njk Updates default Tag design examples for neutral default and explicit blue usage.
packages/site/views/design-system/components/tag/colours/index.njk Updates the colour-variant table and examples to match the new canonical set.
packages/site/views/_includes/_beta-banner.njk Pins the beta banner Tag to the explicit blue variant to preserve previous appearance.
packages/site/styles/app/_example-callout.scss Adjusts example callout heading styling to preserve contrast/appearance after Tag changes.
packages/react-components/src/index.ts Exposes the new React Tag from the public package entrypoint.
packages/react-components/src/components/Tag/index.ts Barrel export for the React Tag component + types.
packages/react-components/src/components/Tag/Tag.tsx Implements React <Tag /> with a variant API mapping to toolkit modifier classes.
packages/react-components/src/components/Tag/Tag.test.tsx Adds unit + a11y tests for default behaviour, variant mapping, props passthrough, and ref handling.
packages/react-components/src/components/Tag/Tag.stories.tsx Adds Storybook docs/stories for default, all variants, and usage examples.
packages/react-components/README.md Documents React Tag usage and props.
docs/prompts/component-validation-qa-template-prompt.md Adds a manual QA prompt template for component validation.
docs/prompts/component-update-template-prompt.md Expands the component update workflow templates (parity, docs UX, dependencies).
docs/prompts/component-pr-readiness-template-prompt.md Adds a PR-readiness prompt template for final cleanup/release prep.
UPGRADING.md Adds migration guidance for the Tag default change + new naming/variants.
CHANGELOG.md Adds release notes entry describing the Tag changes and new React component.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +20 to +37
export interface TagProps
extends Omit<
React.HTMLAttributes<HTMLElement>,
'children' | 'dangerouslySetInnerHTML' | 'ref'
> {
/**
* Visual style variant.
*/
variant?: TagVariant;
/**
* Tag content.
*/
children: React.ReactNode;
/**
* Ref forwarding for the underlying strong element.
*/
ref?: React.Ref<HTMLElement>;
}
Comment on lines 73 to +78
| Name | Type | Required | Description |
| -----------------|----------|-----------|-------------|
| text | string | Yes | If `html` is set, this is not required. Text to use within the tag component. If `html` is provided, the `text` argument will be ignored. |
| html | string | Yes | If `text` is set, this is not required. HTML to use within the tag component. If `html` is provided, the `text` argument will be ignored. |
| classes | string | No | Optional additional classes to add to the tag. Separate each class with a space. |
| attributes | object | No | HTML attributes (for example data attributes) to add to the tag. |
| text | string | No | Text to use within the tag component. If `html` is provided, the `text` argument will be ignored. |
| html | string | No | HTML to use within the tag component. If `html` is provided, it takes precedence over `text`. |
| classes | string | No | Optional additional classes to add to the tag. Use `ofh-tag--neutral`, `ofh-tag--brand`, `ofh-tag--blue`, `ofh-tag--green`, `ofh-tag--yellow`, or `ofh-tag--red` for the supported colour variants. `ofh-tag--grey` is deprecated. |
| attributes | object | No | HTML attributes (for example data attributes) to add to the tag. |
Comment on lines 3 to +19
{
"name": "text",
"type": "string",
"required": true,
"description": "If `html` is set, this is not required. Text to use within the tag component. If `html` is provided, the `text` argument will be ignored."
"required": false,
"description": "Text to use within the tag component. If `html` is provided, the `text` argument will be ignored."
},
{
"name": "html",
"type": "string",
"required": true,
"description": "If `text` is set, this is not required. HTML to use within the tag component. If `html` is provided, the `text` argument will be ignored."
"required": false,
"description": "HTML to use within the tag component. If `html` is provided, it takes precedence over `text`."
},
{
"name": "classes",
"type": "string",
"required": false,
"description": "Classes to add to the tag."
"description": "Classes to add to the tag. Use `ofh-tag--neutral`, `ofh-tag--brand`, `ofh-tag--blue`, `ofh-tag--green`, `ofh-tag--yellow`, or `ofh-tag--red` for the supported colour variants. `ofh-tag--grey` is deprecated and should be replaced with `ofh-tag--neutral`."
Comment on lines +11 to +25
| [v4.5.0 / React v0.4.0](#upgrading-to-v450--react-v040) | March 2026 | Tag default + naming | 🟡 Medium - Search/replace recommended |
| [v4.3.0 / React v0.2.0](#upgrading-to-v430--react-v020) | March 2026 | Button variant naming | 🟡 Medium - Find/replace required |
| [v4.1.0](#upgrading-to-v410) | February 2026 | Spacing scale indices | 🟡 Medium - Index updates required |
| [v4.0.0](#upgrading-to-v400-monorepo-restructure) | 2025 | Monorepo restructure | 🔴 High - Installation & paths change |

---

## Upgrading to v4.5.0 / React v0.4.0

**Released:** March 2026
**Affected packages:**

- `@ourfuturehealth/toolkit` v4.5.0+
- `@ourfuturehealth/react-components` v0.4.0+

Comment on lines +11 to +38
#### @ourfuturehealth/toolkit 4.5.0 (`toolkit-v4.5.0`)

##### ⚠️ BREAKING CHANGES

- Tag defaults now align with Figma:
- `.ofh-tag` now renders the neutral style by default
- `.ofh-tag--grey` is deprecated in favour of `.ofh-tag--neutral`
- consumers that relied on the old blue default should move to `.ofh-tag.ofh-tag--blue`
- see [Upgrading Guide](UPGRADING.md#upgrading-to-v450--react-v040) for migration steps

##### Added

- New `ofh-tag--brand` modifier aligned with the OFH Tag component in Figma
- Canonical `ofh-tag--neutral` naming for the neutral tag variant

##### Changed

- Updated Tag typography, spacing, and colour tokens to match the current design spec
- Refreshed toolkit Tag documentation, examples, and design-system guidance to use the supported Tag variants
- Preserved docs-site beta banner and example callout styling after the neutral default change

#### @ourfuturehealth/react-components 0.4.0 (`react-v0.4.0`)

##### Added

- New `Tag` component with a semantic React API based on `variant` and `children`
- Storybook coverage for default, variant showcase, and usage-example Tag stories
- Unit and accessibility coverage for variant mapping, children rendering, passthrough props, and ref support
@diogo-filipe-costa diogo-filipe-costa force-pushed the codex/dse-332-tag-update branch from 28aaf7e to 380ae8c Compare March 17, 2026 17:58
@diogo-filipe-costa diogo-filipe-costa marked this pull request as ready for review March 17, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants