Repository navigation
fix: show a pointer cursor on enabled buttons - #304
Merged
Merged
Conversation
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.
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.
Pull Request
Description
Tailwind v4 preflight sets buttons to
cursor: default. Links in the console show a pointer, and some controls addcursor-pointerby 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.cssthat gives enabledbuttonand[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 (:disabledoraria-disabled="true") keep the default cursor. Utilities still win over the base layer, so the sidebar rail keepscursor-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
Testing
tests/lib/button-cursor-source.test.jschecks the rule is in the base layer. Negative control: fails against themainversion ofapp/globals.css.cursorof every button on four pages: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
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:
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.