Repository navigation
fix(ui): pointer affordance for Checkbox and Toggle (#594 base family) - #646
Merged
Merged
Conversation
Audit of the Base primitives/ui/layout family (issue #594, family 1), with only verified, behavior-preserving changes: - Checkbox: the clickable label was always `cursor-pointer`, including when the input is disabled. The label now switches to `cursor-not-allowed` and the forwarded `disabled` state is explicit instead of riding in rest props. - Toggle: Skeleton's Switch sets neither pointer nor discipline for the enabled state (only the global `:disabled` rule). The control and label now declare `cursor-pointer` when enabled and `cursor-not-allowed` when disabled. - Alert: indentation of the existing preset comment (no behavior change). The rest of the family was audited and left unchanged: Badge/Alert/Card already compute their Skeleton preset inline, Input/Select/Textarea keep their reused SSR-id/aria derivations, Table/Seo keep their multi-use derived state, ThemeToggle and Navbar keep the shared Button (#591), and Footer/AuthLayout/ PageHeader have no non-native actionable control. Tests: new jsdom regression for the enabled/disabled class contract of both controls. Real generated Base app (desktop 1280 and mobile 390, computed style): checkbox/toggle/theme-toggle enabled = pointer, disabled = not-allowed, disabled input inert. Repo suite, lint, typecheck, build:all and `test-scaffold.sh base` pass. Refs #594 (family 1 of the audit; remaining families stay open).
Merged
This was referenced Oct 24, 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.
Family 1 — Base primitives, UI and layouts (#594)
First independently reviewable slice of the #594 audit (the issue asks for per-family PRs, not one mass rewrite). Scope: the 16 files under
packages/svforge/templates/base/src/lib/components/svforge/{primitives,ui,layout}. Base route/reference screens and the addon families remain for later PRs.Per-file disposition
primitives/Badge.sveltebadge+ preset computed inline; unchangedprimitives/Checkbox.sveltedisabledexplicitly forwardedprimitives/Input.svelteprimitives/Select.svelteprimitives/Textarea.svelteprimitives/Toggle.svelteSwitchcontrol + labelui/Alert.sveltecard+ tonal preset); comment indentation fixed onlyui/Card.svelteui/Logo.svelteui/Seo.svelteui/Table.svelteui/ThemeToggle.svelteButtonpointer policy (#591); unchangedlayout/Navbar.svelteButton+ native anchors; unchangedlayout/Footer.sveltelayout/AuthLayout.svelteThemeToggleonly; unchangedlayout/PageHeader.svelteNo custom CSS was added; no
<style>blocks exist in this family. No derived state was inlined where it is reused (Input/Select/Textarea ids, Seo, Table).Pointer contract (#594)
Buttonalready owns the enabled/disabled cursor (fix(ui): show pointer cursor on navbar theme toggle #591).Checkbox: the wrapping<label>(the click target) no longer advertises clickability when the input is disabled.Toggle: Skeleton v5'sSwitchsets no pointer affordance; the control and its label now declare both states.Verified on a real generated Base app (built, preview): computed
cursoron desktop 1280 and mobile 390 →Checks
bun run test(whole repo),bun run lint,bun run typecheck,bun run build:all,node scripts/check-generated.mjs— pass.tests/primitives-cursor-affordance.test.ts(enabled/disabled class contract for both controls; jsdom cannot compute the Tailwind stylesheet, the real-app run above covers the computed style).bash scripts/test-scaffold.sh base— pass (build, svelte-check, design check, generated lint, tests).svforge: patch);packages/svforge/src/templates.tsregenerated through prebuild; Graphify updated.Remaining (#594 stays open)
#593remains the dedicated shared-Buttonderivation cleanup; not touched here.Refs #594 (family 1).