Commit graph

148 commits

Author SHA1 Message Date
Antonio Scandurra
b4fc8ea6f7 Fix porting mistake that caused clicking on the editor to misbehave
We used `width` instead of `height` in the "pixels-to-point" conversion
code, which would cause clicks to not work correctly when the width was
smaller than the `y` coordinate.
2023-12-11 14:21:55 +01:00
Kirill Bulatov
e3fc810b3d Draft an expand macro recusively command 2023-12-11 12:28:22 +02:00
Antonio Scandurra
e3c0b1f903 Listen for mouse events on scrollbar 2023-12-11 10:33:05 +01:00
Antonio Scandurra
03df63aa00 Merge remote-tracking branch 'origin/main' into scrollbars2 2023-12-11 09:51:43 +01:00
Max Brunsfeld
7b722c326f Paint code-action/fold buttons above the gutter 2023-12-09 11:41:40 -08:00
Marshall Bowers
cf42d95af6
Use the diff status colors defined in the theme (#3569)
This PR updates the diff status colors to use the ones defined in the
theme instead of placeholder colors.

Release Notes:

- N/A
2023-12-08 17:41:11 -05:00
Antonio Scandurra
9b0bea32ed 🎨 2023-12-08 14:24:58 +01:00
Antonio Scandurra
28dfd3ab43 Paint scrollbars
We still need to wire up mouse listeners.
2023-12-08 14:17:38 +01:00
Antonio Scandurra
7842fdeb32 Fix confirming rename not working on editor2 2023-12-07 12:54:28 +01:00
Mikayla
fd31e429f5
Merge branch 'main' into terminal-element 2023-12-06 15:20:04 -08:00
Mikayla
12e7f61f62
Fix a porting bugs for terminal2
co-authored-by: Nathan <nathan@zed.dev>
2023-12-06 15:11:49 -08:00
Nathan Sobo
d7473ad6e7
Document geometry module and replace zero method with default (#3515)
Nothing earth-shattering here, but all our geometry types are now fully
documented.

Release Notes:

- N/A
2023-12-06 12:52:41 -07:00
Nathan Sobo
ac07e230fa Document geometry 2023-12-06 12:28:44 -07:00
Antonio Scandurra
7e2ff63270 Paint blocks on top of the editor
This ensures blocks get mouse events before the editor beneath
them.

Co-Authored-By: Marshall <marshall@zed.dev>
2023-12-06 19:15:09 +01:00
Piotr Osiewicz
d09dfe01f5 Wire up global actions
Added an ephemeral root node so that even if there's no window/focused handle we still have something to dispatch to.

Co-authored-by: Antonio <antonio@zed.dev>
2023-12-06 16:15:53 +01:00
Piotr Osiewicz
d433da1e70
Editor2 tests (#3486)
Release Notes:

- N/A
2023-12-05 14:52:20 +01:00
Piotr Osiewicz
dffe323e73 Fix up test_lkayout_with_placeholder_text_and_blocks (uncomment last standing assert) 2023-12-05 11:31:17 +01:00
Piotr Osiewicz
590238bcca test_layout_with_placeholder_text_and_blocks (incomplete, one assert commented out)
We need to wire up a field from element state
2023-12-05 11:28:25 +01:00
Piotr Osiewicz
caa5fccbc4 test_wrapped_invisibles_drawing and test_invisibles_dont_appear_in_certain_editors 2023-12-05 11:11:06 +01:00
Piotr Osiewicz
1dd6625dd4 test_all_invisibles_drawing 2023-12-05 11:09:23 +01:00
Piotr Osiewicz
ee695bbb34 Fix up test_vim_visual_selections 2023-12-05 10:59:09 +01:00
Piotr Osiewicz
9695ea1017 test_shape_line_numbers 2023-12-05 10:29:09 +01:00
Max Brunsfeld
ae6ddceb67
Enable more collab UI features (#3496)
* Current Call section of the collab panel
* Improve the collab titlebar
* Add basic UI for following

Following only partially works, but the UI for following is now in
place.
2023-12-04 18:01:11 -08:00
Max Brunsfeld
63667ecf6f Start bringing back the current call section of the collab panel
Co-authored-by: Nathan <nathan@zed.dev>
2023-12-04 15:46:56 -08:00
Marshall Bowers
4cb4033a36 Merge branch 'main' into editor2_tests 2023-12-04 14:09:23 -05:00
Nate Butler
2bf48872b6 Progress on diagnostic multibuffer
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-12-01 16:53:09 -05:00
Nate Butler
c07455efa7 Update path header style
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-12-01 15:53:17 -05:00
Nate Butler
89aa6a3726 Re-add diagnostic headers 2023-12-01 15:30:01 -05:00
Piotr Osiewicz
4c4ec221af Uncomment a bunch of tests in the editor 2023-12-01 18:11:27 +01:00
Antonio Scandurra
5fefc121bf Add mouse context menu to editor2
Co-Authored-By: Piotr <piotr@zed.dev>
2023-12-01 16:01:56 +01:00
Antonio Scandurra
f0c205be5d Respond to modifiers changed event in editor2 and set cursor 2023-12-01 14:26:49 +01:00
Antonio Scandurra
f0bc4a04bd Uncomment git gutter painting 2023-12-01 13:45:14 +01:00
Antonio Scandurra
faa896343b Register NewFile and NewFileInDirection from Editor 2023-12-01 12:11:54 +01:00
Antonio Scandurra
a8a5785ec5 Re-enable opening excerpts in Editor 2023-12-01 12:03:21 +01:00
Antonio Scandurra
8c59a2d2c0 Delete commented out code for editor element 2023-12-01 11:52:40 +01:00
Antonio Scandurra
21d3ae603d Remove stray dbg statements 2023-12-01 11:49:25 +01:00
Antonio Scandurra
1b07fd6a70 Fix edits not being reported when rewrapping 2023-12-01 11:48:21 +01:00
Antonio Scandurra
0e1597d385 WIP 2023-11-30 18:00:41 +01:00
Marshall Bowers
b357ae4dc3
Add new Button and IconButton components (#3448)
This PR adds new `Button` and `IconButton` components built on top of
our new button abstractions.

Both of these buttons are built from the common `ButtonLike` base, and
implement the `ButtonCommon` (name TBD) trait in order to provide a
common interface.

There are still some visual tweaks that we'll need to make to the new
buttons, but those should be straightforward to make after we land this.

Release Notes:

- N/A
2023-11-29 17:41:44 -05:00
Conrad Irwin
a761e6ca0e More mouse occlusion work 2023-11-28 09:59:58 -07:00
Conrad Irwin
107c3d7f67 Fix esc in command palette
Also: add editor.register_action
2023-11-27 14:32:22 -07:00
Conrad Irwin
7a8aba329b Break content mask for hoverables 2023-11-27 11:43:14 -07:00
Antonio Scandurra
3ea12ad0d7 Remove commented out code 2023-11-27 19:19:56 +01:00
Antonio Scandurra
a5951df21f Start on hover popover 2023-11-27 18:56:37 +01:00
Antonio Scandurra
eb647be685 Pass max height manually 2023-11-27 14:56:46 +01:00
Antonio Scandurra
19bfed165b Show single-line docs in autocomplete and apply completion on mousedown 2023-11-24 13:22:25 +01:00
Antonio Scandurra
7eeb8078f6 Allow setting text background color via TextStyle 2023-11-23 19:22:18 +01:00
Antonio Scandurra
3b918bfee8 Merge branch 'main' into rename-element-traits
# Conflicts:
#	crates/gpui2/src/elements/uniform_list.rs
#	crates/ui2/src/components/context_menu.rs
#	crates/ui2/src/components/list.rs
2023-11-23 12:47:46 +01:00
Nathan Sobo
c23f17ee0b Reorganize element-related traits 2023-11-22 11:19:43 -07:00
Antonio Scandurra
524f892fb0 Correctly swap position of context menu 2023-11-22 19:02:44 +01:00