Commit graph

451 commits

Author SHA1 Message Date
Julia
051bad734e
Some terminal bugs (#3767)
Fixes:
 - drag and drop into terminal element does not change its style
 - drag and drop terminal tab into main pane then back panics
 - can drop non-terminal items into the terminal pane

Release Notes:

- N/A
2023-12-21 18:05:14 -05:00
Julia
f3fda8018f Prevent drag-dropping non-terminal item into terminal pane 2023-12-21 17:52:29 -05:00
Marshall Bowers
3d1e52297e
Scale down status bar items (#3766)
This PR scales down the sizes of items in the status bar.

This brings us more in line with Zed1.

Release Notes:

- N/A
2023-12-21 17:42:54 -05:00
Julia
9efe5a30aa Fix pane drag target not appearing over terminal element 2023-12-21 13:08:48 -05:00
Julia
31e47f9b52 Prevent panic dragging tab into terminal panel 2023-12-21 12:56:30 -05:00
Kirill Bulatov
b14c07ca54 Fix Zed cli actions: opening notes and joining calls 2023-12-21 14:27:13 +02:00
Nathan Sobo
4f6bef5b63
Improve interaction between clicking and dragging (#3737)
Once a drag starts, we won't fire click listeners or style any elements
as active.

- Don't fire click listeners or show active state once a drag is in
progress
- Don't show hover style when a drag is in progress
- Draw borders above content
- If borders are opaque, apply them to the content mask. This prevents
hovers from firing on content underneath the border, which was creating
issues where the drag handle was inside the border, so we'd flicker the
hover when the mouse moved out of the drag handle and into the 1px
border on the left dock.
- Add a `block_mouse` helper which causes transparent elements to paint
an "opaque" layer to prevent mouse events from falling through. We use
this for the drag handle as well to disable hover, click, etc on items
in the panel.

Release Notes:

- N/A
2023-12-20 19:31:06 -07:00
Max Brunsfeld
afbc655100
Ensure that views' on_release callbacks are always called (#3747)
* Ensure that views' on_release callbacks are always called (even if
their window is gone), by passing them a `AppContext`, not a
`WindowContext`.
* Fix leaked handles to `CollabPanel`, `NotificationPanel`, and
`ChatPanel` caused by captures in a `ListState` render callback.

This fixes two issues we were seeing with following:
* inability to rejoin a remote project after you closed it
* following not working if a window had previously been closed
2023-12-20 16:45:37 -08:00
Max Brunsfeld
42bdc11112 Prune dead workspaces from WorkspaceStore on read
Also, remove unnecessary window handle from Workspace.
2023-12-20 16:08:58 -08:00
Max Brunsfeld
5e7c74c7b6 Ensure that on_release callbacks are called even if view outlives its window 2023-12-20 16:01:52 -08:00
Marshall Bowers
b9bc74abe5 Increase toolbar padding 2023-12-20 17:03:44 -05:00
Marshall Bowers
53b608378c Don't apply the gap when we don't have any items in the first row 2023-12-20 17:02:15 -05:00
Nathan Sobo
87ae21feb3 Merge remote-tracking branch 'origin/main' into cancel-clicks-on-drag 2023-12-20 15:01:10 -07:00
Nathan Sobo
15f16f08d9 Move application of content mask and z-index into Interactivity::paint
This allows the content mask to correctly apply to bounds used in event handlers,
which prevents content under opaque borders from being hovered in overflow hidden
containers.

Co-Authored-By: Antonio <antonio@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-12-20 11:43:45 -07:00
Nathan Sobo
fffb30ac6d Add InteractiveElement::block_mouse which renders an "opaque" layer
Co-Authored-By: Antonio <antonio@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-12-20 11:02:47 -07:00
Julia
e1a4e8ea16
Reintroduce LSP diagnostic/status message (#3728)
Release Notes:

- N/A
2023-12-20 12:23:36 -05:00
Julia
5840750b3d Avoid workspace use while leased 2023-12-20 11:28:56 -05:00
Kirill Bulatov
fe40e3920b Fix remaining z-index bugs
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-12-20 18:23:09 +02:00
Antonio Scandurra
57f3a882fe Render disconnected overlay when project becomes readonly 2023-12-20 14:10:59 +01:00
Antonio Scandurra
390ccbc6ad Disable focus when disconnecting from host 2023-12-20 14:10:56 +01:00
Antonio Scandurra
5781cf6604 Use InteractiveBounds everywhere we change the cursor style 2023-12-20 13:59:52 +01:00
Max Brunsfeld
c81e89a4f4 Ensure that new view observers are called by WindowContext::replace_root_view 2023-12-19 17:04:42 -08:00
Julia
0390fb1449 Reintroduce LSP diagnostic/status message
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-12-19 18:38:25 -05:00
Marshall Bowers
53b76e3e4d
Style pane drop targets (#3726)
This PR styles the pane drop targets using the `drop_target_background`
color from the theme.

We do have to adjust the alpha channel of the color so that it doesn't
obscure the contents of the buffer.

Release Notes:

- N/A
2023-12-19 18:06:21 -05:00
Marshall Bowers
547ad77243
Style tab drop targets for project entries (#3725)
This PR styles the drop targets when dragging a project entry onto a tab
or the tab bar.

I also adjusted the existing tab drop targets to use the
`drop_target_background` from the theme.

Release Notes:

- N/A
2023-12-19 17:45:42 -05:00
Kirill Bulatov
cf12d62fc5 Tidy up z-index handling
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-12-19 23:50:42 +02:00
Kirill Bulatov
825a8f0927 Initial fix of the z-index
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-12-19 23:29:08 +02:00
Marshall Bowers
7bc9319871
Apply padding at the toolbar level (#3720)
This PR adjusts the padding in the toolbar to be applied within the
toolbar itself.

Previously the different elements within the toolbar were applying their
own padding, which led to inconsistencies.

Release Notes:

- N/A
2023-12-19 16:01:03 -05:00
Max Brunsfeld
e655d2434a Don't stop propagation on mouse move over editor gutter 2023-12-19 09:02:25 -08:00
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