Skip to content

refactor(link): migrate to semantic tokens and shared focus ring#114

Open
joshsadam wants to merge 2 commits into
mainfrom
refactor/link-semantic-tokens
Open

refactor(link): migrate to semantic tokens and shared focus ring#114
joshsadam wants to merge 2 commits into
mainfrom
refactor/link-semantic-tokens

Conversation

@joshsadam

@joshsadam joshsadam commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

What does this PR do and why?

  • Migrates Pathogen::Link to semantic --pvc-* text, accent, radius, and focus tokens, replacing raw neutral-* / primary-* colours and black/white focus outlines.
  • Consolidates Link Lookbook previews into a single overview page and updates design-system migration docs.

Closes #92

Screenshots or screen recordings

  • N/A (token migration; hover and focus changes are subtle in light/dark)

How to set up and validate locally

  1. bin/setup (or ensure the dev environment is loaded)
  2. bin/test test/components/pathogen/link_test.rb
  3. pnpm run build:css:check
  4. Open the Link overview preview in Lookbook and verify hover and focus in light and dark mode

PR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Pathogen::Link now uses --pvc-color-text, --pvc-color-accent-strong on hover,
--pvc-radius-action, and --pvc-color-focus instead of raw neutral/primary
utilities and black/white focus outlines.

Closes #92

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR migrates Pathogen::Link styling away from raw neutral-* / primary-* utilities to the design-system’s semantic --pvc-* tokens, aligning Link’s hover and focus behavior with the shared design contract used by other components.

Changes:

  • Refactors Pathogen::Link::LINK_CLASSES to use semantic text/accent/focus/radius tokens and interactive-hover:* utilities.
  • Updates component tests to assert semantic token classes and to prevent regressions to black/white focus outlines.
  • Updates design-system documentation to reflect Link’s migration status and token usage.

Reviewed changes

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

Show a summary per file
File Description
test/components/pathogen/link_test.rb Updates assertions to check semantic token-based text and focus outline classes.
docs/lookbook/design_system/02-tokens.md.erb Marks Link as using tokenized radius (--pvc-radius-action) in the tokens table.
docs/lookbook/design_system/01-design-contract.md.erb Updates migration-state and focus guidance text to include Link as migrated.
app/components/pathogen/link.rb Replaces raw palette utilities with semantic --pvc-* tokens and shared focus ring styling.
app/assets/stylesheets/pathogen_view_components.css Updates compiled CSS output to reflect the new semantic/interactive-hover classes and remove now-unused utilities.

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

Replace sparse default, external_link, and tooltip previews with one
design-contract overview covering inline navigation, detail links,
external hosts, tooltips, link-vs-button guidance, and focus patterns.
@joshsadam joshsadam self-assigned this Jul 10, 2026
@joshsadam joshsadam requested a review from ksierks July 10, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(link): migrate to semantic tokens and shared focus ring

2 participants