Skip to content

fix: show a pointer cursor on enabled buttons - #304

Merged
cxymds merged 2 commits into
rustfs:mainfrom
joeyshi12:fix/button-pointer-cursor
Nov 14, 2026
Merged

cxymds merged 2 commits into
rustfs:mainfrom
joeyshi12:fix/button-pointer-cursor

Conversation

@joeyshi12

@joeyshi12 joeyshi12 commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request

Description

Tailwind v4 preflight sets buttons to cursor: default. Links in the console show a pointer, and some controls add cursor-pointer by hand (for example the table sort headers), so most buttons such as Edit, Delete, New Policy, pagination and dropdown triggers show the arrow while the sidebar links next to them show a pointer.

This adds one base rule in app/globals.css that gives enabled button and [role="button"] elements a pointer. The shadcn/ui Button docs note the Tailwind v4 change and suggest a global CSS rule like this one to keep the pointer. Since April 2026 shadcn can also add it during project setup (changelog). Disabled buttons (:disabled or aria-disabled="true") keep the default cursor. Utilities still win over the base layer, so the sidebar rail keeps cursor-w-resize.

On the narrow pool-decommission layout, selection-locked pool cards explicitly keep cursor-default, matching the desktop table. Their independent task buttons, including Cancel, retain their own enabled cursor and behavior.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test improvements
  • Security fix

Testing

  • Unit tests added/updated
  • Manual testing completed
pnpm install --frozen-lockfile   # exit 0
pnpm type-check                  # exit 0
pnpm lint                        # exit 0
pnpm format:check                # exit 0
pnpm test:run                    # 1061 passed, 0 failed
  • New tests/lib/button-cursor-source.test.js checks the rule is in the base layer. Negative control: fails against the main version of app/globals.css.
  • Chromium against a local RustFS 1.0.5, computed cursor of every button on four pages:
Page Before (enabled) After (enabled) Disabled, after
Buckets 11 default, 7 pointer 18 pointer none
Bucket objects 10 default, 5 pointer 15 pointer 1 default
Policies 23 default, 3 pointer 26 pointer 4 default
Users 7 default, 7 pointer 14 pointer 6 default

The sidebar rail (w-resize) is unchanged on every page.

The pool-decommission regression test checks the locked-card cursor override while preserving its keyboard guard and independent task-action semantics. A focused 600px browser fixture using the pool-selection markup and real Console Button/CSS confirms: locked card = default cursor, unlocked card = pointer, locked card clicks do not select, keyboard Enter selects when unlocked, and Cancel remains enabled with a pointer. Light and dark themes were checked. The ten CI checks, including the production build, pass for the final head.

Checklist

  • Code follows the project's style guidelines
  • Self-review completed
  • TypeScript types are properly defined
  • All commit messages are in English (Conventional Commits)
  • All existing tests pass
  • No new dependencies added, or they are justified

Related Issues

No linked issue.

Screenshots (if applicable)

Locked pool card before/after at the same viewport and theme. The fixture displays the computed cursor because screenshots do not capture the mouse pointer:

Locked pool card cursor before and after

This is illustrative evidence from a focused markup/CSS fixture with local sample data; it does not execute a real decommission or cancellation.

Additional Notes

Dropdown menu items (role="menuitem") are not included and keep the default cursor, as in shadcn/ui.

joeyshi12 and others added 2 commits November 13, 2026 18:34
Tailwind v4 preflight sets buttons to cursor: default. Links in the console show a pointer, and a few controls add cursor-pointer by hand, so most buttons (Edit, Delete, New Policy, dropdown triggers) showed the arrow while sidebar links showed a pointer. A base rule now gives enabled buttons and role=button elements a pointer. Disabled buttons keep the default cursor, and utilities such as the sidebar rail's cursor-w-resize still take precedence.
Override the global enabled-button cursor while pool selection is locked. Leave independent task actions such as Cancel enabled instead of marking the entire card and its descendants disabled.
@cxymds
cxymds merged commit 2366e2a into rustfs:main Nov 14, 2026
10 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.

2 participants