Skip to content

refactor(web): one name per button, and none painted by hand - #83

Merged
42-v merged 2 commits into
mainfrom
fix/ui-phase-a2
Aug 26, 2026
Merged

refactor(web): one name per button, and none painted by hand#83
42-v merged 2 commits into
mainfrom
fix/ui-phase-a2

Conversation

@42-v

@42-v 42-v commented Aug 26, 2026

Copy link
Copy Markdown
Owner

Two drifts in opposite directions, both in the templates. Phase A items A2 and A4 of the UI plan (#296).

vault42-btn-primary and vault42-btn-secondary were pure @apply forwards onto vault42-btn and vault42-btn-outline — two names for one button, so a reader could not tell whether the difference meant anything. Five call sites across BlobsView and IdentityView used them; they now name the thing directly.

The @utility definitions stay in style.css for now, because that file belongs to the stylesheet pass (B1). This PR is what makes removing them there a deletion rather than a gamble on nobody having typed the old name.

MFAOnboardingView went the other way and wrote the palette out longhand:

w-full px-4 py-3 rounded-lg bg-vault42-primary text-white font-semibold hover:bg-vault42-primary-hover

That is vault42-btn spelled out, minus the disabled:opacity-50 disabled:cursor-not-allowed the utility carries. It looked right, and would have stopped looking right the first time the utility changed without it. The skip link is deliberately left as an anchor, per the plan's do-not list (#298).

The gate reads templates, so the view added next is held too. Both arms are mutation-verified — putting either defect back fails it, naming the file and the class:

BlobsView.vue: uses the retired alias vault42-btn-secondary...
MFAOnboardingView.vue: a <button> paints the button palette inline instead of using vault42-btn...

One correction to the gate itself, worth noting. Its first pattern flagged LanguageSwitcher's dropdown rows, which use bg-vault42-primary/15 to mark the active locale. That is a selection highlight, not a button fill — \b terminates at the slash, so an opacity modifier read as a bare palette utility. The pattern now excludes it. A gate that flags correct markup is worse than no gate.

Verified: 750 web tests pass; pnpm lint clean; coverage unchanged against main at 99.56 / 98.88 / 100 / 99.88.

refactor(web): one name per button, and none painted by hand

42-v added 2 commits August 26, 2026 23:50
Two drifts in opposite directions, both in the templates.

vault42-btn-primary and vault42-btn-secondary were pure @apply forwards onto
vault42-btn and vault42-btn-outline: two names for one button, so a reader could
not tell whether the difference meant anything. Five call sites across two views
used them. The call sites now name the thing directly. The @Utility definitions
stay in style.css for now, because that file belongs to the stylesheet pass;
this is what makes removing them there a deletion rather than a gamble on nobody
having typed the old name.

MFAOnboardingView went the other way and wrote the palette out longhand --
bg-vault42-primary text-white hover:bg-vault42-primary-hover, which is
vault42-btn spelled out, minus the disabled: states it carries. It looked right
and would have stopped looking right the first time the utility changed without
it. Both buttons now use the shared utilities. The skip link is deliberately
left as an anchor.

The gate reads templates, so the view somebody adds next is held too. Both arms
are mutation-verified: putting either defect back fails it, naming which file
and which class.

One correction to the gate itself. Its first pattern flagged LanguageSwitcher's
dropdown rows, which use bg-vault42-primary/15 to mark the active locale. That
is a selection highlight, not a button fill -- \b terminates at the slash, so an
opacity modifier read as a bare palette utility. The pattern now excludes it.

Coverage is unchanged against main at 99.56 / 98.88 / 100 / 99.88; 750 tests
pass; eslint clean.
@42-v
42-v enabled auto-merge (squash) August 26, 2026 21:50
@42-v
42-v force-pushed the fix/ui-phase-a2 branch from cf56676 to e4cb7c2 Compare August 26, 2026 21:50
@42-v
42-v merged commit 1ec17e3 into main Aug 26, 2026
38 checks passed
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.

1 participant