ZIm/crates/ui/src/components
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
..
avatar Make border methods always require an explicit width (#11450) 2024-05-06 13:22:47 -04:00
button Add REPL dropdown menu to toolbar (#14493) 2024-07-15 11:55:49 -07:00
checkbox Make border methods always require an explicit width (#11450) 2024-05-06 13:22:47 -04:00
label ui: Add margin style methods to Label and LabelLike (#14032) 2024-07-09 17:41:54 -04:00
list Adjust list item & pickers spacing (#14250) 2024-07-15 10:23:18 -03:00
stories Extract title_bar crate (#13597) 2024-06-27 19:14:13 -04:00
avatar.rs Add dedicated indicator for showing a muted call participant (#4076) 2024-01-16 16:18:06 -05:00
button.rs Remove 2 suffix for ui, storybook, text 2024-01-03 12:33:51 -08:00
checkbox.rs Add CheckboxWithLabel component (#7881) 2024-02-15 21:00:30 -05:00
context_menu.rs Rework mouse handling of git hunks diff (#14727) 2024-07-19 13:48:04 +03:00
disclosure.rs Prompt Library Refinements (#13470) 2024-06-25 11:43:30 -04:00
divider.rs Clean up references in doc comments in ui and theme crates (#3985) 2024-01-09 15:22:36 -05:00
dropdown_menu.rs Add UI setting components (#13550) 2024-06-26 13:02:58 -04:00
facepile.rs gpui: Make style macros more composable (#14007) 2024-07-09 13:52:52 -04:00
icon.rs Add REPL dropdown menu to toolbar (#14493) 2024-07-15 11:55:49 -07:00
indicator.rs Clean up Indicator (#11275) 2024-05-01 18:10:35 -04:00
keybinding.rs keymap: Allow modifiers as keys (#12047) 2024-06-25 10:17:23 -06:00
label.rs Remove 2 suffix for ui, storybook, text 2024-01-03 12:33:51 -08:00
list.rs Remove 2 suffix for ui, storybook, text 2024-01-03 12:33:51 -08:00
modal.rs Allow ssh connection for setting up zed (#12063) 2024-05-21 22:39:16 -06:00
numeric_stepper.rs ui: Add NumericStepper component (#13954) 2024-07-08 18:45:49 -04:00
popover.rs Revert "Fix aside affecting parent popover height (#11859)" (#11942) 2024-05-16 18:53:08 -04:00
popover_menu.rs ui: Use PopoverMenu::new for constructing PopoverMenus (#13178) 2024-06-17 18:14:37 -04:00
radio.rs Allow ssh connection for setting up zed (#12063) 2024-05-21 22:39:16 -06:00
right_click_menu.rs gpui: Pass Style by value to request_layout (#11597) 2024-05-09 11:38:53 +02:00
setting.rs Add UI setting components (#13550) 2024-06-26 13:02:58 -04:00
stack.rs Rename h_stack and v_stack to h_flex and v_flex, respectively (#4053) 2024-01-15 11:34:06 -05:00
stories.rs Extract title_bar crate (#13597) 2024-06-27 19:14:13 -04:00
tab.rs Introduce a new markdown crate (#11556) 2024-05-09 11:03:33 +02:00
tab_bar.rs Introduce a new markdown crate (#11556) 2024-05-09 11:03:33 +02:00
tool_strip.rs Add Tool Strip (#11756) 2024-05-13 17:58:08 -04:00
tooltip.rs Allow UI font weight to be assigned in settings (#12333) 2024-05-26 23:06:58 -06:00