Commit Graph

147 Commits

Author SHA1 Message Date
Mikayla Maki
9f6072c6b6
Revert "Improve completion, action and shared project popovers' layout" 2024-01-23 15:26:11 -08:00
Kirill Bulatov
513ddf1861 Change background for the max width of the completion/action elements 2024-01-23 22:12:29 +02:00
Piotr Osiewicz
21e6b09361
Remove license-file from Cargo.toml as it is apparently redundant (#4218)
Release Notes:

- N/A
2024-01-23 17:40:30 +01:00
Piotr Osiewicz
678bdddd7d
chore: Add crate licenses. (#4158)
- GPUI and all dependencies: Apache 2
- Everything else: AGPL

Here's a script that I've generated for it:
https://gist.github.com/osiewicz/6afdd6626e517da24a2092807e6f0b6e

Release Notes:
- N/A

---------

Co-authored-by: David <david@zed.dev>
2024-01-23 16:56:22 +01:00
Julia
2c3d9805a4 Store a z-index id per-layer
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2024-01-22 10:16:59 -05:00
Mikayla
c05edee2b5
Port the rest of the app 2024-01-21 20:26:33 -08:00
Piotr Osiewicz
6c82380232 chore: Fix clippy::needless_borrow up to an editor 2024-01-21 15:03:24 +01:00
Mikayla
a44aae9e91
Finish documenting the action, asset, color, and element modules in GPUI
Remove SmallVec from the public API of GPUI
2024-01-20 20:15:23 -08:00
Conrad Irwin
23d991962a Link previews in chat 2024-01-19 16:59:17 -07:00
Marshall Bowers
1cc7f66f86
Fix documentation labels obscuring other content in completion menu (#4167)
This PF fixes an issue where the documentation labels in the completion
menu could end up completing obscuring the primary content.

#### Before
<img width="691" alt="Screenshot 2024-01-19 at 1 42 19 PM"
src="https://github.com/zed-industries/zed/assets/1486634/187f2978-08be-4f5e-ba93-91ed09cd6e87">

#### After

<img width="704" alt="Screenshot 2024-01-19 at 1 39 45 PM"
src="https://github.com/zed-industries/zed/assets/1486634/e5929c04-bace-4336-b878-4ada5660d235">

Since this involved changes to the `ListItem`, I also made sure to test
the other problematic case that was fixed in #3845 to make sure we
didn't regress there:

<img width="665" alt="Screenshot 2024-01-19 at 1 39 11 PM"
src="https://github.com/zed-industries/zed/assets/1486634/14b72d44-b6a6-4aef-a708-37fb60b8875a">

I also tried to capture these cases in the `ListItem` stories to make it
easier to test all of them at once:

<img width="1141" alt="Screenshot 2024-01-19 at 1 40 03 PM"
src="https://github.com/zed-industries/zed/assets/1486634/333886ff-e394-4cba-89db-98352481c7f6">

Release Notes:

- Fixed an issue where documentation labels could obscure other content
in the editor completion menu
([#2419](https://github.com/zed-industries/community/issues/2419)).
2024-01-19 14:01:09 -05:00
Marshall Bowers
01f06f96a1
Update tenses of doc comment summary lines (#4161)
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
2024-01-19 11:18:50 -05:00
Marshall Bowers
03826be196
Fix docs references in ui (#4147)
This PR fixes some more references in the docs in the `ui` crate.

Release Notes:

- N/A
2024-01-18 22:52:30 -05:00
Marshall Bowers
decf320a74
Rename overflow_hidden_{x,y} to overflow_{x,y}_hidden (#4146)
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
2024-01-18 22:10:41 -05:00
Mikayla Maki
20b58fea35
Merge branch 'main' into fix-popin-for-project-panel 2024-01-18 15:55:35 -08:00
Mikayla
903176d8ff
Pull out fluent builder helpers into re-usable trait 2024-01-18 15:31:31 -08:00
Marshall Bowers
0691ad480b
Make clicking ListHeader labels toggle the disclosure (#4140)
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.
2024-01-18 18:21:53 -05:00
Mikayla
a5084510a1
Fix popin for project panel by pre-resolving keybindings in terms of the project panel 2024-01-18 15:16:09 -08:00
Conrad Irwin
6c2da0d25b Revert "Store a z-index id per-layer (#4128)"
This reverts commit 28a2337218, reversing
changes made to e992f84735.
2024-01-18 13:28:23 -07:00
Conrad Irwin
81baefb460
Fix right click handler for tabs (#4130)
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>)).
2024-01-18 13:07:25 -07:00
Conrad Irwin
920eced1d5 Fix right click handler for tabs
Also, some fun test helpers

Co-Authored-By: Mikayla <mikayla@zed.dev>
2024-01-18 12:10:38 -07:00
Julia
bc2302f723 Store a z-index id per-layer
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2024-01-18 13:24:25 -05:00
Mikayla Maki
0711476fd5
Merge branch 'main' into fix-typos 2024-01-17 14:36:03 -08:00
Mikayla
57400e9687
Fix typos detected by crate-ci/typos 2024-01-17 14:31:21 -08:00
Marshall Bowers
8f3d79c3b8
Fix file paths in stories (#4104)
This PR fixes some file paths used in our stories that were still
referencing the `ui2` crate.

Release Notes:

- N/A
2024-01-17 16:59:57 -05:00
Marshall Bowers
df67917768
Make channel buttons square (#4092)
This PR makes the channel buttons square.

Release Notes:

- Adjusted the shape of the channel buttons.
2024-01-17 11:47:43 -05:00
Julia
2fbf42d7df
Z index shenanigans (#4089)
Release Notes:

- Fixed a bug allowing certain UI elements to render incorrectly when
overlapping.
2024-01-17 09:48:08 -05:00
Julia
977832a04e Refresh window, bypassing view cache, when opening hover or context menu 2024-01-17 09:40:16 -05:00
Marshall Bowers
26a3f68080
Tweak mute indicator positioning (#4080)
This PR tweaks the positioning of the mute indicators so that they cover
a little bit less of the avatar:

#### Before

<img width="305" alt="Screenshot 2024-01-16 at 6 32 51 PM"
src="https://github.com/zed-industries/zed/assets/1486634/3f6ad2f4-2c3e-498b-97a4-8b522f3ceda9">

#### After

<img width="311" alt="Screenshot 2024-01-16 at 6 26 48 PM"
src="https://github.com/zed-industries/zed/assets/1486634/37161557-084d-4b69-b61f-a0958e8e867c">

(It's a bit hard to tell in the screenshot, but there is a gap between
the bottom of the indicator and the top of the color ribbon).

Release Notes:

- N/A
2024-01-16 18:49:37 -05:00
Marshall Bowers
4e8ad363f1
Increase border width used to indicate speaking (#4077)
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.
2024-01-16 17:09:28 -05:00
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