ZIm/crates/ui/src
Kirill Bulatov 18c2e8f6ca
Rework mouse handling of git hunks diff (#14727)
Closes https://github.com/zed-industries/zed/issues/12404

![Screenshot 2024-07-18 at 14 02
31](https://github.com/user-attachments/assets/a8addd22-0ed9-4f4b-852a-f347314c27ce)

![Screenshot 2024-07-18 at 14 02
43](https://github.com/user-attachments/assets/0daaed10-b9f3-4d4b-b8d7-189aa7e013b9)

Video:


https://github.com/user-attachments/assets/58e62527-da75-4017-a43e-a37803bd7b49


* now shows a context menu on left click instead of expanding the hunk
diff
* hunk diffs can be toggled with a single cmd-click still
* adds a X mark into gutter for every hunk expanded
* makes `editor::ToggleDiffHunk` to work inside the deleted hunk editors

Additionally, changes the way editor context menus behave when the
editor is scrolled — right click and diff hunks context menu now will
stick to the place it was invoked at, instead of staying onscreen at the
same pixel positions.

Release Notes:

- Improved the way git hunks diff can be toggled with mouse
([#12404](https://github.com/zed-industries/zed/issues/12404))

---------

Co-authored-by: Nate Butler <nate@zed.dev>
Co-authored-by: Conrad Irwin <conrad@zed.dev>
2024-07-19 13:48:04 +03:00
..
components Rework mouse handling of git hunks diff (#14727) 2024-07-19 13:48:04 +03:00
styles Improve experience when themes provide transparent status colors (#13996) 2024-07-09 11:27:47 -04:00
utils Bring Jupyter to Zed Editing (#12062) 2024-06-17 10:02:31 -07:00
clickable.rs Prompt Library Refinements (#13470) 2024-06-25 11:43:30 -04:00
components.rs ui: Add NumericStepper component (#13954) 2024-07-08 18:45:49 -04:00
disableable.rs Fix possessive "its" in docs and comments (#3998) 2024-01-10 10:09:48 -05:00
fixed.rs Document ui crate traits 2024-01-09 14:15:25 -05:00
prelude.rs Add Tool Strip (#11756) 2024-05-13 17:58:08 -04:00
selectable.rs Add UI setting components (#13550) 2024-06-26 13:02:58 -04:00
styled_ext.rs Improve experience when themes provide transparent status colors (#13996) 2024-07-09 11:27:47 -04:00
styles.rs Improve experience when themes provide transparent status colors (#13996) 2024-07-09 11:27:47 -04:00
ui.rs Add WithRemSize element (#11928) 2024-05-16 14:37:55 -04:00
utils.rs Document UI modules 2024-01-09 12:57:12 -05:00
visible_on_hover.rs Remove 2 suffix for ui, storybook, text 2024-01-03 12:33:51 -08:00
with_rem_size.rs ui: Don't break flex layout when using WithRemSize (#12076) 2024-05-20 21:39:18 -04:00