Commit dbd4809
fix(ui): add cursor pointer to buttons and link-buttons (#136)
## Summary
Every interactive control in `ui/src` is a native `<button>` (this
includes tab headers, icon buttons, and buttons styled to look like
links) - Tailwind v3+ dropped the preflight `cursor: pointer` reset for
buttons, so they were all falling back to the browser's default arrow
cursor on hover.
## Approach
Global rule, not per-component: one addition to `ui/src/style.css`'s
`@layer base`:
```css
button:not(:disabled) {
cursor: pointer;
}
```
`:not(:disabled)` keeps disabled buttons on the existing
`disabled:cursor-not-allowed` Tailwind utility already present on the
shared button-class constants (`primaryButtonClasses` / `secondaryBtn` /
`destructiveBtn` etc. across `AccountList.vue`, `SourceTable.vue`,
`Restore.vue`, `About.vue`, `Activity.vue`, `SetupWizard.vue`, ...) -
both layers cascade correctly since Tailwind's `utilities` layer always
wins over `base` regardless of source order/specificity.
No per-component changes were needed: a full sweep of `ui/src` found no
`@click` handlers, `role="button"`, or `tabindex` outside of native
`<button>` elements, and the app's only other clickable-looking control
(`RouterLink`, which renders `<a href>`) already gets a pointer cursor
from the browser's default UA stylesheet. `<select>` and checkbox/toggle
inputs were left alone - out of scope (native controls, not reported).
## Verification
- `pnpm -C ui lint` - clean (only pre-existing i18n unused-key warnings,
0 errors)
- `pnpm -C ui test:unit` - 264/265 passing; `router-first-run.test.ts`'s
"lands a fresh install on the setup wizard" case timed out under
full-suite load but passes cleanly in isolation (pre-existing flake,
unrelated to a CSS-only change)
- `pnpm -C ui build` (`vue-tsc --noEmit && vite build`) - clean;
confirmed compiled CSS contains `button:not(:disabled){cursor:pointer}`
- Ran the real dev server and drove it via `claude-in-chrome`, checking
`getComputedStyle(...).cursor` on every `<button>` across Activity,
About, Restore, and Setup Wizard: every enabled button reports
`pointer`, every disabled button keeps its prior cursor (`not-allowed`
via the existing utility, or the browser's disabled `default` where no
utility applies) - zero regressions, zero visual changes beyond the
cursor.
Refs #34
---
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QZQVP2tUuTLh8oL31D8heC1 parent 232fd8f commit dbd4809
1 file changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
57 | 69 | | |
0 commit comments