Commit Graph
471 Commits
Author SHA1 Message Date
Nathan Sobo 51d1d92d66 Attempt to return impl Element from render. 3 errors. 2024-01-01 14:23:02 +01:00
Piotr Osiewicz 904358263c Remove #[allow(unused)] annotations in zed2 crates (#3798)
Release Notes:

- N/A
2023-12-25 12:23:44 +01:00
Kirill Bulatov a249375f99 Do not show nav history buttons in terminal pane 2023-12-23 22:10:11 +02:00
Kirill Bulatov e839dc5ee6 Hide pane tab bar for 0 items, hide its end buttons for no focus 2023-12-23 21:53:08 +02:00
Marshall Bowers 5a910aa874 Refine ported Zed1 themes (#3804)
This PR applies another round of refinements to the ported Zed1 themes.

Most of this was focused around the coloration of UI text to better
match Zed1.

Release Notes:

- N/A
2023-12-22 21:49:27 -05:00
Marshall Bowers bdb89d4700 Render tab bar tools as muted 2023-12-22 21:25:31 -05:00
Joseph T. Lyons b1870af386 Add project open event
Give the caller of report_app_event() the choice of whether to immediately flush the queue or not.
2023-12-22 20:23:55 -05:00
Max Brunsfeld 2edf560e5c Maintain workspace's zoom state when opening/closing docks, activating panels (#3801)
Fixes an issue where zoom didn't work when closing and re-opening a
zoomed panel.
2023-12-22 16:54:13 -08:00
Max Brunsfeld d7b0662058 Maintain workspace's zoom state when opening/closing docks, activating panels 2023-12-22 16:45:44 -08:00
Marshall Bowers f03ee1ea24 Add spacing between tab bar buttons (#3799)
This PR adds spacing between buttons in the tab bar.

Release Notes:

- N/A
2023-12-22 19:18:04 -05:00
Marshall Bowers b501f4eafc Begin porting Zed1 themes to Zed2 (#3793)
This PR is a first pass at porting the Zed1 themes to Zed2.

For the initial release of Zed2 we'll be shipping just the themes that
existed in Zed1, ported to Zed2. The new themes that were previously
added just in Zed2 have been removed.

Release Notes:

- N/A
2023-12-22 17:37:53 -05:00
Antonio Scandurra 30340535e9 Prevent panels from getting so small they can't be resized (#3788)
This also switches to using `Pixels` instead of `f32` to store the panel
size everywhere.

Release Notes:

- N/A
2023-12-22 18:37:13 +01:00
Antonio Scandurra 961d8331f3 Prevent panels from getting so small they can't be resized 2023-12-22 18:28:28 +01:00
Antonio Scandurra 3715ddfa74 Use Pixels instead of f32 for panel size 2023-12-22 18:26:33 +01:00
Antonio Scandurra 87ff5f04cb Fix resizing for bottom dock (#3787)
We were not using `flex` on the `PaneGroup`, which caused the bottom
dock to be unable to satisfy the desired resize value.

Release Notes:

- N/A
2023-12-22 18:10:50 +01:00
Antonio Scandurra 54e45306c5 Fix resizing for bottom dock
We were not using `flex` on the `PaneGroup`, which caused the bottom
dock to be unable to satisfy the desired resize value.
2023-12-22 18:00:03 +01:00
Kirill Bulatov 5de32f7b0b Do not display a getting start message when the project is open 2023-12-22 18:06:23 +02:00
Kirill Bulatov 420253a752 Restore zoom buttons in pane tab bars, fix + button in the terminal one 2023-12-22 15:32:47 +02:00
Antonio Scandurra c1ad079f09 Fix dismissing context menu when clicking on an item dispatched action 2023-12-22 12:27:20 +01:00
Antonio Scandurra 3de72f8366 Fix context menu in tab bar 2023-12-22 10:23:27 +01:00
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
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
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 BulatovandAntonio Scandurra 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
JuliaandAntonio Scandurra 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 BulatovandAntonio Scandurra cf12d62fc5 Tidy up z-index handling
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-12-19 23:50:42 +02:00
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