Commit Graph

218 Commits

Author SHA1 Message Date
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
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
Antonio Scandurra
1b35b93e77
Avoid retrieving layout bounds inside of right click menu event handler (#4056)
By the time the event handler is invoked, all information about the
rendered layout tree is gone.

Release Notes:

- N/A
2024-01-15 19:42:47 +01:00
Antonio Scandurra
a56265e607 Avoid retrieving layout bounds inside of right click menu event handler
Co-Authored-By: Nathan <nathan@zed.dev>
Co-Authored-By: Max <max@zed.dev>
2024-01-15 19:27:18 +01:00
Thorsten Ball
b9be2147e8 Fix unaligned close button in tab bar
Co-authored-by: Marshall <marshall@zed.dev>
2024-01-15 18:16:41 +01:00
Marshall Bowers
90f4c70a82
Rename h_stack and v_stack to h_flex and v_flex, respectively (#4053)
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
2024-01-15 11:34:06 -05:00
Marshall Bowers
b136d21ebf
Make tab close button square (#4052)
This PR makes the close button for tabs square.

`IconButton` now accepts a `shape`, and using `IconButtonShape::Square`
will ensure the `IconButton` is square with respect to its contained
icon.

#### Before

<img width="119" alt="Screenshot 2024-01-15 at 10 32 40 AM"
src="https://github.com/zed-industries/zed/assets/1486634/dc806b9b-411f-4cd9-8c10-676d2cbd298b">

#### After

<img width="116" alt="Screenshot 2024-01-15 at 10 32 24 AM"
src="https://github.com/zed-industries/zed/assets/1486634/8b4ef43c-14b6-449f-a235-5d7affd82c4e">

Release Notes:

- Changed the tab close button to be square.
2024-01-15 10:43:03 -05:00
Antonio Scandurra
4ff514ca7e Merge remote-tracking branch 'origin/main' into cache
# Conflicts:
#	crates/gpui/src/elements/div.rs
2024-01-15 11:37:46 +01:00
Conrad Irwin
29ce109211
chat panel ++ (#4044)
- 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
2024-01-14 13:54:10 -07:00
Conrad Irwin
f6ef07e716 Make chat prettier (to my eyes at least) 2024-01-13 21:37:13 -07:00
Mikayla
bfb59f1598
Remove last stale code 2024-01-12 20:59:19 -08:00
Conrad Irwin
981858ef3c Fix panic with many participants 2024-01-12 10:02:55 -07:00
Antonio Scandurra
1c260e6dfd Merge remote-tracking branch 'origin/main' into cache
# Conflicts:
#	crates/copilot/src/sign_in.rs
#	crates/gpui/src/window.rs
#	crates/workspace/src/pane_group.rs
2024-01-10 22:58:52 +01:00
Antonio Scandurra
2923b71f83 Replace WindowContext::notify with WindowContext::refresh 2024-01-10 17:27:02 +01:00
Marshall Bowers
aff119b80a
Fix possessive "its" in docs and comments (#3998)
This PR fixes a number of places where we were incorrectly using "it's"
where we needed to use the possessive "its".

Release Notes:

- N/A
2024-01-10 10:09:48 -05:00
Marshall Bowers
684bd530f0
ui: Fix doc tests (#3989)
There were a ton of doc tests that weren't compiling in the `ui` crate,
so this PR fixes them.

Release Notes:

- N/A
2024-01-09 16:56:28 -05:00
Marshall Bowers
a579ef17d7
Rename Shape to AvatarShape (#3986)
This PR renames the `Shape` enum to `AvatarShape`, since it seems pretty
specific to `Avatar`s.

Release Notes:

- N/A
2024-01-09 16:21:27 -05:00
Marshall Bowers
7ed3f5f392
Clean up references in doc comments in ui and theme crates (#3985)
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
2024-01-09 15:22:36 -05:00
Nate Butler
51988f63d5 Document more enums 2024-01-09 14:50:04 -05:00
Nate Butler
c19551d974 Document free functions 2024-01-09 14:21:29 -05:00
Nate Butler
e020d7ca11 Document ui crate traits 2024-01-09 14:15:25 -05:00
Nate Butler
46065c2621 Fix unclosed delimiter 2024-01-09 13:52:11 -05:00
Nate Butler
7dbe0519ec Add label docs 2024-01-09 13:49:27 -05:00
Nate Butler
324fd24709 Initial button documentation
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2024-01-09 13:39:15 -05:00
Nate Butler
5359762051 Document components/avatar
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2024-01-09 13:04:55 -05:00
Nate Butler
9747c10ce8 Document UI modules
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2024-01-09 12:57:12 -05:00
Marshall Bowers
f0ef63bfa0
gpui: Add SharedUrl type (#3975)
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
2024-01-09 10:55:49 -05:00
Marshall Bowers
fa53353c57
Rename IconElement to just Icon (#3974)
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
2024-01-09 10:11:20 -05:00
Nate Butler
1bf7afd839
Update Copilot UI (#3904)
Updates Zed2 Copilot UI

- Introduces the `Headline` component for rendering large text
- Styles the 3 Copilot prompt states

![CleanShot 2024-01-08 at 13 19
09@2x](https://github.com/zed-industries/zed/assets/1714999/4b58b85f-23aa-4c22-9ca6-d0abd232cf18)
![CleanShot 2024-01-08 at 13 18
55@2x](https://github.com/zed-industries/zed/assets/1714999/0bf71e1d-63b5-4fbb-8672-e42f8602516d)


Release Notes:

- Updated the connect Copilot modal UI.
2024-01-08 13:33:30 -05:00
Marshall Bowers
be98ff408e
Iterate on design of channel management modal (#3923)
This PR refines the design of the channel management modal:

#### Before

<img width="585" alt="Screenshot 2024-01-05 at 4 17 32 PM"
src="https://github.com/zed-industries/zed/assets/1486634/a6d96674-b688-4549-8fb8-0a7b2c7c88be">

#### After

<img width="589" alt="Screenshot 2024-01-05 at 4 15 20 PM"
src="https://github.com/zed-industries/zed/assets/1486634/31ae8dc1-a129-4a15-963e-9779b9b79bd9">

Release Notes:

- Improved the look of the channel management modal.
2024-01-05 16:22:43 -05:00
Nate Butler
d1445431f2 Use the already existing styles/typography for Headline 2024-01-05 15:59:34 -05:00
Nate Butler
dcb9c0b9d8 Merge branch 'main' into copilot-ui 2024-01-05 15:56:33 -05:00
Nate Butler
9d4d58a915 Implement Tinted buttons and selected_style for buttons 2024-01-05 11:19:58 -05:00
Nate Butler
bca900a5d3 Add Headline component 2024-01-05 00:40:08 -05:00
Marshall Bowers
e5af1cb9a2 Remove unneeded branches 2024-01-04 17:35:18 -05:00
Marshall Bowers
afbbb1c41f Merge branch 'main' into collab-titlebar-fixes 2024-01-04 17:31:58 -05:00
Nate Butler
6f140c8ae3 WIP tinted buttons 2024-01-04 11:15:53 -05:00
Julia
a7550de8c5 Show pointer hand on tab & give last tab border right 2024-01-04 11:08:56 -05:00
Nate Butler
710a26ce32 Add "Checking" icon for diagnostics 2024-01-03 23:07:21 -05:00
Nate Butler
f633043859 Update ui docs 2024-01-03 22:44:31 -05:00
Marshall Bowers
1a3c931d61
Fix icon path for Icon::AudioOn (#3869)
This PR fixes the icon path for `Icon::AudioOn` so that it points to a
file that exists.

Release Notes:

- Fixed the loading of the deafen icon in the call controls.
2024-01-03 17:54:53 -05:00
Nate Butler
afeae56fab
Add additional keybinding icons (#3861)
Note: There is still some consistency work to do between all the
keybinding icons. I'll tackle this at a later time.

- Adds `return`, `space`, `tab`, `escape`, `pgup` and `pgdn`
- Simplifies keybinding rendering (due to theme changes)
- Standardizes icon naming convention to use `_` everywhere.

Release Notes:

- Zed 2: Added additional keybinding icons
2024-01-03 17:05:40 -05:00
Marshall Bowers
7f6770d272
Add empty state for project panel (#3863)
This PR adds an empty state for the project panel.

It will now display an "Open a project" button.

Release Notes:

- Added an empty state for the project panel.
2024-01-03 17:00:47 -05:00
Nate Butler
46e44f9853 Restore keybinding changes 2024-01-03 16:55:56 -05:00
Nate Butler
f39bc6e132 Merge branch 'main' into additional-keybinding-icons 2024-01-03 16:49:34 -05:00
Max Brunsfeld
1184de64d5 Fix UI doc test 2024-01-03 13:21:45 -08:00
Max Brunsfeld
a8061232a5 cargo fmt 2024-01-03 13:13:50 -08:00
Max Brunsfeld
83f4c61657 Remove 2 suffix from gpui_macros, fix compile errors in tests
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 13:12:21 -08:00
Max Brunsfeld
f5ba22659b Remove 2 suffix from gpui
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:59:39 -08:00
Max Brunsfeld
dfcb17fe74 Remove 2 suffix for theme
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:41:01 -08:00
Max Brunsfeld
4305c5fdbe Remove 2 suffix for ui, storybook, text
Co-authored-by: Mikayla <mikayla@zed.dev>
2024-01-03 12:33:51 -08:00
Marshall Bowers
45f3a98359
Remove old ui and storybook crates (#3125)
This PR deletes the old `ui` and `storybook` crates in favor of their
newer variants that we'll be landing to `main` in the near future.

### Motivation

These crates are based off the old version of GPUI 2 (the `gpui2`
crate).

At this point we have since transitioned to the new version of GPUI 2
(the `gpui3` crate, currently still on the `gpui2` branch).

Having both copies around is confusing, so the old ones are going the
way of the dinosaurs.

Release Notes:

- N/A
2023-10-12 17:40:20 -04:00
Marshall Bowers
456baaa112
Mainline GPUI2 UI work (#3099)
This PR mainlines the current state of new GPUI2-based UI from the
`gpui2-ui` branch.

Included in this is a performance improvement to make use of the
`TextLayoutCache` when calling `layout` for `Text` elements.

Release Notes:

- N/A

---------

Co-authored-by: Nate Butler <iamnbutler@gmail.com>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2023-10-06 13:18:56 -04:00
Piotr Osiewicz
c46137e40d
chore: Upgrade to Rust 1.73 (#3096)
Release Notes:
- N/A
2023-10-06 14:50:29 +02:00
Marshall Bowers
9e1f7c4c18
Mainline GPUI2 UI work (#3079)
This PR mainlines the current state of new GPUI2-based UI from the
`gpui2-ui` branch.

Release Notes:

- N/A

---------

Co-authored-by: Nate Butler <iamnbutler@gmail.com>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Nate <nate@zed.dev>
2023-10-02 18:20:47 -04:00
Marshall Bowers
c379a6f2fb
ui: Fix glyph used for option key in Keybinding (#3066)
This PR fixes the glyph used for the option key in the new `Keybinding`
component.

Same fix as in #3065, but applied to the new `Keybinding` component so
that we don't regress when switching to GPUI2.

<img width="750" alt="Screenshot 2023-09-29 at 10 50 15 AM"
src="https://github.com/zed-industries/zed/assets/1486634/8c6147e9-fa05-4804-954c-b8e3b98cbdf0">

Release Notes:

- N/A
2023-09-29 11:02:35 -04:00
Marshall Bowers
f26ca0866c
Mainline GPUI2 UI work (#3062)
This PR mainlines the current state of new GPUI2-based UI from the
`gpui2-ui` branch.

Release Notes:

- N/A

---------

Co-authored-by: Nate Butler <iamnbutler@gmail.com>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
Co-authored-by: Nate <nate@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-09-28 19:36:21 -04:00
Marshall Bowers
0697d08e54
Restructure ui into just elements and components (#3023)
This PR restructures the `ui` crate into just `elements` and
`components`.

This was already done on the `gpui2-ui` branch, just getting it onto
`main`.

Release Notes:

- N/A

---------

Co-authored-by: Nate Butler <nate@zed.dev>
2023-09-22 21:27:47 -04:00
Marshall Bowers
895386cfaf
Mainline Icon and IconButton changes (#3022)
This PR mainlines the `Icon` and `IconButton` changes from the
`gpui2-ui` branch.

Release Notes:

- N/A

Co-authored-by: Nate Butler <nate@zed.dev>
2023-09-22 19:14:12 -04:00
Marshall Bowers
fe4248cf34
Scaffold Toolbar and Breadcrumb components (#3020)
This PR scaffolds the `Toolbar` and `Breadcrumb` components.

Right now they both just consist of hardcoded data.

<img width="846" alt="Screenshot 2023-09-22 at 4 54 00 PM"
src="https://github.com/zed-industries/zed/assets/1486634/70578df2-7216-42d2-97ef-d38b83fb4a25">

<img width="799" alt="Screenshot 2023-09-22 at 4 46 04 PM"
src="https://github.com/zed-industries/zed/assets/1486634/73ca3d8a-baf9-4ed4-b4c4-279c674672a3">

Release Notes:

- N/A
2023-09-22 16:57:33 -04:00
Marshall Bowers
27e3e09bb9
Label component states in stories (#3019)
This PR updates the UI component stories to label the various states
that they are in.

Release Notes:

- N/A
2023-09-22 15:48:32 -04:00
Marshall Bowers
71c1e36d1e
Put Theme behind an Arc (#3017)
This PR puts the `Theme` returned from the `theme` function behind an
`Arc`.

### Motivation

While working on wiring up window focus events for the `TitleBar`
component we ran into issues where `theme` was holding an immutable
borrow to the `ViewContext` for the entirety of the `render` scope,
which prevented having mutable borrows in the same scope.

### Explanation

To avoid this, we can make `theme` return an `Arc<Theme>` to allow for
cheap clones and avoiding the issues with the borrow checker.

Release Notes:

- N/A

Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
2023-09-22 13:35:30 -04:00
Nate Butler
d14e4d41ea Merge branch 'main' into nate/bring-ui-crate-up-to-date 2023-09-21 23:47:17 -04:00
Nate Butler
f54634aeb2 Bring UI crate up to date 2023-09-21 23:46:06 -04:00
Marshall Bowers
5083ab7694
Add TrafficLights component (#3011)
This PR adds a `TrafficLights` component for GPUI2.

<img width="861" alt="Screenshot 2023-09-21 at 11 32 10 PM"
src="https://github.com/zed-industries/zed/assets/1486634/0fe0e847-49b3-44dc-bd4c-64f12f0051c1">

Release Notes:

- N/A
2023-09-21 23:42:18 -04:00
Nate Butler
8440ac3a54 Fix fmt complaining about order 2023-09-21 20:25:25 -04:00
Nate Butler
1e6ac8caf2 theme::* -> crate::theme::*; 2023-09-21 20:21:56 -04:00
Marshall Bowers
baa07e935e
Extract UI elements from storybook into new ui crate (#3008)
This PR extracts the various UI elements from the `storybook` crate into
a new `ui` library crate.

Release Notes:

- N/A
2023-09-21 19:25:35 -04:00