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
This PR changes the approach we're using to render the channel buttons
to use a more straightforward (and less hacky) approach.
### Motivation
Even with the variety of hacks that were employed to make the current
approach work, there are still a number of issues with the current
solution:
- Hovering in the empty space to the left of a channel doesn't correctly
apply the hover background to the container for the channel buttons
- Hovering to the very right of the collab panel (right on top of the
drag handle) causes the channel button container to apply its hover
background without applying it to the rest of the row
- The buttons would still get pushed off to the right by the indent
space in the channel tree, resulting in jagged indicators at small sizes
Additionally, the rectangular background placed behind the channel
buttons still didn't look great when it overlapped with the channel
names.
### Explanation
For these reasons, I decided to explore a simpler approach that
addresses these issues, albeit with some tradeoffs that I think are
acceptable.
We now render the absolutely-positioned button container as a sibling
element of the `ListItem`. This is to avoid issues with the container
getting pushed around based on the contents of the `ListItem` rather
than staying absolutely positioned at the end of the row.
We also have gotten rid of the background for the button container, and
now rely on the background of the individual `IconButton`s to occlude
the channel name behind them when the two are overlapping.
Here are some examples of the new UI in various configurations:
#### When the channel entry is hovered
<img width="270" alt="Screenshot 2024-01-09 at 6 15 24 PM"
src="https://github.com/zed-industries/zed/assets/1486634/0207a129-30eb-4067-8490-3b6c9cbf75ea">
#### Overlapping with the channel name
<img width="229" alt="Screenshot 2024-01-09 at 6 15 43 PM"
src="https://github.com/zed-industries/zed/assets/1486634/0a67507e-45c8-4325-a71e-d416edc3a115">
#### Narrow collab panel
<img width="116" alt="Screenshot 2024-01-09 at 6 16 07 PM"
src="https://github.com/zed-industries/zed/assets/1486634/887ebaa3-e4d6-4497-9141-afcc8b7cd356">
### Tradeoffs
The new approach comes with the following tradeoffs that I am currently
aware of:
The occlusion can look a little weird when the icons are in the middle
of a channel name (as opposed to fully occluding the end of the channel
name):
<img width="190" alt="Screenshot 2024-01-09 at 6 24 32 PM"
src="https://github.com/zed-industries/zed/assets/1486634/0062b806-1b8f-47eb-af8d-f061d9829366">
Hovering one of the icons causes the icon to be hovered instead of the
row:
<img width="232" alt="Screenshot 2024-01-09 at 6 31 38 PM"
src="https://github.com/zed-industries/zed/assets/1486634/cbcc1a45-64d2-4890-8ad6-c5a5ee961b86">
Release Notes:
- Improved the way channel buttons are displayed.
We had introduced these mutexes at a time when `gpui2` required app
entities to be `Sync`, but they are no longer needed. Removing them now
because we're trying to find out why we're sometimes getting crashes and
deadlocks in livekit, and we didn't before.
This PR cleans up a number of references in doc comments in the `ui` and
`theme` crates so that `rustdoc` will link and display them correctly.
Release Notes:
- N/A
This PR removes the `Default` impl for `StatusColors`.
Since we need default light and dark variants for `StatusColors`, we
can't use a single `Default` impl.
Release Notes:
- N/A
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
This PR adds some basic stories for collab notifications to make them
easier to work on:
<img width="1076" alt="Screenshot 2024-01-08 at 9 43 39 PM"
src="https://github.com/zed-industries/zed/assets/1486634/4a0adcfa-1134-49c2-b589-74ac1d52af4c">
I factored out a `CollabNotification` component that defines the general
structure for one of these notifications, and this is the component that
we use in the stories, with representative values passed to it to
simulate the different instances of the notification.
We can't use the actual notification components in the stories due to
their data dependencies.
Release Notes:
- N/A
This PR fixes an issue where right-click on any project panel entry
would cause the context menu on the root of the project panel
(introduced in #3954) to deploy.
We need to stop propagation in the handler on the inner project panel
list items so that the click event doesn't bubble up the tree.
Release Notes:
- Fixed an issue where the project panel was always deploying the root
context menu rather than on the clicked item.
This PR fixes the border color used when the email input in the feedback
dialog is invalid.
Previously this was hardcoded just to `red` instead of using the
appropriate color from the theme.
<img width="653" alt="Screenshot 2024-01-08 at 5 40 07 PM"
src="https://github.com/zed-industries/zed/assets/1486634/ea01cd76-d661-4512-b668-c82b8d00d84e">
Release Notes:
- Fixed the border color used for the email input in the feedback dialog
when an invalid email is entered.
- First pass of real access control
- Check user is host for host-broadcasted project messages
- Only allow read-write users to update buffers
[[PR Description]]
Release Notes:
- (Added|Fixed|Improved) ...
([#<public_issue_number_if_exists>](https://github.com/zed-industries/community/issues/<public_issue_number_if_exists>)).
This essentially shaves off about 10% off of an incremental build after
project change and potentially more if you're changing stuff like
`welcome` that's very close to the `zed` crate in the dep graph. That's
because macro expansion takes place even in incremental builds it seems?
And zed (lib) + zed (bin) could take up to 4 seconds out of an
incremental build, which is a *lot* in a 10s build. In reality though it
shaves 1 second off of 5 seconds incremental 'welcome'/ 1s off of 10s
'project' builds.
Note that we had `assets` crate in the past (removed in #2575 /cc
@maxbrunsfeld), but this is a bit different, because `assets` is a
dependency of *just* zed and nothing else. We essentially cache macro
expansion results ourselves.
Release Notes:
- N/A
This PR improves the empty states for the chat panel:
- The signed-out state has been updated to match our other signed-out
panel states.
- A new state has been added to account for the case where a user is
signed in but doesn't have an active chat.
Release Notes:
- Improved the design of empty states in the chat panel.
Currently when one runs `cargo build` twice without changing anything,
zed lib and binary are gonna get rebuilt every time. I checked out cargo
logs and it turns out we were querying wrong path to `.git/logs/HEAD` in
our build.rs, causing it to rerun on every build and thus marking zed
lib as dirty.
See logs (`CARGO_LOG=cargo::core::compiler::fingerprint=trace cargo
build`):
```
0.501173792s INFO cargo::core::compiler::fingerprint: fingerprint dirty for zed v0.120.0 (/Users/hiro/Projects/zed/crates/zed)/RunCustomBuild/TargetInner { ..: custom_build_target("build-script-build", "/Users/hiro/Projects/zed/crates/zed/build.rs", Edition2021) }
0.501180417s INFO cargo::core::compiler::fingerprint: dirty: FsStatusOutdated(StaleItem(MissingFile("/Users/hiro/Projects/zed/crates/zed/.git/logs/HEAD")))
```
The path to .git directory is relative to crates/zed and not to the
workspace's root.
/cc @maxbrunsfeld
Release Notes:
- N/A
This PR fixes the inconsistent sizing between the buffer search and the
project search when both elements have both a primary and secondary item
shown in the toolbar.
Release Notes:
- Fixed some inconsistent sizing in the buffer search and project search
when both have two rows of tools in the toolbar.
This PR removes a commented-out implementation for the `ActiveTheme`
trait on the `WindowContext`.
We don't need this implementation as we can go through the
`AppContext`'s implementation.
Release Notes:
- N/A
This PR fixes the layout shift that would occur in the channel list when
opening a rename editor for a channel.
Release Notes:
- Fixed layout shift when opening a rename editor for a channel.
This PR adjusts the spacing of the indicator showing the number of extra
call participants that appears after the facepile:
<img width="242" alt="Screenshot 2024-01-08 at 1 09 39 PM"
src="https://github.com/zed-industries/zed/assets/1486634/6d9cbefa-3b4e-4501-ab11-51026dfb5b6c">
Release Notes:
- Added more space between the call participant facepile and the number
indicating additional call participants.
This PR updates the styling of the tree branches in the current call
section of the collab panel:
- Fixed the gap between the notes and chat items.
- We now overdraw the tree branch on the notes item so it fills the gap.
- The tree branch lines are now thinner.
<img width="231" alt="Screenshot 2024-01-08 at 12 35 35 PM"
src="https://github.com/zed-industries/zed/assets/1486634/844c9e18-c2de-4163-9384-41d1577e23a0">
Note: I think the signature for `render_tree_branch` could use some
improvement. I don't like having the multiple `bool` parameters, but any
change I could think of was going to be a bit more invasive than I
wanted to take on in this PR.
Release Notes:
- Improved the style of the tree branches in current call details in the
collab panel.
This PR tweaks the message role indicator in the assistant panel.
Previously we added a negative margin in #3925 to align the indicator
with the text, but the result of this was the left side of the button
getting clipped on hover.
To remedy this, we now use the filled button style so that the
background always shows and maintains the visual alignment.
### Before
<img width="451" alt="Screenshot 2024-01-08 at 10 50 21 AM"
src="https://github.com/zed-industries/zed/assets/1486634/dd3ae3dc-13c5-4d81-abd7-8023aca496c8">
### After
<img width="401" alt="Screenshot 2024-01-08 at 10 54 42 AM"
src="https://github.com/zed-industries/zed/assets/1486634/c089a879-1c88-4d94-9532-4e9433a35828">
We could also do what we did in Zed1, where the hover style doesn't have
any padding and is flush with the left side of the text, but I don't
think this looks as polished.
The "Assistant" role now also uses a separate color from "System".
Release Notes:
- Updated the style of the message role indicator in the assistant
panel.
This commit mostly fixes invalid URLs in docstrings. It also
encapsulates crates we reexport (serde stuff + linkme) into a public
module named "private" in order to reduce the API surfaced through docs.
Moreover, I fixed up a bunch of crates that were pulling serde_json in
through gpui explicitly instead of using Cargo manifest.
Release Notes:
- N/A
Deals with https://github.com/zed-industries/community/issues/1317
Deals with https://github.com/zed-industries/community/issues/486
Reworks pane drag and drop code to support
* dropping external files into main pane (supports splits same as tabs
and project entries drop) — this will open the file dropped
* dropping external files, tabs and project entries drop into the
terminal — this will add file abs path into the terminal
Release Notes:
- Added a way to drag and drop external files into Zed main & terminal
panes; support tabs and project entries drop into terminal pane
# TODO
- [x] Fix busted tests
- [x] Check all events from actions on welcome screen
- [x] change theme
- [x] change keymap
- [x] install cli
- [x] enable vim
- [x] send metric data
- [x] send diagnostics
- [x] close welcome screen
- [X] Check all settings events
- [x] record theme change (in main and in selector)
- [x] record base keymap change (in main and in selector)
- [x] record metric data value
- [x] record diagnostics value
- [X] Triple check that telemetry settings still block events from being
sent, since we updated how we check for settings changes
- [X] Remove immediate flush mode and allow the flush method to be
called publicly
- [x] Remove references to clickhouse in the code (should be generic at
the client level)
Release Notes:
- N/A
The client sends events to our end point, and the endpoint is what determines what analytics database is used to store the data. The client should be generic and not mention the name of the service being proxied to through our server.
I essentially went through the publicly exported items and marked these
that are e.g. leaky reexports as pub(crate). I expect that'd be done on
Tuesday anyways.
Release Notes:
- N/A
Since the message headers are buttons, we need to shift them relatively to
compensate for the fact that the background is only visible when hovered.
I'm ok with the background not being aligned so long as the unhovered text is.
* Fix an incorrect use of `Any::type_id` that prevented the disabling of
key bindings
* Restructured the representation of disabled key bindings so that they
handle context predicates correctly. Previously, to disable key binding,
you needed to supply the exact same context predicate (e.g. `Editor &&
mode == "full"`) as the binding that you are trying to disable. Now, the
context predicates of disabled key bindings are evaluated just like any
other context predicate (with the current context) to see if they apply.
Release Notes:
- Fixed an issue where disabling key bindings didn't work. To disable a
key binding, set it to `null` in your keymap.
This PR tidies up the styling of the connection status indicators in the
title bar.
Removed some debug styles and tweaked the styling to match the rest of
the title bar overall.
Release Notes:
- Improved the connection status indicators in the title bar.
This PR fixes a panic that would occur when trying to submit feedback
while within a shared project.
There may be a way we want to support this in the future, but for now we
just show a toast letting the user know this is not supported:
<img width="415" alt="Screenshot 2024-01-05 at 2 46 02 PM"
src="https://github.com/zed-industries/zed/assets/1486634/d3eff4d9-90ba-4257-9857-19b1bc933cf3">
Release Notes:
- Fixed a panic when attempting to open the feedback modal while in a
shared project.
This PR updates the diagnostic popovers to use the regular editor text
color rather than one specific to the diagnostic kind.
Release Notes:
- Updated text color in diagnostic popovers.
This PR decouples the generation of licenses for the themes we ship from
the TypeScript theme definitions.
For now, we are embedding the license information for the themes in the
`theme_importer`, and emit a combined `LICENSES` file in the `theme`
crate whenever we import themes. This is also where we check that each
theme has a valid license.
We then use this `LICENSES` file when building up the global license
file for Zed.
This decoupling is one step towards us being able to delete the old Zed1
styles.
Release Notes:
- N/A
This removes one of the path dependencies in gpui that's only really
needed by `workspace` (which can work around lack of these
implementations by itself). In theory it should also improve build
scheduling (as gpui doesn't have to wait for main dependency of sqlez -
libsqlite3 - to finish it's 25 seconds-long build in release), though in
practice I didn't notice a substantial improvement.
Moreover `sqlez` was unused by `settings` too, so that's removed
as well.
Release Notes:
- N/A
According to
https://docs.digitalocean.com/products/kubernetes/how-to/configure-load-balancers/#ssl-certificates
you can specify whether to disable automatic DNS record
creation for the certificate upon the load balancer’s creation using the
do-loadbalancer-disable-lets-encrypt-dns-records annotation. If you
specify true, we will not automatically create a DNS A record at the
apex of your domain to support the SSL certificate.
Adding guest roles led us down a rabbit hole where we'd have liked to
rely on a
side-effect of activating a window in tests; but the test window didn't
implement that.
Looking into that, I realized our TestWindow wasn't doing a great job of
emulating the MacWindow, so this makes the two more similar.
This PR iterates on the design of the project search bar:
- Mode selections have been updated to use `ToggleButton`s
- Spacing has been added between the various elements.
Release Notes:
- Improved the look of the project search bar.
This PR updates the project search empty state to use the same
background color as the editor.
Release Notes:
- Updated the background color of the project search's empty state to
match the editor background.
This PR introduces Tinted button styles and the `selected_style` field
on buttons to allow replicating the previous design of titlebar call
controls. It also updates the styles of the titlebar controls.
### Creating a tinted button:
```
Button::new("accept-cta", "Accept")
.style(ButtonStyle::Tinted(TintColor::Accent))
.on_click(...)
```
Ths button will always be tinted blue.
### Creating a button that becomes tinted when selected::
```rust
IconButton::new("screen-share", Icon::Screen)
.style(ButtonStyle::Subtle)
.selected(is_screen_sharing)
.selected_style(ButtonStyle::Tinted(TintColor::Accent))
.on_click(...),
```
This button will be flat/subtle by default, but be tinted blue when it
is `selected`.
Note: There appears to be some issue where `is_deafened` isn't
activating correctly, making the speaker icon not toggle when selected.
Release Notes:
- Restore call control styles to a similar look to Zed 1.
This PR makes it so we respect the setting to show/hide the assistant
and chat panels.
Resolves https://github.com/zed-industries/community/issues/2370.
Release Notes:
- Fixed an issue where the settings to show/hide certain panels were not
respected.
Add a `workspace::DeploySearch` action and use it as a default for
"cmd-shift-f" binding. This action opens existing search tab if it
exists, or creates a new one otherwise. `workspace::NewSearch` action is
still available and always opens an existing search tab.
Release Notes:
- Added a `workspace::DeploySearch` action and use it as a default for
"cmd-shift-f" binding. `workspace::NewSearch` action is still available
and always opens an existing search tab.