gitdiagram
gitdiagram copied to clipboard
fix(button): update disabled state styles to include cursor behavior
Changes
- Updated disabled button state to show
cursor-not-allowedinstead of blocking all pointer events - Maintained visual opacity feedback (50%) for disabled state
- Preserved SVG pointer event blocking for consistent behavior
Before
disabled:pointer-events-none disabled:opacity-50
After
disabled:cursor-not-allowed disabled:opacity-50
Why
This change improves the user experience by:
- ✨ Providing better visual feedback through cursor indication
- 🎯 Maintaining hover state visibility while preventing interactions
- 🔍 Making the disabled state more intuitive and user-friendly
- 🎨 Following established UI/UX patterns for disabled elements
Testing
- [✅] Verified disabled button shows not-allowed cursor on hover
- [✅] Confirmed clicks are still prevented on disabled state
- [✅] Tested across all button variants
Screenshots
Related Issues
Closes #45
Can confirm reverting #31727 ( and #31804 ) fixes the problem
- What's the last key you pressed before Nvim exits?
- Can you reproduce this problem when suspending Nvim using CTRL-Z as well?
What's the last key you pressed before Nvim exits?
- Can you reproduce this problem when suspending Nvim using CTRL-Z as well?
- The last key pressed is enter
- CTRL-Z does not seem to cause the problem
Hmm, that means the release event actually came from the key before the Enter key, because the Enter key does not emit a release event.
A solution I can think of is to send a request to the terminal after disabling kitty keyboard protocol, and only stop reading from stdin when the response to that request is received. That'll make the code a bit complicated, though.
Confirming the same issue on Ubuntu 24.04.1 LTS:
NVIM Version
- NVIM v0.11.0-dev-1515+g7c00e0efbb
- Build type: RelWithDebInfo
- LuaJIT 2.1.1734355927
OS
- Ubuntu 24.04.1
Terminal
- iTerm2 Build 3.5.11
A solution I can think of is to send a request to the terminal after disabling kitty keyboard protocol, and only stop reading from stdin when the response to that request is received. That'll make the code a bit complicated, though.
Ah, this is one of the recommended solutions in https://github.com/kovidgoyal/kitty/issues/8200#issuecomment-2572737815:
- After disabling key reporting send <ESC>[c to terminal and wait for terminal to respond. When you get the response you are guaranteed no more release events will some.
Doing this isn't easy because of the event loop (especially when suspending). And the other solution is to just disable release events.
And the other solution is to just disable release events.
I think realistically we will (temporarily) do this before any 0.11 release anyway to give terminals time to catch up with the other issues this has unearthed. So we have some time to solve this.
But longer term I think yours/Kovid's suggestion makes sense.
Also getting this. debian + iterm2.
https://github.com/neovim/neovim/pull/31804
^
git clone https://github.com/neovim/neovim.git cd neovim git fetch origin pull/31804/head:fix-tty-restore git checkout fix-tty-restore make CMAKE_BUILD_TYPE=Release sudo make install
I still get it with this though. I'm not even sure what's going on.
Disabled for the 0.11 release, will revisit during the 0.12 dev cycle.
- Can you reproduce this problem when suspending Nvim using CTRL-Z as well?
After upgrading to NVIM v0.11.0, suspending nvim twice in a row leaves trailing escape sequences in kitty:
$ kitty --config NONE --dump-commands -o shell_integration=disabled bash
$ nvim --clean
^Z
[1]+ Stopped nvim --clean
$ fg
nvim --clean
^Z
[1]+ Stopped nvim --clean
$ ;35;125;1015;1875t
Any input after the resume makes the issue no longer reproducible.
And these are the differences between suspends as shown by kitty:
1a2,4
> screen_set_mode 2031 1
> screen_set_mode 2048 1
> screen_push_key_encoding_flags 1
30a34,35
> draw $
> screen_bell
Not related to this issue. Please create a new one.
@tomushkin See https://github.com/neovim/neovim/issues/32769