Skip to content

Show the cursor as a pointer when hovering over buttons - #47

Merged
miaulalala merged 2 commits into
nextcloud:mainfrom
yard-mschwartz:button-cursor-pointer
Sep 2, 2026
Merged

Show the cursor as a pointer when hovering over buttons#47
miaulalala merged 2 commits into
nextcloud:mainfrom
yard-mschwartz:button-cursor-pointer

Conversation

@yard-mschwartz

@yard-mschwartz yard-mschwartz commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

This shows the cursor as a pointer when hovering over buttons.

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Original comment by Claude:

/* Tailwind v4 preflight no longer sets cursor: pointer on buttons; restore it. */

@miaulalala

Copy link
Copy Markdown
Collaborator

@copilot resolve the merge conflicts in this pull request

miaulalala added a commit that referenced this pull request Sep 2, 2026
* chore: add CODEOWNERS so every PR gets a reviewer assigned

Nothing currently requests review automatically, so PRs from outside the repo
sit unnoticed: two community pull requests (#46, #47) have been open since
31 July, and four Dependabot PRs are open against eight vulnerability alerts.

A single fallback owner fixes that. GitHub does not request review from a PR's
own author, so this assigns every PR except Anna's own, which is the intended
behaviour rather than a side effect.

Deliberately a fallback-only file, in the same shape nextcloud/server uses:
one broad rule first, narrower ones added later as the repository grows more
maintainers. Note this only *requests* review; making it blocking would need
"Require review from Code Owners" in the ruleset, which is a separate decision.

AI-Assisted-By: Claude Opus 5 (1M context)
Signed-off-by: Anna Larch <[email protected]>

* Potential fix for pull request finding

AI-Assisted-By: Copilot Autofix powered by AI <[email protected]>
Signed-off-by: Anna <[email protected]>

---------

Signed-off-by: Anna <[email protected]>
@miaulalala
miaulalala force-pushed the button-cursor-pointer branch from 992b415 to 024132f Compare September 2, 2026 19:33
@miaulalala
miaulalala requested a lite review from Copilot September 2, 2026 19:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The [role='button'] selector uses :disabled, which does not apply to non-form elements and can incorrectly show a pointer cursor for aria-disabled buttons.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR restores the “clickable” cursor affordance for interactive controls by reintroducing a global cursor: pointer rule (to compensate for Tailwind v4 preflight no longer doing this by default).

Changes:

  • Adds a @layer base rule to apply cursor: pointer to enabled <button> elements.
  • Extends the rule to [role='button'] elements (with a disabled guard).
File summaries
File Description
app/globals.css Adds a base-layer cursor rule to make enabled buttons display a pointer cursor across the app.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread app/globals.css Outdated
Signed-off-by: Marc Schwartz <[email protected]>
@miaulalala
miaulalala force-pushed the button-cursor-pointer branch from 024132f to 580e12e Compare September 2, 2026 19:47
Copilot's point on nextcloud#47, and it is a fault in the comment I added when rebasing
this, not in Marc's selector.

I wrote that `:not(:disabled)` keeps a disabled control showing the default
cursor. That is only true for real form controls: `:disabled` never matches a
`[role='button']` div, which signals its state with `aria-disabled` instead, so
that half of the selector was a no-op and the comment described behaviour the
rule did not have.

No visible effect today - the app has no `[role='button']` elements and no
`aria-disabled`, and the two genuinely disabled buttons already set
`disabled:cursor-not-allowed` in their own classes, which overrides the base
rule. But a comment that misdescribes its own selector is worse than no
comment, and the first `role='button'` anyone adds would inherit the wrong
affordance.

Both forms are now excluded, including `aria-disabled` on a native button,
which is the pattern for keeping a control focusable but inert.

AI-Assisted-By: Claude Opus 5 (1M context)
Signed-off-by: Anna Larch <[email protected]>
@miaulalala
miaulalala merged commit f887644 into nextcloud:main Sep 2, 2026
2 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.

3 participants