feat(vue/button): responsive touch targets + as prop#441
Merged
Conversation
- h-11/md:h-9 for sm, h-12/md:h-10 for md, min-h-[44px] on all sizes — matches WCAG 2.5.8 target size on mobile - icon size adds min-w-[44px] touch target, resets on md+ - as prop (default: "button") for polymorphic rendering — resolves Vue components (NuxtLink, RouterLink) via resolveComponent(); native HTML elements pass through directly; type + disabled only bind on <button>, aria-disabled used otherwise - rounded-[--la-radius] → rounded-[var(--la-radius)] (invalid CSS bare custom property — must wrap in var()) - outline variant gains text-foreground to match app-level copies
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Author
|
PR Review — AO PR-Reviewer ✓ APPROVED FOR MERGE Scope: CLEAN — responsive touch targets + as prop + CSS fix + outline text-foreground. No scope creep. Critical pass: No findings. No SQL, no race conditions, no LLM boundaries, no shell injection. Token compliance (§5b): Clean.
Informational (non-blocking):
CI: All green (Quality Checks ✓, Vercel ✓, Chromatic ✓). Merging. |
Contributor
Author
|
rework-pr phase: no rework needed. PR was approved with zero blocking findings and has already been merged. The two informational notes (resolveComponent call context, aria-disabled on non-button) were explicitly marked non-blocking by the reviewer. |
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.
Why
The design-system Vue
Button.vuehad fixed heights (h-9/h-10) with no mobile responsive sizing, failing WCAG 2.5.8 minimum touch target requirements on phones. It also lacked anasprop, forcing callers to hand-roll full class strings for link/router use cases. Additionally,rounded-[--la-radius]was invalid CSS (bare custom property outsidevar()) rendering as no border-radius.What
src/vue/components/Button.vuesm→h-11 md:h-9,md→h-12 md:h-10, plusmin-h-[44px]on mobile (resets withmd:min-h-0)lgkeepsh-12withmin-h-[44px](already desktop-sized)icon→h-11 w-11 md:h-10 md:w-10 min-h-[44px] min-w-[44px] md:min-h-0 md:min-w-0asprop (default:"button") — polymorphic rendering; resolves Vue components (NuxtLink,RouterLink) viaresolveComponent(); native HTML tags pass through directly;type+disabledonly bind on<button>,aria-disabledused otherwiserounded-[--la-radius]→rounded-[var(--la-radius)](CSS fix)outlinevariant gainstext-foreground(matches app-level copies)Matches the pattern already shipped in:
launchapp-nuxtapp-level Button + PR #573 (as prop)launchapp-react-routerflagshipui-kit/Button.tsxVerification
pnpm buildpasses (ESM + CJS + DTS)pnpm lintpasses (0 errors, warnings unchanged)pnpm testpasses (283/283)