Commit Graph

1241 Commits

Author SHA1 Message Date
Marshall Bowers
4ce0c27e0a
Remove more commented-out code (#4150)
This PR removes some more commented-out code from various spots in the
codebase.

Release Notes:

- N/A
2024-01-18 23:17:41 -05:00
Marshall Bowers
decf320a74
Rename overflow_hidden_{x,y} to overflow_{x,y}_hidden (#4146)
This PR renames the `overflow_hidden_x` and `overflow_hidden_y` methods
to `overflow_x_hidden` and `overflow_y_hidden`, respectively.

This provides consistency with our `overflow_x_scroll` /
`overflow_y_scroll` methods, as well as better matches Tailwind's
naming.

Release Notes:

- N/A
2024-01-18 22:10:41 -05:00
Marshall Bowers
9993418f58
Prevent diagnostics from overflowing the status bar (#4145)
This PR makes it so long diagnostic messages no longer overflow the
status bar and push the right tools off-screen.

Here is an example with a long (placeholder) diagnostic message:

<img width="1136" alt="Screenshot 2024-01-18 at 9 47 07 PM"
src="https://github.com/zed-industries/zed/assets/1486634/18568527-c608-4d4a-9118-b84c6d81c13e">

Release Notes:

- Fixed long diagnostic messages overflowing the status bar.
2024-01-18 21:56:37 -05:00
Conrad Irwin
6c2da0d25b Revert "Store a z-index id per-layer (#4128)"
This reverts commit 28a2337218, reversing
changes made to e992f84735.
2024-01-18 13:28:23 -07:00
Julia
28a2337218
Store a z-index id per-layer (#4128)
Release Notes:

- N/A
2024-01-18 13:31:45 -05:00
Max Brunsfeld
bfe76316f7
Invoke pane's focus_in handler when pane is focused directly (#4129)
Fixes a bug where, when focusing a pane directly, it failed to transfer
focus to the active item.
2024-01-18 10:26:03 -08:00
Julia
bc2302f723 Store a z-index id per-layer
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2024-01-18 13:24:25 -05:00
Max Brunsfeld
2e35d900e0 Invoke pane's focus_in handler when pane is focused directly 2024-01-18 10:13:03 -08:00
Conrad Irwin
2835c9a972 Don't send follower events from other panes
Co-Authored-By: Mikayla <mikayla@zed.dev>
2024-01-18 10:42:49 -07:00
Piotr Osiewicz
b6d8665fc1 pane: stop propagation of drag/click events in resizing handle
This prevents focused editor from being scrolled while a pane is getting resized.

Fixes: Mouse down to start an editor resize causes a scroll
2024-01-18 14:24:03 +01:00
Kirill Bulatov
b6786d5e41 Use a proper action when clicking navigate forward button 2024-01-18 11:37:02 +02:00
Joseph T. Lyons
b807e6fe80 Use try_global() 2024-01-18 01:33:30 -05:00
Mikayla
57400e9687
Fix typos detected by crate-ci/typos 2024-01-17 14:31:21 -08:00
Conrad Irwin
65664452f5
Allow leaving calls once project is unshared (#4081)
Release Notes:

- Fixes a bug where you could not use call controls after a project was
unshared
2024-01-17 08:34:45 -07:00
Kirill Bulatov
a601e96b6c Style collab notifications properly 2024-01-17 16:44:43 +02:00
Kirill Bulatov
39dff0e827 Stop using button for collab notifications 2024-01-17 11:06:46 +02:00
Conrad Irwin
1d5b237b64 Allow leaving calls once project is unshared 2024-01-16 21:54:13 -07:00
Conrad Irwin
6bcc97ead4
channel management fixes (#4066)
- Close modals when focus leaves
- Disallow self-management for admins

Release Notes:

- Fixes changing role of invited channel members
2024-01-16 14:53:14 -07:00
Mikayla Maki
d00067cd86
Switch project search deploy behavior to be isolated to a pane (#4072)
This adjusts the solution in
https://github.com/zed-industries/zed/pull/4014 to fix the double-focus
issue, allowing each pane's project search to work independently.

Release Notes:

- Changed the name of the `workspace::DeploySearch` action to
`pane::DeploySearch` and changed it's behavior to open a new search OR
focus an existing project search in the current pane.
(https://github.com/zed-industries/community/issues/2395)
2024-01-16 10:41:57 -08:00
Mikayla
36ff35fcca
Change name of deploy action to indicate what scope it operates at 2024-01-16 10:30:21 -08:00
Conrad Irwin
18739477f7 Clippy 2024-01-15 20:12:20 -07:00
Conrad Irwin
62232060e6 Close modals when focus leaves
This is more similar to zed1's behaviour, and allows us to work around
the difficulty in defining `on_mouse_down_out` for modals that have
overlays.
2024-01-15 19:20:35 -07:00
Joseph T. Lyons
acf85db44e
Add more open events (#4061)
Adds open events for

- Welcome page
- Project search
- Project diagnostics

Release Notes:

- N/A
2024-01-15 16:36:24 -05:00
Joseph T. Lyons
24db41fcdd Remove debugs 2024-01-15 16:29:58 -05:00
Joseph T. Lyons
ba9a9f4f17 Add more open events
project search
diagnostics
welcome page
2024-01-15 16:26:04 -05:00
Antonio Scandurra
e60117dc54 Avoid panicking when closing a dragged tab
Co-Authored-By: Max <max@zed.dev>
Co-Authored-By: Nathan <nathan@zed.dev>
2024-01-15 19:46:34 +01:00
Marshall Bowers
90f4c70a82
Rename h_stack and v_stack to h_flex and v_flex, respectively (#4053)
This PR renames the `h_stack` and `v_stack` to `h_flex` and `v_flex`,
respectively.

We were previously using `h_stack` and `v_stack` to match SwiftUI, but
`h_flex` and `v_flex` fit better with the web/flexbox terminology that
the rest of GPUI uses.

Additionally, we were already calling the utility functions used to
implement `h_stack` and `v_stack` by the new names.

Release Notes:

- N/A
2024-01-15 11:34:06 -05:00
Marshall Bowers
b136d21ebf
Make tab close button square (#4052)
This PR makes the close button for tabs square.

`IconButton` now accepts a `shape`, and using `IconButtonShape::Square`
will ensure the `IconButton` is square with respect to its contained
icon.

#### Before

<img width="119" alt="Screenshot 2024-01-15 at 10 32 40 AM"
src="https://github.com/zed-industries/zed/assets/1486634/dc806b9b-411f-4cd9-8c10-676d2cbd298b">

#### After

<img width="116" alt="Screenshot 2024-01-15 at 10 32 24 AM"
src="https://github.com/zed-industries/zed/assets/1486634/8b4ef43c-14b6-449f-a235-5d7affd82c4e">

Release Notes:

- Changed the tab close button to be square.
2024-01-15 10:43:03 -05:00
Antonio Scandurra
4ff514ca7e Merge remote-tracking branch 'origin/main' into cache
# Conflicts:
#	crates/gpui/src/elements/div.rs
2024-01-15 11:37:46 +01:00
Conrad Irwin
29ce109211
chat panel ++ (#4044)
- Update chat panel with current channel
- Open chat panel for guests
- Open chat when joining a channel with guests
- Some tweaks for chat panels
- Don't lose focus on default panel state
- Make chat prettier (to my eyes at least)
- Fix multiple mentions in one message
- Show a border when scrolled in chat
- Fix re-docking chat panel
- Move settings subscription to dock

[[PR Description]]

Release Notes:

- Opens chat by default when joining a public channel
- Improves chat panel UI
2024-01-14 13:54:10 -07:00
Conrad Irwin
b34c78016f Fix tests for TestPanel 2024-01-14 12:26:54 -07:00
Conrad Irwin
898645681f Move settings subscription to dock
Reduces likelihood of panels being unable to move themselves
2024-01-13 22:41:26 -07:00
Mikayla
bfb59f1598
Remove last stale code 2024-01-12 20:59:19 -08:00
Antonio Scandurra
94293b3bf9 Merge remote-tracking branch 'origin/main' into cache
# Conflicts:
#	crates/gpui/src/window.rs
2024-01-12 14:31:13 +01:00
Max Brunsfeld
258c2fdad4 Fix routing of leader updates from unshared projects
Previously, leader updates in unshared projects would be sent to
all followers regardless of project, as if they were not scoped
to any project.
2024-01-11 13:47:31 -08:00
Conrad Irwin
43183538a7
Stop following when project is unshared (#4010)
Before this change the views would continue to update in the background
of the "disconnected" dialogue, which was disconcerting.

[[PR Description]]

Release Notes:

- Fixed an edge-case where following didn't handle unshare correctly
2024-01-11 11:26:56 -07:00
Kirill Bulatov
2e36b0b72a Do not split on only external directories being drag and dropped 2024-01-11 15:09:43 +02:00
Conrad Irwin
f418bd907d Stop following when project is unshared
Before this change the views would continue to update in the background
of the "disconnected" dialogue, which was disconcerting.
2024-01-10 23:09:09 -07:00
Mikayla
a5ca58354d
Fix first few asserts 2024-01-10 18:26:01 -08:00
Antonio Scandurra
1c260e6dfd Merge remote-tracking branch 'origin/main' into cache
# Conflicts:
#	crates/copilot/src/sign_in.rs
#	crates/gpui/src/window.rs
#	crates/workspace/src/pane_group.rs
2024-01-10 22:58:52 +01:00
Conrad Irwin
5dff458014
Ensure focus_in and focus_out fire on window activation (#3993)
Also:
- Rename cx.on_blur to cx.on_focus_lost
- Fix a bug where notify calls in focus handlers were ignored
- Fix a bug where vim would get stuck in the wrong mode when switching
  windows

Release Notes:

- (preview only) vim: fix switching between multiple windows
2024-01-10 10:00:07 -07:00
Antonio Scandurra
2923b71f83 Replace WindowContext::notify with WindowContext::refresh 2024-01-10 17:27:02 +01:00
Conrad Irwin
5d3f5611e5
guest promotion (#3969)
Release Notes:

- Adds the ability to promote read-only guests to read-write
participants in calls
2024-01-09 22:21:13 -07:00
Conrad Irwin
1bf33b4b61 Ensure focus_in and focus_out fire on window activation
Also:
- Rename cx.on_blur to cx.on_focus_lost
- Fix a bug where notify calls in focus handlers were ignored
- Fix a bug where vim would get stuck in the wrong mode when switching
  windows
2024-01-09 20:55:00 -07:00
Mikayla Maki
45baad2825
Remove or fix stale todos (#3990)
The software equivalent of dusting

Release Notes:

-
2024-01-09 18:37:35 -08:00
Mikayla
e786e22121
And a few more todos 2024-01-09 16:41:17 -08:00
Mikayla
9ce7ef8949
Remove the last of the major todos 2024-01-09 16:14:54 -08:00
Conrad Irwin
276bfa0fab Merge branch 'main' into guest-promotion 2024-01-09 16:28:42 -07:00
Kirill Bulatov
8b71b1d07b Do not dismiss buffer search when any modal is present
Co-authored-by: Piotr Osiewicz <piotr@zed.dev>
2024-01-09 23:29:05 +02:00
Marshall Bowers
fa53353c57
Rename IconElement to just Icon (#3974)
This PR renames the `IconElement` component to just `Icon`.

This better matches the rest of our components, as `IconElement` was the
only one using this naming convention.

The `Icon` enum has been renamed to `IconName` to free up the name.

I was trying to come up with a way that would allow rendering an
`Icon::Zed` directly (and thus make the `IconElement` a hidden part of
the API), but I couldn't come up with a way to do this cleanly.

Release Notes:

- N/A
2024-01-09 10:11:20 -05:00