This time around, we address the flicker seen in #3857 by querying the active item (that might've just been added),
as it knows whether it has focus even if the parent Pane does not.
Co-authored-by: Thorsten <thorsten@zed.dev>
We recently doubled the size of the `ELEMENT_ARENA` after someone ran
into a panic due to the arena running out of space.
This adds some logging so that we can hopefully develop a better
understanding of when the element area's allocation is elevated.
Release Notes:
- N/A
This fixes https://github.com/zed-industries/community/issues/2442 for
me.
Previously, the tab bar buttons would stay when the chat panel was
opened (and received focus) until something else was drawn (or caused a
render?)
With this change, the tab bar buttons are only shown if the pane was
focus.
I'm not sure about the side-effects of this, but the toolbar still seems
to work fine.
This fixes the performance problem we saw in
https://github.com/zed-industries/community/issues/2405.
In a trace we could see that if a font is missing we'd constantly look
it up and never cache that it's missing.
This changes that and does cache the font-is-missing result.
Drawback is that one would need to restart Zed after installing a
missing font that was configured in settings. That seems acceptable for
now, though.
Release Notes:
- Improved rendering performance when configured fonts are missing on
the system.
We recently doubled the size of the `ELEMENT_ARENA` after someone ran
into a panic due to the arena running out of space.
This adds some logging so that we can hopefully develop a better
understanding of when the element area's allocation is elevated.
Co-authored-by: Antonio <antonio@zed.dev>
This fixes the performance problem we saw in https://github.com/zed-industries/community/issues/2405.
In a trace we could see that if a font is missing we'd constantly look
it up and never cache that it's missing.
This changes that and does cache the font-is-missing result.
Drawback is that one would need to restart Zed after installing a
missing font that was configured in settings. That seems acceptable for
now, though.
Co-authored-by: Antonio <antonio@zed.dev>
This fixes a panic we just saw on nightly. It's the first time we
see this panic, so I think it's pretty safe to assume having twice as
much capacity will fix it.
This PR does some cleanup of the `gpui` docs, making sure we're linking
things appropriately and following good Rust documentation style.
Release Notes:
- N/A
* Fixed jumping of list item when the separator appeared and
disappeared.
* Fixed a bug where the selection got into a valid state when updating
the matches
Release Notes:
- Fixed an issue where the file finder's selection got into a state
where nothing was selected after filtering the matches.
This PR adds a barebones README to the `gpui` crate, just so folks have
somewhere to land on when we link them here from
[gpui.rs](https://www.gpui.rs/).
We can flesh this out as we go.
Release Notes:
- N/A
- Distinct colors to make it not confusing
- Avoid overflowing the edge of the editor when the message is long
Release Notes:
- Improved display of diagnostic blocks (F8)
- [x] Fill in GPL license text.
- [x] live_kit_client depends on live_kit_server as non-dev dependency,
even though it seems to only be used for tests. Is that an issue?
Release Notes:
- N/A
We were leaking the previous active item's subscription, which meant
that we would receive the `MatchesInvalidated` event as many times as we
changed items.
Release Notes:
- Fixed a performance issue when switching the active item while the
search bar was open.
We were leaking the previous active item's subscription, which meant
that we would receive the `MatchesInvalidated` event as many times as
we changed items.
Co-Authored-By: Thorsten Ball <thorsten@zed.dev>
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
This isn't my favorite idea of a fix, but it does work for now, and it
seems likely the terminal will need to configure other aspects of action
dispatch in the future.
In the future we should explore making it possible to do this via the
keymap, either by making disabling bindings more robust; or by having a
way to indicate immediate mode per binding.
Release Notes:
- Fixed a bug where cmd-k in terminal took 1s
This isn't my favorite idea of a fix, but it does work for now, and it
seems likely the terminal will need to configure other aspects of action
dispatch in the future.
In the future we should explore making it possible to do this via the
keymap, either by making disabling bindings more robust; or by having a
way to indicate immediate mode per binding.
When following someone else we saw jitter because
`ScrollPositionChanged` events were battling `SelectionsChanged` events,
both of which were scrolling the viewport.
This ignores the ScrollPositionChanged if autoscrolling is on.
Co-authored-by: Antonio <antonio@zed.dev>
Co-authored-by: Julia <julia@zed.dev>
Fixes
* LSP servers never being shut down on worktree release
* worktrees (and LSP servers) being re-created for settings files on
every opening
Also,
* removes `async` from `workspace_configuration` to simplify the code:
we only return static configurations now
Release Notes:
- Fixed excessive LSP server creation for Zed settings files
Before this change a diagnostic message with a trailing newline (e.g.
`line1\nline2\n`) would be rendered in a `Block` with `line_height: 2`.
But the content we then display in this block had 3 "lines", which
pushed the content out of the block.
This fixes the issue by trimming the newlines at the end from the
diagnostics.
Release Notes:
- Fixed rendering multi-line diagnostic errors inside of the editor.
This optimizes rendering time by saving computation of the layer_id and
comparison when inserting it into the `BTreeMaps`.
Co-authored-by: Antonio <antonio@zed.dev>
Before this change a diagnostic message with a trailing newline (e.g.
`line1\nline2\n`) would be rendered in a `Block` with `line_height: 2`.
But the content we then display in this block had 3 "lines", which
pushed the content out of the block.
This fixes the issue by trimming the newlines at the end from the
diagnostics.
Co-authored-by: Antonio <antonio@zed.dev>
I was unable to run the collab tests locally because I would run out of
file descriptors.
From some digging it turned out that tokio allocates a new file
descriptor to do work on the CurrentThread using KQUEUE.
We create a new tokio Runtime with each database connection, and these
database connections were being retained by the Client, which is
retained by the Context.
Cleaning up our leaked contexts (and an unrelated retain cycle in the
UserStore) fixes the problem (though does make me
wonder if a different approach might be preferrable).
Release Notes:
- N/A
rust analyzer has a tendency to return markdown of the form:
```rust
// <-- note the leading space
blah blah blah
```
This is clearly defectuous, so we used to .trim() the output.
Unfortunately we trim after applying syntax highlighting, so that causes
the output to look goofy.
Fix this by updating the highlighting when we trim.
[[PR Description]]
Release Notes:
- Fixed a bug where syntax highlighting was off in hover tooltips
I was unable to run the collab tests locally because I would run out of
file descriptors.
From some digging it turned out that tokio allocates a new file
descriptor to do work on the CurrentThread using KQUEUE.
We create a new tokio Runtime with each database connection, and these
database connections were being retained by the Client, which is
retained by the Context.
Cleaning up our leaked contexts fixes the problem (though does make me
wonder if a different approach might be preferrable).
Don't allow granting guests write access in a call where the channel
or one of its ancestors requires the zed CLA, until that guest has
signed the Zed CLA.
Co-authored-by: Marshall <marshall@zed.dev>
* Do not add fonts' `font_family` into the font completion list, if
there's no corresponding attribute in the font data
* Remove `font_style_name` and `font_name` attribute from the completion
options, since those bring `-Italic`, `-Bold` variants that are not
family names (which we use to load the fonts, so they are useless)
Release Notes:
- Improved font family names completion in the settings
rust analyzer has a tendency to return markdown of the form:
```rust
// <-- note the leading space
blah blah blah
```
This is clearly defectuous, so we used to .trim() the output.
Unfortunately we trim after applying syntax highlighting, so that causes
the output to look goofy.
Fix this by updating the highlighting when we trim.
In the old world, panel loading happened strictly before workspace
deserialization. Now it's inverted.
Fix this by storing on the dock the serialized state so they can restore
state as panels are loaded.
[[PR Description]]
Release Notes:
- Fixed Zed forgetting which panels were open on boot.
([#2406](https://github.com/zed-industries/community/issues/2406)).
In the old world, panel loading happened strictly before workspace
deserialization. Now it's inverted.
Fix this by storing on the dock the serialized state so they can restore
state as panels are loaded.
- it seems like layer.drawable_size() is 0,0 in metal_renderer.rs:189
- we set this in two places:
- in response to a CALayerDelegate setFrameSize: event
- in response to a CALayerDelegate viewDidChangeBackingProperties:
event.
- it looks like if we don't set it in either of these cases we get a
different failure mode: the view is zoomed just wrong.
- That said, I can reproduce the screenshot if .scale_factor() returns
0.
- This might happen if [nativeWindow screen] is nil, which happens when
the window is off screen.
- possible that zed started with offscreen window?
- I would expect that viewDidChangeBackingProperties would fire when
that changed.
- potential fix: default to 2.0
Release Notes:
- Fixed Zed occasionally rendering blank on laungh
([#2422](https://github.com/zed-industries/community/issues/2422)).
Add support for mapping `jk` to escape in vim mode.
This changes the behaviour of the keymatches when there are pending
matches.
Before: Even if there was a pending match, any complete matches would be
triggered and the pending state lost.
After: If there is a pending match, any complete matches are delayed by
1s, or until more keys are typed.
Release Notes:
- Added support for mapping `jk` in vim mode
([#2378](https://github.com/zed-industries/community/issues/2378)),
([#176](https://github.com/zed-industries/community/issues/176))
I'm sure @iamnbutler can do a better job here, this is just hacky, but
the size of the icon when doing `Cmd+tab` has been bugging me, so I
thought I'd resize them quickly to the dimensions the Stable/Preview
icons have.
Release Notes:
- N/A
Before this change if you had a matching binding and a pending key,
the matching binding happened unconditionally.
Now we will wait a second before triggering that binding to give you
time to complete the action.
This matches Neovim behaviour by setting the mode to `Normal` when using
search while in visual mode.
Release Notes:
- Fixed Vim mode not switching to normal mode from visual mode when
using search (`/`) while in visual mode.
This PR fixes an issue where having a lot of participants in a call
could cause the avatars/facepiles to overflow the title bar, pushing the
call controls off-screen.
The participant list will now scroll when it would otherwise exceed the
available space:
https://github.com/zed-industries/zed/assets/1486634/806c77e6-bd4c-4864-8567-92e0960734ee
Release Notes:
- Fixed participant list overflowing the title bar.
CGDisplayBounds returns data in "global display coordinates" (which are
the same as Zed's coordinates), different from the NS APIs which use
"screen coordinates" (which have the Y axis inverted)
Also remove some transmutes while we're at it
Release Notes:
- Fixed position of notifications on secondary displays
Fixes */# in visual mode, and avoids setting up irritating state.
[[PR Description]]
Release Notes:
- vim: Improved `*` and `#` to not toggle Zed's search state. Instead we
now use the regex to identify start and end of words (more like vim).
CGDisplayBounds returns data in "global display coordinates" (which are
the same as Zed's coordinates), different from the NS APIs which use
"screen coordinates" (which have the Y axis inverted)
Also remove some transmutes while we're at it
This PR adds more terminal colors that were present in the Zed1 themes
to the Zed2 theme.
Namely, we now have the `dim_` variants for the various ANSI colors and
various `foreground` colors.
Release Notes:
- Improved terminal colors.
Fix a panic caused by toggleFullScreen on one window untoggling
full-screen on
another.
I managed to reproduce this only once, which makes me sad, but this
change
should fix it regardless.
https://zed-industries.slack.com/archives/C04S6T1T7TQ/p1705631681238979
Release Notes:
- Fixed an occasional panic when opening a new fullscreen window.
This PR styles the notifications for the notification panel.
These are the notification toasts you receive when you have a new
notification (e.g., a mention in chat):
<img width="423" alt="Screenshot 2024-01-19 at 11 39 16 AM"
src="https://github.com/zed-industries/zed/assets/1486634/a1fc7a67-5aad-4cb2-8dc9-35d302984fcb">
Release Notes:
- Improved the look of toasts for incoming notifications.
This PR updates the tenses used by the summary line of doc comments to
match the [Rust API documentation
conventions](https://rust-lang.github.io/rfcs/1574-more-api-documentation-conventions.html#summary-sentence).
Specifically:
> The summary line should be written in third person singular present
indicative form. Basically, this means write ‘Returns’ instead of
‘Return’.
I'm sure there are plenty occurrences that I missed.
Release Notes:
- N/A
This PR fixes the assistant panel header when in the conversation
history view to hide the irrelevant tools and/or the slots where they
would go.
Release Notes:
- Improved the assistant panel header when viewing conversation history.
Before this change, we would send requests to language servers without
canceling them even if we never wait for their response.
Example: when doing document highlights, we'd send a request (modulo
debouncing) whenever a change was made, ignoring previously sent
requests that might still be in-flight.
With this change, we now send a Cancel request (from the LSP spec) to
the language server in case no one listens to the response anymore
(which is what happens when the `Future` returned by `request_internal`)
is dropped.
The layout of the chat panel wasn't correct but this visual glitch was
being masked by caching, because it seems like Taffy was rendering
things slightly differently when laying out the chat panel as a detached
layout node. This wasn't an issue with caching, but rather an
inconsistency with how Taffy lays things out.
Release Notes:
- N/A
The layout of the chat panel wasn't correct but this visual glitch
was being masked by caching, because it seems like Taffy was rendering
things slightly differently when laying out the chat panel as a detached
layout node. This wasn't an issue with caching, but rather an inconsistency
with how Taffy lays things out.
Co-Authored-By: Thorsten <thorsten@zed.dev>
Co-Authored-By: Piotr <piotr@zed.dev>
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>