Commit Graph
176 Commits
Author SHA1 Message Date
Antonio Scandurra 5781cf6604 Use InteractiveBounds everywhere we change the cursor style 2023-12-20 13:59:52 +01:00
Julia ef39382c84 Allow editor mouse drag selection outside interactive bounds (#3716)
Release Notes:

- N/A
2023-12-19 13:07:31 -05:00
Julia 961f989388 Match zed1 scrollbar drag behavior (#3715)
Still not ideal, but we need to ship and this is more than reasonable

Release Notes:

- N/A
2023-12-19 13:00:26 -05:00
JuliaandAntonio Scandurra e08fc0bbc0 Allow editor mouse drag selection outside interactive bounds
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-12-19 13:00:21 -05:00
JuliaandAntonio Scandurra 51396344a3 Match zed1 scrollbar drag behavior
Still not ideal, but we need to ship and this is more than reasonable

Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-12-19 12:50:06 -05:00
Max Brunsfeld e655d2434a Don't stop propagation on mouse move over editor gutter 2023-12-19 09:02:25 -08:00
Antonio Scandurra b30fd3f574 Fix janky editor scrollbar dragging
We can receive multiple events before computing the next frame, and
in that case we want to compute a drag delta between the position for the
previous mouse event and the current one.
2023-12-19 15:32:42 +01:00
Marshall Bowers 5900b815e1 Remove unimplemented toggling for project search entries (#3695)
This PR removes the unimplemented toggling of search results in the
project search.

This is new functionality that didn't exist in Zed1, and it's likely
that we won't be adding it before launch, so removing it for now.

Release Notes:

-  N/A
2023-12-18 12:53:08 -05:00
Nate Butler 7af0edf5b6 Editor UI Cleanup (#3676)
[[PR Description]]

TODO: 
- [x] Style fold marker
- [x] Editor - Code action icon too large, should use muted color,
should have tooltip
- [ ] Style inline assistant
    - Prompt text gets cut off veritcally
- [x] Line height on inline assist editor isn't tall enough
- Nate: This is my fault due to the line height (relative: 1) we are
setting on non-buffer editors. I'll look into this.
- [ ] Style diagnostic hover (right now it's an opaque box on some
themes)
    - Nate: This needs status tints, we are working on it
- [ ] Hovering over a symbol shows a dialogue that appears underneath
the scroll-bar

Release Notes:

- N/A
2023-12-15 15:49:55 -05:00
Nate Butler e71f2b49e8 Style fold control 2023-12-15 15:41:53 -05:00
Mikayla b4135dd2f1 Fix editor mouse event dispatch 2023-12-15 10:26:41 -08:00
Kirill Bulatov a6403aad1a Remove extra nits, do not panic on clicking the buffer separator 2023-12-15 11:28:48 +02:00
Nathan Sobo ad8165ae79 Rename draw2 -> draw_and_update_state 2023-12-14 17:20:27 -07:00
Nathan Sobo d13a21c238 Don't move in paint 2023-12-14 15:15:18 -07:00
Conrad Irwin 4e1b4c4390 Refactor editor to be more clear about stacking 2023-12-14 10:48:15 -07:00
Conrad Irwin d8cb0e8a2a Fix z-indexes in editor element
* Ensure that scroll events from blocks scroll the editor
* Ensure that scroll bars show behind hover things
2023-12-14 10:36:16 -07:00
Mikayla bfbbec0b01 Add fluent quad API 2023-12-13 13:21:48 -08:00
Marshall Bowers 050ff6b27d Adjust scrollbar track background and border colors (#3596)
This PR adjusts the colors we pull from the VS Code themes to use for
the scrollbar track background and border.

For the scrollbar track background we now use the `editor.background`,
and for the scrollbar track border we use `editorOverviewRuler.border`.

Release Notes:

- N/A
2023-12-11 17:08:39 -05:00
Marshall Bowers aa27e1bcec Draw the scrollbar track left border 2023-12-11 16:39:00 -05:00
Mikayla Maki 927d18b0f3 Add support for resizing splits and docks, as well as utilities (#3595)
Making this PR to upstream changes to util and GPUI2, resizing exists
but isn't working yet.

Release Notes:

- N/A
2023-12-11 13:32:06 -08:00
Conrad Irwin fcbc18a380 vim-flight entertainment (#3574)
- vim2 compiling (but mostly commented out)
- More code written, similar lack of workingness so far

Still todo:
[ ] Figure out the focus/blur stuff
[ ] Uncoment more code
[ ] Fix VimTestContext
[ ] Uncomment the tests

Release Notes:

- N/A
2023-12-11 12:11:13 -07:00
Marshall Bowers 7f4d03fab2 Fix color for selections in scrollbar (#3590)
This PR fixes an issue where we weren't using the right color for
displaying selections within the scrollbar.

Release Notes:

- N/A
2023-12-11 13:34:29 -05:00
Mikayla 3198eb6c6d Merge branch 'main' into splits 2023-12-11 10:16:32 -08:00
Marshall Bowers 6add17338c Style scrollbar when using diff markers 2023-12-11 12:58:55 -05:00
Marshall Bowers 89884d289f Pull scrollbar colors from theme 2023-12-11 12:47:29 -05:00
Conrad Irwin b66b4915cf Merge branch 'main' into vim2 2023-12-11 09:38:23 -07:00
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
Conrad Irwin a4ea7bf928 More code written, similar lack of workingness so far 2023-12-08 17:45:17 -07:00
Mikayla fd34d1da31 Add back semi-funcitonal pane resizing code 2023-12-08 16:29:42 -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
MikaylaandNathan 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 ScandurraandMarshall 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 OsiewiczandAntonio 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