8cb291b
Take a different approach to rendering channel buttons (#3991)
Click to expand commit body
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.
There were a ton of doc tests that weren't compiling in the `ui` crate,
so this PR fixes them.
Release Notes:
- N/A
Marshall Bowers
created
68d0b46
Remove unnecessary mutexes from livekit client types (#3984)
Click to expand commit body
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.
Max Brunsfeld
created
0daa2bf
Fix panic in set_scroll_anchor_remote (#3987)
Click to expand commit body
If the remote sends us an invalid scroll position, we should not panic.
Release Notes:
- Fix a panic receiving scroll positions out of order
Conrad Irwin
created
18e537a
Do not dismiss buffer search when any modal is present (#3988)
Click to expand commit body
Release Notes:
- Fixed buffer search being dismissed not after the modals are
Kirill Bulatov
created
8b71b1d
Do not dismiss buffer search when any modal is present
7ed3f5f
Clean up references in doc comments in `ui` and `theme` crates (#3985)
Click to expand commit body
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
447bfca
Add a test to catch keybinding bounds issue (#3966)
Click to expand commit body
Add a test to catch regressions to
https://github.com/zed-industries/zed/pull/3964
Thanks for the idea @ConradIrwin
TODO:
- [ ] Fix immediate stack overflow in test
Release Notes:
- N/A
Mikayla Maki
created
128a8ff
Remove unnecessary mutexes from livekit client types
bebb528
Merge branch 'main' into migrations-on-server-start
Conrad Irwin
created
824d06e
Remove `Default` impl for `StatusColors` (#3977)
Click to expand commit body
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
Marshall Bowers
created
d374953
search: Remove newlines from query used for tab_content. (#3976)
Click to expand commit body
Fixes https://github.com/zed-industries/community/issues/2388
Release Notes:
- Fixed tab content of project search overflowing the tab for queries
with newlines.
This PR adds a `SharedUrl` type to GPUI.
It's just like a `SharedString`, but for denoting that the contained
value is a URL.
Mainlined from @nathansobo's GPUI blog post:
https://github.com/zed-industries/zed/pull/3968/files#diff-7ee75937e2daf7dd53f71b17698d8bd6d46993d06928d411781b9bd739b5f231R9-R12
Release Notes:
- N/A
Marshall Bowers
created
fa53353
Rename `IconElement` to just `Icon` (#3974)
Click to expand commit body
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
Marshall Bowers
created
29ed067
Add a missing default value to docs (#3973)