refactor(link): migrate to semantic tokens and shared focus ring#114
Open
joshsadam wants to merge 2 commits into
Open
refactor(link): migrate to semantic tokens and shared focus ring#114joshsadam wants to merge 2 commits into
joshsadam wants to merge 2 commits into
Conversation
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
Contributor
There was a problem hiding this comment.
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_CLASSESto use semantic text/accent/focus/radius tokens andinteractive-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.
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.
What does this PR do and why?
Pathogen::Linkto semantic--pvc-*text, accent, radius, and focus tokens, replacing rawneutral-*/primary-*colours and black/white focus outlines.Closes #92
Screenshots or screen recordings
How to set up and validate locally
bin/setup(or ensure the dev environment is loaded)bin/test test/components/pathogen/link_test.rbpnpm run build:css:checkPR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.