Commit graph

422 commits

Author SHA1 Message Date
Max Brunsfeld
cf037ea4a8 Merge branch 'main' into fix-panel-resize 2023-12-19 08:55:55 -08:00
Marshall Bowers
3e6b84a726
Wire up the middle mouse button to close tabs (#3714)
This PR wires up the middle mouse button to close tabs.

Right now we're doing this using `on_mouse_down`, but we need a way in
GPUI2 to have an `on_click` for a mouse button other than the left one.

Release Notes:

- N/A
2023-12-19 11:26:55 -05:00
Antonio Scandurra
ba0d7e35bb Set window edited 2023-12-19 10:26:06 +01:00
Max Brunsfeld
e6f3731efd Fix position of right dock handle
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2023-12-18 16:05:54 -08:00
Marshall Bowers
64ceb61aa3
Add pane dividers (#3703)
This PR adds dividers between panes in a split.

Release Notes:

- N/A
2023-12-18 16:32:51 -05:00
Nate Butler
a286ec4650 Update toolbar.rs 2023-12-18 16:10:13 -05:00
Nate Butler
9cd8e99a9a Update toolbar.rs 2023-12-18 14:10:12 -05:00
Nate Butler
2ae39b70c8 Add left side padding 2023-12-18 13:55:30 -05:00
Nate Butler
c9893ce2fd Use flex_1 div instead of justify_center in toolbar 2023-12-18 13:51:04 -05:00
Julia
4707248714
Revert accidental merge of old version of workspace2 render function (#3694)
Something happened with my local diff and
https://github.com/zed-industries/zed/pull/3691 somehow contained an old
version of workspace2's render function. Perhaps I rebased at some point
and borked it? Not sure 🤷‍♀️

Release Notes:

- N/A
2023-12-18 11:32:06 -05:00
Julia
488073deba
Unbork project search focus (#3691)
I got a little too clever for my own good with these focus handles
originally lol

Release Notes:

- N/A
2023-12-18 10:54:11 -05:00
Julia
b4042feccd Unbork project search focus 2023-12-18 10:44:34 -05:00
Max Brunsfeld
a4cdf365be Fix accidental drop of following task. Add back FollowNextCollaborator 2023-12-15 16:15:31 -08:00
Max Brunsfeld
a5e037befa Avoid duplicate render of a pane when it is zoomed 2023-12-15 13:26:48 -08:00
Max Brunsfeld
e3e988c150 Always render panes via pane_group::Member::render
Remove distinct code path for rendering panes in a PaneAxis, as this dropped
the logic for rendering the leader border and info box.
2023-12-15 13:26:36 -08:00
Max Brunsfeld
4eb609a954
Enable zoom (#3668)
* [x] zoom
* [x] pane tests
2023-12-15 12:58:03 -08:00
Max Brunsfeld
4c3ec0a8e5 Enable pane tests 2023-12-15 12:00:58 -08:00
Max Brunsfeld
9a8225c855 When a dock is zoomed, don't render it in its normal place 2023-12-15 11:48:25 -08:00
Max Brunsfeld
a4c123bb11 Fix logic for activating panel when re-docking it 2023-12-15 11:47:01 -08:00
Marshall Bowers
b1a61ca21e
Fix toolbar width (#3681)
This PR fixes an issue with the toolbar width introduced in #3666.

The lack of a flex container was making the toolbar contents not take up
the full width, and thus not positions items correctly along its main
axis.

Release Notes:

- N/A
2023-12-15 14:44:29 -05:00
Max Brunsfeld
793381f455 Render zoomed item in the workspace 2023-12-15 11:19:59 -08:00
Mikayla
a2852e36ce
Fix pane resizing 2023-12-15 10:07:10 -08:00
Julia
4be84f3db0 Merge branch 'main' into focus-handlers-on-draw 2023-12-14 23:08:23 -05:00
Julia
fbcaf96ab5 Track focus on TestItem 2023-12-14 20:58:59 -05:00
Max Brunsfeld
52b9fc303b Fix overlay rendering when dragging onto the center of a pane 2023-12-14 16:52:03 -08:00
Mikayla Maki
c27dd57a48
Make more performance improvements to GPUI 2 (#3664)
In the 3 charts below, "window draw" has 3 major subroutines. Request
layout, where we walk over the tree and have everything talk to the
layout engine initially. Compute layout, where we have the layout engine
actually do the layout, and then paint, where we use the computed bounds
to populate the scene.


![image_720](https://github.com/zed-industries/zed/assets/1789/d2225389-865f-4c8a-9452-9f611da64dcf)

Things are moving quickly so before/after comparisons are tough. In the
graph above, green bars are from a commit actually pre-dates a merge of
master which increased the complexity of layout. The red bars represent
the state of the world after this PR. Note how we improve the
performance of `paint`.

Improvements:

- Not moving `self` in `Element::paint`. This was moving from the heap
to the stack and imposing a big cost. This is the biggest win in this
PR.
- We got some minor wins by making the stacking order a bigger smallvec
of u8 instead of u32.
- A big win that doesn't show up in this chart is avoiding a double
render of the editor when autoscrolling by never pushing notification
effects or marking the window dirty when notifying during a window draw.

Release Notes:

- N/A
2023-12-14 16:45:58 -08:00
Mikayla Maki
05cb68eff1
Merge branch 'main' into perf-2 2023-12-14 16:39:10 -08:00
Max Brunsfeld
842f15c65b Fix centering of empty pane text 2023-12-14 16:35:58 -08:00
Mikayla Maki
8418f25d0a
Merge branch 'main' into perf-2 2023-12-14 16:25:40 -08:00
Max Brunsfeld
d6383ab0c6 Fix stickiness of main pane drag target
Reimplement the pane drag targets using on_drag_move
2023-12-14 16:23:15 -08:00
Mikayla
8b4cf38379
Fix dock resize handles
co-authored-by: conrad <conrad@zed.dev>
2023-12-14 16:05:10 -08:00
Nathan Sobo
02606d1fb9 Merge remote-tracking branch 'origin/main' into perf-2 2023-12-14 16:56:36 -07:00
Max Brunsfeld
fcbd58fed4
Enable all warnings in workspace, fix all warnings (#3660) 2023-12-14 14:38:28 -08:00
Max Brunsfeld
6170895932 Fix bug in Workspace::activate_pane_in_direction
Co-authored-by: Conrad <conrad@zed.dev>
2023-12-14 14:27:44 -08:00
Max Brunsfeld
b5e9e277db
Re-enable cmd-<number> key bindings for activating panes (#3659) 2023-12-14 14:16:43 -08:00
Max Brunsfeld
23d5f3f3e8 Enable all warnings in workspace, fix all warnings
Bring back some workspace tests

Co-authored-by: Conrad <conrad@zed.dev>
2023-12-14 14:15:56 -08:00
Nathan Sobo
d13a21c238 Don't move in paint 2023-12-14 15:15:18 -07:00
Julia
bbbdb9ff3e Render panel in this test to make sure it can receive focus 2023-12-14 17:11:00 -05:00
Max Brunsfeld
8d994ce8c5
Enable dragging from project panel to panes (#3658)
Rework gpui2 drag API so that receivers need not specify the dragged
view type.
2023-12-14 13:32:40 -08:00
Max Brunsfeld
6b06bb4ffe Re-enable cmd-<number> key bindings for activating panes
co-authored-by: Conrad <conrad@zed.dev>
2023-12-14 13:30:11 -08:00
Mikayla
8791f7cefc Enable dragging from project panel to panes
Rework gpui2 drag API so that receivers need not specify the dragged view type.

co-authored-by: Max <max@zed.dev>
co-authored-by: Conrad <conrad@zed.dev>
2023-12-14 13:20:48 -08:00
Nathan Sobo
fb3382bcc5 Merge remote-tracking branch 'origin/main' into perf-2 2023-12-14 14:16:59 -07:00
Marshall Bowers
2484a6969a Fix toolbar flex sizing 2023-12-14 15:57:06 -05:00
Marshall Bowers
c6e44683e6
Hide the toolbar if it has no visible items (#3654)
This PR makes the toolbar hide itself if it has no visible items.

This removes the double border beneath the tab bar when there are no
visible tools in the toolbar.

Release Notes:

- N/A
2023-12-14 13:02:27 -05:00
Nathan Sobo
1ae25f52a1 WIP 2023-12-14 10:31:45 -07:00
Piotr Osiewicz
da960fffe7
calls: Fix off by one in prompts for leaving a call. (#3649)
We've noticed how leaving a call with multiple windows open would still
prompt with the popup along the lines of "Do you want to leave the
current call?". In Zed1, that popup only showed up when you've had just
one window open.

The code for prompting did not change at all between zed1 and zed2, but
the way we calculate the window count did. Calling AppContext::windows
to get all window handles from WindowContext::update essentially
excluded the window we were updating (that is the window being closed)
from the returned Vec of window handles. I've decided to keep the code
as close to original as possible (as the alternative would be to change
the \# of workspaces needed for a prompt to pop up). We now query the
window handles via a deref to AsyncAppContext, which does not exclude
"our" window handle from the returned results.

Release Notes:

- N/A
2023-12-14 15:35:31 +01:00
Mikayla
d88fc27b79
Merge branch 'main' into fix-splits-bugs 2023-12-13 18:29:48 -08:00
Max Brunsfeld
4f32f66271 Clone item when dragging to split 2023-12-13 17:16:00 -08:00
Max Brunsfeld
93029376d9 Start work on allowing dragging tabs onto panes and pane edges 2023-12-13 17:06:42 -08:00
Mikayla
416bb45531
Tidy up workspace resizing 2023-12-13 16:35:25 -08:00