Refs https://github.com/zed-industries/zed/pull/4131
Refs https://github.com/zed-industries/community/issues/2415
Previously, when a view cache miss occurred during paint, we would
either use the element produced during layout or create a new, detached
node layout node. In both cases, we would issue a call to `draw`.
The problem with this approach, however, is that `draw` would always
paint the element at the given `bounds.origin`, which was required when
the layout node was detached but harmful when the element was already
embedded in the layout tree and already knew its bounds. In this second
case, in fact, it was as if we were positioning the element "twice",
which caused content to jump.
Release Notes:
- N/A
This PR enables cursors for remote participants.
They are shown for 2 seconds when you focus a buffer, and then on hover.
Release Notes:
- Added usernames next to remote cursors
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
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.
This reverts commit 345b983c8e.
This seems to have caused only the first line of panics to be reported
in production builds.
Release Notes:
- (Added|Fixed|Improved) ...
([#<public_issue_number_if_exists>](https://github.com/zed-industries/community/issues/<public_issue_number_if_exists>)).
This PR turns `FacePile` back into a component.
Our usage of it seemed a little weird, with us calling `render`
manually.
We're now implementing `Styled` on `FacePile` through its inner `Div` so
that we can apply the `p_1` at the call site.
Release Notes:
- N/A
Also, factors out the fluent building APIs from IntoElement into their
own traits.
Also makes the project panel context menu initialization fluent:
<img width="1328" alt="Screenshot 2024-01-18 at 3 33 45 PM"
src="https://github.com/zed-industries/zed/assets/2280405/3468b6f2-07f0-48cf-bec1-ac0379333209">
Release Notes:
- Fixed pop in when right clicking on the project panel.
This PR makes clicking the label inside of a `ListHeader` with a
disclosure also toggle the disclosure.
Release Notes:
- Added support for clicking the "Online", "Offline", and "Requests"
headers in the contact list to toggle their expansion.
I'm not yet sure whether this is 100% correct, but it seems to alleviate
the following issue:
`When opening a dock, the panel doesn't appear right away. An empty dock
is briefly visible.`
Release Notes:
- Fixed panel layout being incorrect for a brief time after opening
(fixes https://github.com/zed-industries/community/issues/2415)
This uploads apples crash reports to our servers when telemetry is
enabled.
Rather than jumping via the website, it uploads to collab directly. (I'd
like
to update the panic handler to do this too to make it possible to work
on that end-to-end without zed.dev running).
Release Notes:
- Added reporting of crashes when telemetry is enabled
Also, some fun test helpers
Co-Authored-By: Mikayla <mikayla@zed.dev>
You can now use .debug_selector() to make it possible for tests to find
a given element,
and .debug_bounds() to find the coordinates of where it was painted.
Release Notes:
- (Added|Fixed|Improved) ...
([#<public_issue_number_if_exists>](https://github.com/zed-industries/community/issues/<public_issue_number_if_exists>)).
Previously, we were trying not to synchronize the terminal too often
because there could be multiple layout/paint calls prior to rendering a
frame.
Now that we perform a single render pass per frame, we can just
synchronize the terminal state. Not doing so could make it seem like
we're dropping frames.
Release Notes:
- Improved terminal rendering performance.
* Use the impersonator id to prevent these tokens from counting against
the impersonated user when limiting the users' total of access tokens.
* When connecting using an access token with an impersonator add the
impersonator as a field to the tracing span that wraps the task for that
connection.
* Disallow impersonating users via the admin API token in production,
because when using the admin API token, we aren't able to identify the
impersonator.
This PR updates the speaker borders to use the regular `info` status
color instead of the `info_border` color.
This should provide more contrast and make it clearer as to who is
speaking.
Release Notes:
- Made the active speakers' borders more visible when in a call.
This fixes the issue of `Cmd-shift-f` not refocusing the search bar when
a project-wide search already exists.
It also fixes the handlers for "search in new" and "new search".
Release Notes:
- N/A
This fixes the issue of `Cmd-shift-f` not refocusing the search bar when
a project-wide search already exists.
It also fixes the handlers for "search in new" and "new search".
Co-authored-by: Kirill <kirill@zed.dev>
This is just moving code around and doesn't change behaviour, but it's
something Julia and I bumped into yesterday while writing docs.
Release Notes:
- N/A
Previously, we were trying not to synchronize the terminal too often
because there could be multiple layout/paint calls prior to rendering
a frame.
Now that we perform a single render pass per frame, we can just synchronize
the terminal state. Not doing so could make it seem like we're dropping frames.
* Use the impersonator id to prevent these tokens from counting
against the impersonated user when limiting the users' total
of access tokens.
* When connecting using an access token with an impersonator
add the impersonator as a field to the tracing span that wraps
the task for that connection.
* Disallow impersonating users via the admin API token in production,
because when using the admin API token, we aren't able to identify
the impersonator.
Co-authored-by: Marshall <marshall@zed.dev>
Adding the typos crate to our CI will take some doing, as we have
several tests which rely on typos in various ways (e.g. checking state
as the user types), but I thought I'd take a first stab at fixing what
it finds.
Release Notes:
- N/A
This PR cleans up a handful of references in doc comments in the `lsp`
crate so that `rustdoc` will link and display them correctly.
Release Notes:
- N/A
When testing Zed locally, it's rarely necessary to log in the real with,
via Zed.dev and GitHub. We usually use `zed-local`. Since zed.dev is not
going to be open source (at least right away), this PR removes it from
our local development workflow.
* Remove zed.dev from the Procfile
* Change the `seed` script to not create an admin user for your
signed-in github user
* Instead have both `zed-local` and the `seed` script read from an
`.admins.json` file, which the user can create in order to customize who
they sign in as when running `zed-local`.
* Update all of the docs for building and developing zed.
When the `List` element's state is `ListState::reset()`, it eagerly
trashes it's cached element heights in anticipation of a prompt render.
But, due to the recent `display_layer` changes, that re-render is not
always forthcoming. This is a problem for `ListState::scroll()`, which
depends on these cached elements to correctly calculate the new logical
scroll offset.
Solutions we attempted:
- Cache the element heights and continue the scroll calculation
- This was conceptually incorrect, reset should only be called when the
underlying data has been changed, making any calculation with the old
results meaningless.
- Lazily re-compute the element heights in scroll
- Beyond being a non-trivial refactor, this would probably also cause us
to double-render the list in a single frame, which is bad.
- Cache the scroll offset and only calculate it in paint
- This solution felt awkward to implement and meant we can't supply
synchronous list scroll events.
- Delay resetting until paint
- This means that all of the other APIs that `ListState` supplies would
give temporarily incorrect results, worsening the problem
Given these issues, we settled on the solution with the least
compromises: drop scroll events if the state has been `reset()` between
`paint()` and `scroll()`. This shifts the responsibility for the problem
out of the List element and into consumers of `List`, if you want
perfectly smooth scrolling then you need to use `reset()` judiciously
and prefer `splice()`.
That said, I tested this by aggressively scrolling the Collab panel, and
it seems to work as well as it did before.
This PR also includes some initial testing infrastructure for working
with input from the platform and rendered elements.
Release Notes:
- N/A
Instead, admins are specified using a JSON file, 'admins.json'. This file is
gitignored. If it is not present, there is a default list of admins in
'admins.default.json'.
This PR decreases the size of the timestamps in the assistant's
conversation editor.
Ideally we'd want to align the baseline of the timestamp text with the
text in the sender button. I spent a while trying to do this, but it
seems like it may be pretty tricky.
Release Notes:
- Decreased the size of timestamps in the assistant panel conversation
editor.
There's a deadlock that we're seeing when joining a room, which we think
is a bug in the LiveKit client.
Also, we're still getting crashes when leaving calls:
https://github.com/livekit/client-sdk-swift/issues/299.
At this point, we believe both problems are due to recent changes to the
LiveKit swift sdk.
This happens a lot in guest workflows where they open the call with a
link and are jumped straight to a shared workspace.
Release Notes:
- Fixed opening the chat automatically in new windows
This PR adds the `color` crate, which will be the home of a number of
color-related utilities, and also acts as an interface between
[`palette`](https://crates.io/crates/palette) and the way `gpui` colors
work.
The goal of this crate is to centralize color utilities like mixing and
blending, building color ramps and sets of colors for state and more.
## Todo:
- [x] hex -> Color
- [x] Color mixing
- [x] Color blending using blend modes (overlay, multiply, etc)
- [ ] ~~Build color ramp from color~~
- [x] Build state set from color
- [ ] ~~Update Theme to use the color crate~~
Release Notes:
- None (Internal changes: Adds the `color` crate for working with
colors.)
In #3910 we made the welcome screen use the same background color as the
editor.
However, this later regressed in
cdd5cb16ed.
This PR fixes that regression and restores the correct color for the
welcome page.
Release Notes:
- Fixed the background color of the welcome screen.
Before this change we wouldn't submit all possible primitives of the
same kind that are less-than the max order.
Result was that we would submit, say, 10 paths each in a separate batch
instead of actually batching them.
This was overly strict because even if the order of two different
primitives was the same, we could have still batched the 1st primitive
kind, if its implicit ordering was less than 2nd kind.
Example: say we have the following primitives and these orders
5x paths, order 3
2x sprites, order 3
Previously, we would submit 1 path, 1 path, 1 path, 1 path, 1 path, then
the sprites.
With this changes, we batch the 5 paths into one batch.
Co-authored-by: Antonio <antonio@zed.dev>
This "adds" the keybindings I was missing in Vim mode (e.g. `Ctrl-[` to
cancel a selection) by fixing the definitions in the keymap from
`Ctrl+[` to `Ctrl-[`.
Previously, we were using `size_of` but passing the wrong type in
(`MonochromeSprite` instead of `PathSprite`). This caused us to read
outside of the `sprites` smallvec and triggered the segfault. This
reverts #4078 because I don't think using a `SmallVec` was the issue (it
might have masked this problem though, because we would most of the time
copy from the stack and not from the heap).
With this pull request we are also fixing another potential source of
segfaults, due to checking if we exhausted the instance buffer too late
when drawing underlines.
Release Notes:
- Fixed a crash that could happen during rendering.
Previously, we were using `size_of` but passing the wrong type in
(MonochromeSprite instead of PathSprite). This caused us to read outside
of the `sprites` smallvec and triggered the segfault.
We're occasionally seeing a crash in MetalRenderer::draw.
Looking at the backtrace, it seems almost certainly to be happening in
the call to `ptr::copy_nonoverlapping` on line 604 (see `#Don't Panic!`
channel notes)
As we already have added bounds checking to the destination, it seems
most
likely (however improbable) that somehow we're getting an invalid Ptr
and
length from the SmallVec.
To try and make progress on this, let's try a Vec for a bit lest there
is a subtle issue in SmallVec (though I couldn't spot one).
Release Notes:
- (maybe) Fixes SEGFAULT in MetalRenderer::draw
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.
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.
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.
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
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)
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
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>
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.
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.
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
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
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.
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)
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
This was causing the Metal shaders to incorrectly interpret the
primitives submitted by GPUI, which in turn caused rendering to be
completely borked.
Release Notes:
- N/A
Honestly thought this was a bug with our terminal port lol. Turns out
its an oversight in the `dialoguer` crate but its seems pretty easy to
work around so might as well
Release Notes:
- N/A
LSP log editor caused recursive flood of messages, and feedback editor
is better with people writing their own feedback.
Release Notes:
- Fixed hanging due to excessive logs when browsing Copilot LSP logs
This fixes the click event on the "copy error message" button by
changing the `editor` element to ignore mouse-down events when the
default was prevented. That's similar to how `div` does it.
Release Notes:
- Fixed a bug that prevented "copy error message" button from being
clicked.
- 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
Ensure we `panic()` instead of crash on graphics memory buffer overflow
Also bump the buffer size to 32Mb from 8Mb to make this rarer (but still
possible)
Release Notes: Fixes some crahes due to lack of graphics buffer spacae