refactor(form): migrate to semantic tokens and shared focus ring - #113
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates Pathogen form control styling (checkboxes, radios, switches, and builder/tag helpers) from raw Tailwind palette classes to semantic --pvc-* design tokens, while standardizing focus rings on --pvc-color-focus. It also updates the design-system docs to reflect the new migration state and refreshes the compiled CSS artifact accordingly.
Changes:
- Replace neutral/primary utility usage in shared form control styles with semantic
--pvc-color-*tokens (including removingdark:bg-neutral-950from everyday controls). - Converge focus-visible outlines (and peer focus outlines for Switch) on
outline-[var(--pvc-color-focus)], updating/expanding tests to enforce this. - Sync design-system documentation and regenerate the CSS build output to match the new class usage.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/lib/pathogen/form_builders/pathogen_form_builder_test.rb | Updates assertions to require semantic focus outline classes and forbid legacy black/white outlines. |
| test/components/pathogen/form/switch_test.rb | Adds coverage ensuring Switch emits semantic surface + focus token classes and no longer emits legacy outline classes. |
| test/components/pathogen/form/radio_button_test.rb | Updates border + focus outline expectations to semantic token forms and forbids legacy focus outline classes. |
| lib/pathogen/styles/form_styles.rb | Migrates shared checkbox helper classes (builder/tag helper path) to semantic tokens and standardized focus ring. |
| docs/lookbook/design_system/02-tokens.md.erb | Updates token migration table to reflect Tabs/Form “Yes” status and Link remaining partial. |
| docs/lookbook/design_system/01-design-contract.md.erb | Updates stated migration status and focus-ring convergence text to match the new Form/Tabs behavior. |
| app/components/pathogen/form/switch_styles.rb | Migrates Switch label, track, checked state, and focus ring styling to semantic tokens. |
| app/components/pathogen/form/form_styles.rb | Migrates shared control base + label/help text styling to semantic tokens and shared focus ring. |
| app/assets/stylesheets/pathogen_view_components.css | Regenerates compiled CSS output to reflect class/token changes and removed legacy utilities. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ksierks
reviewed
Jul 13, 2026
…ring Form checkboxes, radios, switches, and form-builder checkbox styling now use --pvc-* surface, border, text, accent, and focus tokens instead of raw neutral/primary utilities and black/white focus outlines. Closes #90
Replace separate checkbox, radio, switch, and required-field preview groups with one design-contract overview covering fieldsets, control states, table selection, radio groups, switches, external labels, and required markers.
joshsadam
force-pushed
the
refactor/form-semantic-tokens
branch
from
July 13, 2026 14:21
36d11c3 to
9879501
Compare
ksierks
approved these changes
Jul 13, 2026
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::Formcheckbox, radio, and switch styling to semantic--pvc-*tokens, replacing rawneutral-*surfaces and black/white focus outlines with--pvc-color-surfaceand--pvc-color-focus.Closes #90
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/form/ test/lib/pathogen/form_builders/pathogen_form_builder_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.