zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
34.48k stars 1.71k forks source link

Add col/row resize cursor styles #11406

Closed smirzaei closed 1 week ago

smirzaei commented 1 week ago

This PR fixes a small issue I noticed with resize cursors. The column/row resize cursors were missing and in a few places we were using ew-resize and ns-resize even though the documentation mentions col-resize and row-resize.

Finally updated the panes in the workspace to use the new column/row resize cursors.

Before: Screenshot_20240505_111515 Screenshot_20240505_111521

After: Screenshot_20240505_110606 Screenshot_20240505_110611

Release Notes:

mikayla-maki commented 1 week ago

Nice catch, thank you!

apricotbucket28 commented 1 week ago

These don't seem to be the correct cursor styles to use in those places, VSCode for reference: image image

mikayla-maki commented 1 week ago

On macOS we use the row/colum style and in cases like these, I'd err on the side of visual consistency over perfect conformance with VSCode. But if there's a good semantic argument the other way I'd hear it @apricotbucket28

apricotbucket28 commented 1 week ago

According to https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#keyword, both should be fine. I do think they look a bit weird in Zed. Maybe old? Could be personal preference.

Resizing a window: image

Table in LibreOffice image

Table in Google Docs image

ProtonMail image

mikayla-maki commented 1 week ago

hmmm, that's a little tricky isn't it?

I guess it seems like the linux platform convention is closer to using the other style of cursor though, judging off of the 'resize window' icon, so maybe let's fix forward and swap back to the original ew/ns-resize?

smirzaei commented 1 week ago

Yeah I agree. I don't see a lot of difference, most importantly I wanted the ability to use col-resize and row-resize cursors in GPUI.

Github also uses the col/row-resize cursor style. image