Commit Graph

16958 Commits

Author SHA1 Message Date
Marshall Bowers
4e8ad363f1
Increase border width used to indicate speaking (#4077)
This PR increases the width of the border that we use to indicate when a
call participant is speaking.

This should make it more apparent in the UI when someone is speaking.

Release Notes:

- Increased the width of the ring used to indicate when someone is
speaking in a call.
2024-01-16 17:09:28 -05:00
Conrad Irwin
c8a6b0d8aa
Enable Channels for everyone (#4058)
[[PR Description]]

Release Notes:

- Adds Channels, a new mechanism for collaboration. [Read
More...](https://zed.dev/blog/channels)
2024-01-16 14:53:24 -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
Marshall Bowers
2e03c848e3
Add dedicated indicator for showing a muted call participant (#4076)
This PR improves the muted indicators to make it clearer when a call
participant is muted.

Previously we used a red border color to denote when a participant was
muted.

Now we render an indicator with an icon to more clearly indicate the
participant's muted status:

<img width="303" alt="Screenshot 2024-01-16 at 4 05 15 PM"
src="https://github.com/zed-industries/zed/assets/1486634/d30fcd84-48e7-4959-b3c4-1054162c6bd6">

Hovering over the indicator will display a tooltip for further
explanation:

<img width="456" alt="Screenshot 2024-01-16 at 4 05 25 PM"
src="https://github.com/zed-industries/zed/assets/1486634/6345846f-196c-47d9-8d65-c8d86e63f823">

This change also paves the way for denoting the deafened status for call
participants.

Release Notes:

- Improved the mute indicator for call participants.
2024-01-16 16:18:06 -05:00
Marshall Bowers
9903b7ae6e
Add color ribbon for local player (#4075)
This PR adds a color ribbon for the local player in the current call.

This fixes the alignment of the local user's avatar so that it lines up
with the rest of the collaborators in the call:

<img width="307" alt="Screenshot 2024-01-16 at 2 56 04 PM"
src="https://github.com/zed-industries/zed/assets/1486634/979ee3fa-70c9-482a-9351-020402ad68b9">

Release Notes:

- Added a color ribbon for the local player when in a call.
2024-01-16 15:17:29 -05:00
Piotr Osiewicz
ff67d9dea0 Add font name completions to ui_font_family and terminal::font_family 2024-01-16 20:32:21 +01:00
Piotr Osiewicz
f011953484 Rename all_font_families to all_font_names 2024-01-16 20:32:21 +01:00
Marshall Bowers
ca4a8b2226
Rework Avatar indicator to be more general-purpose (#4073)
This PR reworks the way we add indicators to `Avatar`s to make them more
general-purpose.

Previously we had logic specific to the availability indicator embedded
in the `Avatar` component, which made it unwieldy to repurpose for
something else.

Now the `indicator` is just a slot that we can put anything into.

Release Notes:

- N/A
2024-01-16 14:05:05 -05: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
Mikayla
52267a5dec
Adjust project search behavior to be isolated to a pane 2024-01-16 10:06:48 -08:00
Thorsten Ball
3d041f4e91
Fix overlapping block headers when using custom line height (#4071)
This fixes block headers overlapping over text in the buffer when using
a custom line height of 1.25.

It fixes the issue by making the parent container a v-flex,
vertically-justifying the content and moving from relative padding to
absolute padding for the header itself.

## Before/After

With setting:
```json
  "buffer_line_height": {
    "custom": 1.25
  },
```

### Before

![screenshot-2024-01-16-16 48
48@2x](https://github.com/zed-industries/zed/assets/1185253/8c3b977e-333f-403c-a4d3-0911f3fac5e0)

### After

![screenshot-2024-01-16-16 50
13@2x](https://github.com/zed-industries/zed/assets/1185253/2d854eba-c4c4-4bce-b60b-dd250856b08f)

### Release notes
Release Notes:

- Fixed headers in multi-buffers overlapping over content of the buffer
2024-01-16 17:27:36 +01:00
Thorsten Ball
62f5becf1f Fix rustfmt by pulling out long string into constant 2024-01-16 17:20:36 +01:00
Thorsten Ball
1cbdf2ba22 Fix overlapping block headers when using custom line height
This fixes block headers overlapping over text in the buffer when using
a custom line height of 1.25.

It fixes the issue by making the parent container a v-flex,
vertically-justifying the content and moving from relative padding to
absolute padding for the header itself.

Co-authored-by: antonio <antonio@zed.dev>
Co-authored-by: julia <julia@zed.dev>
Co-authored-by: marshall <marshall@zed.dev>
2024-01-16 17:20:27 +01:00
Antonio Scandurra
47f2d556aa
Revert "Use taffy to retrieve the parent for a given layout node" (#4070)
This reverts commit 5904bcf1c2.

Release Notes:

- N/A
2024-01-16 16:57:36 +01:00
Julia
4e0c8dcea9 Revert "Use taffy to retrieve the parent for a given layout node"
This reverts commit 5904bcf1c2.

Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2024-01-16 10:44:24 -05:00
Thorsten Ball
0bf66e486a
Call CGGetActiveDisplayList once to avoid panic (#4069)
This contains two changes in order to hopefully avoid the panic we saw
in #panics:

```
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value'
crates/gpui/src/platform/mac/display.rs:30
<backtrace::capture::Backtrace as core::fmt::Debug>::fmt
<backtrace::capture::Backtrace as core::fmt::Debug>::fmt
Zed::init_panic_hook::{closure#0}
std::panicking::rust_panic_with_hook
std::panicking::rust_panic_with_hook
std::sys_common::backtrace::output_filename
<std::panicking::begin_panic_handler::FormatStringPayload as core::panic::PanicPayload>::take_box
core::panicking::panic_fmt
core::panicking::panic
gpui::platform::mac::display::display_bounds_to_native
<gpui::platform::mac:🪟:MacWindow as gpui::platform::PlatformWindow>::bounds
<gpui:🪟:WindowContext>::window_bounds_changed
<gpui:🪟:Window>:🆕:{closure#1}
gpui::platform::mac:🪟:view_did_change_backing_properties
<gpui::platform::mac::platform::MacPlatform as gpui::platform::Platform>::run
Zed::main
<core::marker::PhantomData<core::option::Option<Zed::LocationData>> as serde:🇩🇪:DeserializeSeed>::deserialize::<&mut serde_json:🇩🇪:Deserializer<serde_json::read::StrRead>>
workspace::open_new::<Zed::restore_or_create_workspace::{closure#0}::{closure#0}::{closure#0}::{closure#2}::{closure#0}>::{closure#0}::{closure#0}
std::rt::lang_start_internal
serde_json:🇩🇪:from_trait::<serde_json::read::StrRead, core::option::Option<Zed::Panic>>
```

Two changes:
* Reduce the number of calls to `CGGetActiveDisplayList` in the hopes
that this will also reduce chances of it returning an empty list.
Previously, in the worst case, we called it 6 times. Now the worst case
is that we call it 3 times.
* Instead of calling `CGGetActiveDisplayList` to get the primary display
we do what Chromium does and construct the primary display from
NSScreen.

Release Notes:

- Fixed a bug that caused a panic that could happen when Zed attempted
to render on a sleeping display.
2024-01-16 14:40:46 +01:00
Thorsten Ball
f938bae0a2 Use NSScreen to fetch primary display
According to Chromium source, `NSScreen::screens` should always get us
one display.

We made this change because we ran into panics caused by the previous
`unwrap()` when `CGGetActiveDisplayList` might return an empty list.
2024-01-16 14:23:10 +01:00
Thorsten Ball
03bfe3ef80 Call CGGetActiveDisplayList once to avoid panic
Previously we called CGGetActiveDisplayList twice: once to get the
number of displays and then to get the displays.

We saw a panic due to no displays being returned here. As a first
attempt to fix the panic, we're reducing the amount of calls to
CGGetActiveDisplayList and just do one with the trade-off being that we
pre-allocate 32 pointers in a Vec.
2024-01-16 12:01:54 +01:00
Kirill Bulatov
ed78f705eb
Fix previous theme not being applied on startup (#4068)
Fixes `[2024-01-16T09:21:54Z ERROR util]
crates/theme/src/settings.rs:172: theme not found: One Light` error from
the log after
d84785f7e8

Release Notes:

- N/A
2024-01-16 11:45:06 +02:00
Kirill Bulatov
074966427d Fix previous theme not being applied on startup 2024-01-16 11:23:34 +02:00
Kirill Bulatov
ec3cfc33d6
Adds a way to select items under multiple carets (#4067)
Deals with https://github.com/zed-industries/community/issues/2374

Release Notes:

- Added a way to select items under multiple carets with
`editor::SelectNext` and `editor::SelectPrevious` commands
2024-01-16 11:08:48 +02:00
Kirill Bulatov
25abe8f981 Fix the tests 2024-01-16 10:58:27 +02:00
Kirill Bulatov
fbb363e83a Add tests 2024-01-16 10:07:31 +02:00
Conrad Irwin
18739477f7 Clippy 2024-01-15 20:12:20 -07:00
Conrad Irwin
036e637208 Disallow self-management for admins 2024-01-15 19:31:01 -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
47971ec2c7
Add command palette action events (#4065)
Release Notes:

- N/A
2024-01-15 20:31:34 -05:00
Joseph T. Lyons
268d156fad Add command palette action events 2024-01-15 20:22:47 -05:00
Max Brunsfeld
deac172e39
Restore re-rendering of editors on buffer font size changes (#4064)
Now that views are cached, we need to explicitly `.notify()` text
editors when the buffer font size changes.

* [x] Notify editors when settings change, or adjusting buffer font size
* [x] Figure out why non-focused editors still do not re-render when
adjusting buffer font size
* [x] Reset buffer font size adjustment when the size is updated in the
user's settings
2024-01-15 17:13:13 -08:00
Max Brunsfeld
d84785f7e8 Put back logic for resetting buffer font adjustment on settings change. 2024-01-15 17:03:02 -08:00
Max Brunsfeld
1e755aa00f Notify global observers when removing a global 2024-01-15 17:02:20 -08:00
Max Brunsfeld
8f1633e798 Iterate from leaf to root when marking views dirty in notify 2024-01-15 16:49:06 -08:00
Conrad Irwin
f220323176
Fix fallback font (#4062)
As this is used if you mis-spell "buffer_font_family", it should be
monospace.

Also treat "Zed Mono" and "Zed Sans" as valid fonts

Follow up to #4045

Release Notes:

- Fixes font validation to allow "Zed Mono" as a valid font
2024-01-15 17:08:04 -07:00
Max Brunsfeld
8f262892a0 Notify editors on buffer font size changes 2024-01-15 14:53:24 -08:00
Max Brunsfeld
e57c32effb
Avoid playing newly published audio tracks when deafened (#4040)
Release Notes:

- Fixed a bug where the 'deafen' button would only apply to audio from
the call's current participants, but not any participants who joined
after the button was pressed.
- Fixed a bug where after being granted write access to a channel, the
microphone icon appeared non-muted, even though audio was not shared.
2024-01-15 14:08:49 -08:00
Max Brunsfeld
e90794d3ec Add and enhance tests for muting/deafening, fix exposed logic errors 2024-01-15 14:03:38 -08:00
Kirill Bulatov
55671eac40 Select next/previous word for multiple carets if possible 2024-01-15 23:42:36 +02: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
Antonio Scandurra
b565c44a9e
Avoid panicking when closing a dragged tab (#4057)
Release Notes:

- Fixed a panic that could occur when closing a tab while dragging it.
2024-01-15 22:34:33 +01:00
Conrad Irwin
f0ed80cd8e Fix fallback font
As this is used if you mis-spell "buffer_font_family", it should be
monospace.

Also treat "Zed Mono" and "Zed Sans" as valid fonts
2024-01-15 14:32:48 -07:00
Joseph T. Lyons
24db41fcdd Remove debugs 2024-01-15 16:29:58 -05:00
Joseph T. Lyons
355d1fca82 Remove button event function 2024-01-15 16:28:28 -05:00
Joseph T. Lyons
148c294c02 Removed button event 2024-01-15 16:26:56 -05:00
Joseph T. Lyons
ba9a9f4f17 Add more open events
project search
diagnostics
welcome page
2024-01-15 16:26:04 -05:00
Piotr Osiewicz
9a70a89477
Fix project panel being toggled on workspace startup. (#4059)
A sequence of events: Launch Zed -> Quit Zed -> Launch Zed would leave
you with a project panel in a a different state on each open (e.g. if it
is open on 1st one, 2nd run will have it closed). We were essentially
not tracking whether the deserialization took place.

Release Notes:

- Fixed project panel being toggled on/off on startup due to incorrect
tracking of serialization state (solves
https://github.com/zed-industries/community/issues/2406)
2024-01-15 22:23:16 +01:00
Conrad Irwin
97047ffaca Enable Channels for everyone 2024-01-15 13:33:58 -07:00
Kirill Bulatov
e2f08a6cca
Add LSP logs into the end of the editor, not after its caret (#4060)
Also prevent tabs from being added in readonly editors

Release Notes:

- Fixed LSP logs being inserted into the editor incorrectly
- Fixed `editor::Tab` action inserting tabs in read-only files
2024-01-15 22:22:54 +02:00
Kirill Bulatov
92add99260 Add LSP logs into the end of the editor, not after its caret
Also prevent tabs from being added in readonly editors
2024-01-15 22:12:52 +02: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