Commit Graph
39175 Commits
Author SHA1 Message Date
Marshall Bowers f77eff3045 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 5f343b34b7 Render zoomed item in the workspace 2023-12-15 11:19:59 -08:00
Marshall Bowers 4f2f6b9a05 Rework collab panel rendering to use gpui::list (#3678)
This PR reworks the rendering of the collab panel to use `gpui::list`,
so that we don't render any items that are not visible on the screen.

In the process we also fixed some bugs in the channel list:

- Fixed the context menu for channels not deploying when activated via
keyboard
- Fixed drag and drop for channels
- Made it so when navigating the collab panel via keyboard the list only
scrolls enough to reveal the next item when navigating to an item that
is currently off-screen

Release Notes:

- N/A
2023-12-15 14:11:24 -05:00
Mikayla Maki 47bc85223f Fix editor mouse event dispatch stealing clicks (#3679)
[[PR Description]]

Release Notes:

-
2023-12-15 11:06:31 -08:00
Marshall Bowers 88c13b48f7 Format code 2023-12-15 14:03:49 -05:00
Marshall BowersandMax f186389611 Fix channel drag and drop
Also add the ability to unnest a channel by dragging it to the "Channels"
header. This is currently not working due to a collab server issue.

Co-authored-by: Max <max@zed.dev>
2023-12-15 14:01:24 -05:00
Conrad Irwin 633f23536a Fix bug where vim commands were copied on each update_matches
In zed1, the array of commands was recalculated on every update_matches,
In zed2 it's cached before we change the focus.
2023-12-15 11:59:06 -07:00
Marshall BowersandMax 316ecb52d8 Only scroll enough to reveal the next channel if it isn't visible
Co-authored-by: Max <max@zed.dev>
2023-12-15 13:50:51 -05:00
Mikayla 118894f502 Fix editor mouse event dispatch 2023-12-15 10:26:41 -08:00
Marshall BowersandMax 00fea0ce57 Fix positioning of the inline context menu
Added a new `bounds_for_item` for `ListState`.

Co-authored-by: Max <max@zed.dev>
2023-12-15 13:24:30 -05:00
Mikayla Maki e2fe6a69bf Fix center pane resizing (#3677)
Release Notes:

- N/A
2023-12-15 10:15:58 -08:00
Mikayla 923dd84bd4 Fix pane resizing 2023-12-15 10:07:10 -08:00
Antonio Scandurra 29a063903f Use a safe API for Arena 2023-12-15 19:03:37 +01:00
Nate Butler 103bddafd6 Update size of code action indicator and show when active 2023-12-15 12:29:33 -05:00
Nate Butler 6a78cd7bc6 Revert change to single line editor height 2023-12-15 12:22:33 -05:00
Marshall Bowers 2c56fd5bf0 Perform scroll interactions through the ListState 2023-12-15 12:10:40 -05:00
Nate Butler 5407216c11 Update fold_indicator render 2023-12-15 12:09:06 -05:00
Marshall Bowers 3667bd8b2e Render the collab panel using a gpui::list 2023-12-15 11:56:03 -05:00
Nate Butler 3f3df033af Titlebar cleanup (#3675)
[[PR Description]]

Clean up titlebar design nits

- Remove red borders
- Update menu button styles
- Adjust padding
- Improve tooltips with keybindings

Release Notes:

- N/A
2023-12-15 11:45:52 -05:00
Nate Butler 4b0443826c Add some right side padding in titlebar. 2023-12-15 11:25:24 -05:00
Nate Butler b608193910 Reduce intensity of project panel icons 2023-12-15 11:20:56 -05:00
Nate Butler d3e14a16e4 Remove red borders, improve left side padding 2023-12-15 11:07:40 -05:00
Nate Butler 434a54ad95 Improve tooltip with keybinding styling 2023-12-15 11:07:17 -05:00
Nate Butler b396818f28 Story/Storybook Enhancements (#3674)
[[PR Description]]

- Adds some Story components to reduce the amount of code needed to lay
out stories
- Added the ability to open a story in Zed using a link (see text story)
- Added sections with descriptions and usage.

Release Notes:

- N/A
2023-12-15 10:48:13 -05:00
Nate Butler 6a14da5391 Fix import 2023-12-15 10:33:27 -05:00
Nate Butler b30cddec7d Merge branch 'main' into story-enhancements 2023-12-15 10:26:59 -05:00
Nate Butler 4c85020dac Update storybook2.rs 2023-12-15 10:25:07 -05:00
Antonio Scandurra b4263d317c Move Arena to a thread-local and use it to allocate AnyElement 2023-12-15 16:18:05 +01:00
Antonio Scandurra d325c110b2 Use an Arena to reuse allocations for listeners 2023-12-15 15:13:32 +01:00
Piotr Osiewicz 4f3520e152 search: Reintroduce whole word switch (#3672)
It seems to have been lost in the recent styling pass.

Release Notes:

- N/A
2023-12-15 12:20:54 +01:00
Piotr Osiewicz 7b19cebb4f Dismiss Recent Projects & VCS modals on ESC (#3671)
Release Notes:

- N/A
2023-12-15 12:07:25 +01:00
Kirill Bulatov 81c3315fd4 zed2: Restore buffer search deploy & focus behavior (#3670)
In zed1, cmd-f either opened the search buffer, or focused into it if it
was open already. Search query got updated, if any selection was made on
the moment of cmd-f call.

The PR restores that behavior and also

* fixes a bug when opened diagnostics error always got pasted
* comments out the panic on multibuffer separator click 
* removes extra stdout & stderr debug logging

Release Notes:

- N/A
2023-12-15 12:33:45 +02:00
Kirill Bulatov 55eafa301f Restore zed1 behavior for buffer search deploy 2023-12-15 12:23:03 +02:00
Kirill Bulatov 26292d4df2 Adjust copy/paste buffer only on the copy error action trigger 2023-12-15 11:34:00 +02:00
Kirill Bulatov 8a5c5a5707 Remove extra nits, do not panic on clicking the buffer separator 2023-12-15 11:28:48 +02:00
Joseph T. Lyons 8f26c2770a Tweak wording 2023-12-15 01:47:59 -05:00
Julia 198305c44a Fire focus handlers on draw to avoid timing with newly created item (#3640)
See title

Any focus changes which fire from within a focus handler should be
handled in the next frame

Release Notes:

- N/A
2023-12-14 23:57:24 -05:00
Julia f423a59c9c Give correct focus handle when project search has no matches 2023-12-14 23:49:44 -05:00
Julia ca58e64a15 Merge branch 'main' into focus-handlers-on-draw 2023-12-14 23:08:23 -05:00
Conrad Irwin 25452bee79 Implement user menu (#3636)
Release Notes:

- N/A
2023-12-14 20:30:28 -07:00
Julia 79407febab Give result-less project search a focus handle 2023-12-14 22:29:33 -05:00
Conrad Irwin 53fcb54443 Merge branch 'main' into user-menu 2023-12-14 20:18:20 -07:00
Mikayla Maki 22e76a9f24 Fix some todos, add others (#3669)
As it says on the tin

Release Notes:

-
2023-12-14 19:00:58 -08:00
Julia 398b66a901 Render panel in these tests 2023-12-14 21:33:11 -05:00
Julia cd278df003 Track focus on TestItem 2023-12-14 20:58:59 -05:00
Mikayla 1c80a5911b Add several red outlines 2023-12-14 17:48:49 -08:00
Mikayla 43ae943159 Fix todos in auto-update 2023-12-14 17:00:07 -08:00
Max Brunsfeld a12c976902 Fix overlay rendering when dragging onto the center of a pane (#3667) 2023-12-14 16:59:19 -08:00
Max Brunsfeld c4398f87e5 Fix overlay rendering when dragging onto the center of a pane 2023-12-14 16:52:03 -08:00
Mikayla Maki 23141c8766 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