Skip to content

Conversation

@sebkur
Copy link
Contributor

@sebkur sebkur commented Oct 14, 2025

📝 Summary

Unlike other clickable items in the UI, the button does not have the cursor-pointer CSS class. As a result hovering buttons in various places does not change the cursor from arrow to pointer.

🔍 Description of Changes

I added the cursor-pointer CSS class to the Button component

📋 Checklist

  • I have read the contributor guidelines.
  • For large changes, or changes that affect the public API: this change was discussed or approved through an issue, on Discord, or the community discussions (Please provide a link if applicable).
  • I have added tests for the changes made.
  • I have run the code and verified that it works as expected.

@vercel
Copy link

vercel bot commented Oct 14, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
marimo-docs Ready Ready Preview Comment Oct 17, 2025 9:58am

@github-actions
Copy link

github-actions bot commented Oct 14, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@sebkur
Copy link
Contributor Author

sebkur commented Oct 14, 2025

I have read the CLA Document and I hereby sign the CLA

@sebkur
Copy link
Contributor Author

sebkur commented Oct 14, 2025

I stumbled upon this in the tree view where the toolbar icons don't behave like most other buttons all across the UI. I did not check all possible places where Button is used, but can confirm that it works on the toolbar there and also for example on the scratchpad.

@Light2Dark
Copy link
Contributor

This is pretty opinionated, so I'm not sure what the 'right' default is. But it makes sense to me, would love to get others' thoughts too.

A better change is to do this in tailwind so it applies to all buttons: https://tailwindcss.com/docs/upgrade-guide#buttons-use-the-default-cursor. Probably in globals.css

@mscolnick
Copy link
Contributor

I'd prefer the tailwind default (it is similar how the OS works as well).

Im am going to close, but feel free to keep the discussion going @sebkur if you have strong opinions. Regardless, we appreciate the contribution!

@mscolnick mscolnick closed this Oct 15, 2025
@sebkur
Copy link
Contributor Author

sebkur commented Oct 15, 2025

OK, I'd appreciate to understand this. If I get it right, adding the pointer cursor in more places is kind of the wrong direction. Instead for consistency the buttons that do already have a pointer cursor should be changed to show the regular arrow pointer? Is this kind of consistency desired?

I'm attaching a short video that shows the pointer cursor on some UI elements that I think could then be changed to arrow:

marimo-pointer.mp4

@mscolnick
Copy link
Contributor

@sebkur thats a good callout. I can let some folks on the team have input

@mscolnick mscolnick reopened this Oct 15, 2025
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

const buttonVariants = cva(
cn(
"disabled:opacity-50 disabled:pointer-events-none",
"disabled:opacity-50 disabled:pointer-events-none cursor-pointer",
Copy link

Choose a reason for hiding this comment

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

Bug: Disabled Buttons Show Incorrect Cursor

The cursor-pointer class is applied to all buttons, including disabled ones. This causes disabled buttons to display a pointer cursor, which is misleading UX since disabled:pointer-events-none prevents interaction.

Fix in Cursor Fix in Web

Copy link
Contributor

Choose a reason for hiding this comment

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

The cursor comment is a good point. Disabled buttons shouldn't show a cursor pointer.

@Light2Dark
Copy link
Contributor

@sebkur , We agreed this would be a good change to make. We should use the tailwind solution instead.

Unlike many other clickable items in the UI, some buttons do not change the
cursor from default (arrow) to pointer on hover. In accordance with the
Tailwind Upgrade Guide from v3 to v4
(see https://tailwindcss.com/docs/upgrade-guide#buttons-use-the-default-cursor),
apply a rule in the base layer for all non-disabled buttons to use the
pointer cursor.

Some buttons across the code base also had CSS class 'cursor-pointer'
applied explicitly, which is now no longer needed and have been removed.
@sebkur
Copy link
Contributor Author

sebkur commented Oct 17, 2025

Alright, thanks @Light2Dark! I applied that solution from the Tailwind upgrade guide now. I searched for buttons that got the cursor-pointer class applied explicitly and removed it there as it is now no longer necessary to apply the same style on top of the globally applied style.

<button
className={cn(
"flex items-center p-2 text-sm mx-px shadow-inset font-mono cursor-pointer rounded",
"flex items-center p-2 text-sm mx-px shadow-inset font-mono rounded",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here, the sidebar is a good example, it no longer needs cursor-pointer here now.

Copy link
Contributor

@mscolnick mscolnick left a comment

Choose a reason for hiding this comment

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

thank you @sebkur!

@mscolnick mscolnick merged commit 2f6365d into marimo-team:main Oct 17, 2025
22 checks passed
@dmadisetti dmadisetti added the enhancement New feature or request label Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants