Commit Graph

16227 Commits

Author SHA1 Message Date
Nathan Sobo
c56e7cd124 Remove unused import 2023-12-20 19:53:57 -07: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
Kirill Bulatov
87a1387f9a
For file finder queries, match in all gitignored worktree entries (#3748)
Deals with https://github.com/zed-industries/community/issues/2347
Part of https://github.com/zed-industries/community/issues/1538

Now file finder will match all gitignored worktree entries.
Zed does not traverse gitignored dirs by default, which means that not
all gitignored files will be matches, but all that were toggled in
project panel and all root non-directory gitignored entries will be now
used, hopefully causing less questions.

Release Notes:

- Improved file finder to match all gitignored files that were added
into worktrees (e.g. due to opening gitignored directories in project
panel)
2023-12-21 02:34:34 +02:00
Max Brunsfeld
24970c1da9 Fix view handle leaks in ListState callbacks 2023-12-20 16:33:10 -08:00
Kirill Bulatov
2f56fe9129 For file finder queries, search in all gitignored worktree entries 2023-12-21 02:21:27 +02: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
d61cac6160
Add ToggleButton for use in buffer search (#3746)
This PR adds a new `ToggleButton` component:

<img width="738" alt="Screenshot 2023-12-20 at 6 50 13 PM"
src="https://github.com/zed-industries/zed/assets/1486634/9c5fb45b-0b55-4008-9336-b651a26a99ad">

We're using `ToggleButton`s for the search mode selection in the buffer
search:

<img width="842" alt="Screenshot 2023-12-20 at 6 47 57 PM"
src="https://github.com/zed-industries/zed/assets/1486634/178a278f-172c-4c67-8572-83d59de2ed14">

Release Notes:

- N/A
2023-12-20 19:00:04 -05:00
Marshall Bowers
11807bb82d Add large variant for buttons 2023-12-20 18:47:22 -05:00
Marshall Bowers
93c8bee747 Use ToggleButtons for search mode in buffer search 2023-12-20 18:32:12 -05:00
Kirill Bulatov
8238edb5aa
Remove nightly from zed1 and use proper namespaces for nightly in zed2 manifest (#3745)
Currently, I get 404 when trying to open links for nightly, like
https://zed.dev/nightly/channel/Rooms-329
The PR ensures nightly has a separate protocol handler in zed2, removes
nightly mentions from zed1.

See also zed.dev change:
https://github.com/zed-industries/zed.dev/pull/429

Release Notes:

- N/A
2023-12-21 01:24:57 +02:00
Marshall Bowers
443b1dd345 Add ToggleButton component 2023-12-20 18:23:21 -05:00
Kirill Bulatov
2cd7d2db46 Remove nightly from zed1 and use proper namespaces for nightly in zed2 manifest 2023-12-21 01:18:00 +02:00
Kirill Bulatov
56f2b963ef
Restore "reveal in project panel" and "search in directory" context menu actions (#3744)
Release Notes:

- N/A
2023-12-21 01:12:06 +02:00
Kirill Bulatov
72c8beae30 Restore "reveal in project panel" and "search in directory" context menu actions 2023-12-21 01:07:05 +02:00
Marshall Bowers
5272794fe1
Refine toolbar and buffer search styling (#3743)
This PR refines the toolbar styling, specifically around the buffer
search.

Spacing has been adjusted to feel less claustrophobic.

Release Notes:

- N/A
2023-12-20 17:43:27 -05:00
Marshall Bowers
e5e8e8882f Inline toggle replace button 2023-12-20 17:34:08 -05:00
Marshall Bowers
2ac472e0e0 Inline buttons 2023-12-20 17:31:36 -05:00
Marshall Bowers
8a8b498ee1 Style replace input 2023-12-20 17:25:38 -05:00
Marshall Bowers
b493d8f6c0 Improve spacing of items in buffer search bar 2023-12-20 17:10:27 -05: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
d499cccebb Only compute placeholder text once 2023-12-20 14:47:56 -07:00
Marshall Bowers
bc479af2c1
Style incoming call notification (#3742)
This PR styles the incoming call notification.

<img width="405" alt="Screenshot 2023-12-20 at 3 56 39 PM"
src="https://github.com/zed-industries/zed/assets/1486634/9cfb89e7-ba5f-4463-bf53-a3f8a82e136f">

Release Notes:

- N/A
2023-12-20 16:16:03 -05:00
Marshall Bowers
7b51f73826 Tighten up project share notifications 2023-12-20 16:06:59 -05:00
Marshall Bowers
9a06b7e77d Style incoming call notifications 2023-12-20 15:59:01 -05:00
Nathan Sobo
9acb5825e6 Compute the query editor placeholder text with a focus handle
So we're not beholden to the current focus.
2023-12-20 13:00:52 -07:00
Piotr Osiewicz
26fb67b3e4
chore: Remove 'db' dependency from recent_projects2 (#3740)
It was pulling in gpui1 into zed2 build.

Release Notes:

- N/A
2023-12-20 20:38:37 +01:00
Marshall Bowers
c1df27c792
Style notification panel (#3741)
This PR makes a first pass at styling the notification panel.

#### Signed out

<img width="381" alt="Screenshot 2023-12-20 at 11 41 25 AM"
src="https://github.com/zed-industries/zed/assets/1486634/f045fa17-4ebc-437f-a25b-d7695d47f18b">

#### No notifications

<img width="380" alt="Screenshot 2023-12-20 at 11 44 23 AM"
src="https://github.com/zed-industries/zed/assets/1486634/3a7543f2-8cd8-4788-8059-d5663f5f6b4c">

#### Notifications

<img width="386" alt="Screenshot 2023-12-20 at 1 27 08 PM"
src="https://github.com/zed-industries/zed/assets/1486634/13b81722-c47a-4c06-b37d-e6515cbfdb9d">

Release Notes:

- N/A
2023-12-20 14:06:33 -05: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
Marshall Bowers
da34dd49bb Fix text wrapping issues with overflow_hidden
This seems to influence sizing calculations in ways I don't fully understand.
2023-12-20 13:25:17 -05:00
Joseph T. Lyons
4c0856e096 collab 0.32.0 2023-12-20 13:15:44 -05:00
Marshall Bowers
b0b4610a73 Fix positioning of right items 2023-12-20 13:05:21 -05: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
Joseph T. Lyons
73b13b7dc6 v0.119.x dev 2023-12-20 13:00:01 -05:00
Max Brunsfeld
a125610f81
Assign draw order to surfaces using plane splitter (#3739)
It looks like we neglected to incorporate surfaces into the
plane-splitting code path, which assigns each graphics primitive's draw
order.

This fixes an issue where screensharing frames were not visible when the
screenshare tab was zoomed.
2023-12-20 09:54:03 -08:00
Marshall Bowers
87f879bfa9 Add text wrapping to notifications 2023-12-20 12:48:30 -05:00
Nathan Sobo
dc047437c6 Don't consider any element hovered when actively dragging
Co-Authored-By: Antonio <antonio@zed.dev>
2023-12-20 10:46:36 -07:00
Marshall Bowers
9c4e8699ba Remove unneeded wrapping element 2023-12-20 12:45:18 -05:00
Max Brunsfeld
8f677cc0c6 Assign draw order to surfaces using plane splitter 2023-12-20 09:43:04 -08:00
Julia
e1a4e8ea16
Reintroduce LSP diagnostic/status message (#3728)
Release Notes:

- N/A
2023-12-20 12:23:36 -05:00
Julia
11140a1d34 Use ButtonLike rather than ad-hoc button
Co-Authored-By: Marshall Bowers <marshall@zed.dev>
2023-12-20 12:15:13 -05:00
Antonio Scandurra
90db278724
Prevent ArenaRef from being cloned (#3738)
This could cause multiple mutable references to be acquired for the same
arena element, which is unsafe. I didn't see it cause problems in
practice, but I realized this could have been a problem and fixed it
before it bit us.

Release Notes:

- N/A
2023-12-20 17:52:16 +01:00
Marshall Bowers
636c12ec3f Style signed-out and empty states for the notification panel 2023-12-20 11:45:18 -05:00
Marshall Bowers
3886b1993d Fix formatting breakage 2023-12-20 11:41:51 -05:00
Kirill Bulatov
e72f56c432
Port language_tools crate to gpui2 (#3673)
Add back a way to show syntax trees and LSP logs in Zed.

Release Notes:

- N/A
2023-12-20 18:34:40 +02:00
Antonio Scandurra
6e2346c537 Prevent ArenaRef from being cloned 2023-12-20 17:32:59 +01:00
Julia
5840750b3d Avoid workspace use while leased 2023-12-20 11:28:56 -05:00