Commit Graph

82 Commits

Author SHA1 Message Date
Mikayla
903176d8ff
Pull out fluent builder helpers into re-usable trait 2024-01-18 15:31:31 -08: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