Skip to content

feat(webkit): switch contrast, concentric radius & theme-stable handle - #799

Merged
robsongajunior merged 6 commits into
mainfrom
feat/switch-design-enhancements
Jul 28, 2026
Merged

feat(webkit): switch contrast, concentric radius & theme-stable handle#799
robsongajunior merged 6 commits into
mainfrom
feat/switch-design-enhancements

Conversation

@gabriel-lisboa-azion

Copy link
Copy Markdown
Collaborator

Summary

Design enhancements to the Switch component (inputs/switch), addressing a dark-mode contrast bug and aligning shape with the token system.

  • Dark-mode contrast fix (checked state). The on-state handle previously used --bg-canvas and the lock icon --accent-contrast; in dark mode both resolved to black, so the lock icon (and the knob itself) had no contrast. The checked handle now uses --color-base-white and the lock icon --color-base-black — theme-independent base primitives, so the white knob + black lock stay fixed and legible in both light and dark.
  • Checked track color moved to --accent (was the stale --success-contrast green).
  • Shape / concentric radius. Track uses rounded-[var(--shape-elements)] (6px); handle uses rounded-[var(--radius)] (4px), concentric with the track (6px track − px-0.5 2px inset).
  • Spec updated (.specs/switch.md): Tokens table + Theme gaps reflect the above; body checksum recomputed.

Notes

  • No public API change — props, events, slots, and exports are unchanged (not breaking).
  • The two theme-independent colors are intentional base primitives; a follow-up TODO is recorded in the spec's Theme gaps to promote them to semantic --fg-handle-on tokens.
  • Verified: validate-spec-compliance, validate-tokens, ESLint, and vue-tsc type-check all pass. Full Storybook build not run locally.

robsongajunior
robsongajunior previously approved these changes Jul 26, 2026
@robsongajunior
robsongajunior enabled auto-merge (squash) July 26, 2026 01:49
@robsongajunior robsongajunior changed the title [NO-ISSUE] feat(webkit): switch contrast, concentric radius & theme-stable handle feat(webkit): switch contrast, concentric radius & theme-stable handle Jul 27, 2026
@robsongajunior
robsongajunior disabled auto-merge July 27, 2026 18:21
isaquebock
isaquebock previously approved these changes Jul 27, 2026
The Switch redesign (concentric radius via --shape-elements / --radius,
--accent checked track, theme-stable white handle with a black lock icon)
intentionally changes pixels, so 34 baselines across Switch, FieldSwitch,
FieldSwitchBlock and FieldTextSwitch no longer matched.

Regenerated on ubuntu-latest via the Storybook Regenerate Baseline workflow
(run 30360280255, full 6-mode matrix: 34 updated, 1868 unchanged) and taken
from the visual-baselines-linux artifact — never generated on macOS, since
linux/ is the CI contract.
@robsongajunior
robsongajunior merged commit f9bcc4c into main Jul 28, 2026
23 checks passed
isaquebock added a commit that referenced this pull request Jul 28, 2026
The input now stretches to the wrapper height (h-full/self-stretch), which
shifts the text line box by a sub-pixel amount in InputText and in FieldText,
which composes it. Visually identical, but 56 snapshots no longer match.

Regenerated on ubuntu-latest via the Storybook Regenerate Baseline workflow
(run 30384502790, full matrix) and taken from the visual-baselines-linux
artifact — linux/ is the CI contract, never generated on macOS. Only the
snapshots CI reported as failing were taken; Switch baselines in the same
artifact predate #799 and were deliberately left untouched.
robsongajunior added a commit that referenced this pull request Jul 28, 2026
* fix: [InputText] extend clickable area (ENG-46736)

* fix: extend InputText clickable area to full field (ENG-46736)

Add h-full + self-stretch to the inner <input> so it fills the wrapper
vertically. Before this fix the input was auto-sized while the <span>
wrapper set the row height, leaving a dead band above and below the
placeholder line where clicks hit the wrapper without focusing the field.

Refs: ENG-46736

* test: drop ENG-46736 tag and inline comments from clickable area block

* fix: [ENG-46736] focus the InputText field from padding and icon areas

* fix: [ENG-46736] restore the InputText vertical stretch lost in the main merge

* refactor: [ENG-46736] drop redundant comments from InputText focus delegation

* test: [ENG-46736] regenerate InputText and FieldText visual baselines

The input now stretches to the wrapper height (h-full/self-stretch), which
shifts the text line box by a sub-pixel amount in InputText and in FieldText,
which composes it. Visually identical, but 56 snapshots no longer match.

Regenerated on ubuntu-latest via the Storybook Regenerate Baseline workflow
(run 30384502790, full matrix) and taken from the visual-baselines-linux
artifact — linux/ is the CI contract, never generated on macOS. Only the
snapshots CI reported as failing were taken; Switch baselines in the same
artifact predate #799 and were deliberately left untouched.

* test: [ENG-46736] regenerate LogView mobile visual baselines

LogViewHeader embeds InputText for the "Find in Logs" field, so the same
sub-pixel line-box shift reaches LogView; in the mobile modes it crosses the
1% threshold. Same artifact as the InputText/FieldText baselines (run
30384502790, ubuntu-latest).

---------

Co-authored-by: ROBSON.JUNIOR <robsongajunior@users.noreply.github.com>
@robsongajunior
robsongajunior deleted the feat/switch-design-enhancements branch July 28, 2026 22:12
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.

5 participants