Commit Graph

557 Commits

Author SHA1 Message Date
Max Brunsfeld
5e3d0a6d03
Add following UI in collab titlebar (#3544)
* [x] restructure titlebar to show facepiles for each collaborator and
their followers
* [x] allow following collaborators by clicking their avatars in the
titlebar
* [x] show grayscale avatar for collaborators not focused on this
project
* [x] show collaborators' microphone activity and muted status in the
titlebar
* [x] in facepile, show leader in front of followers
2023-12-07 14:38:30 -08:00
Max Brunsfeld
d1b47b4059 Indicate collaborators' presence (grayscale), speaking and muted status 2023-12-07 14:18:34 -08:00
Marshall Bowers
853daf953b
Remove padding from ButtonSize::None (#3541)
This PR removes the padding from buttons when using `ButtonSize::None`.

This fixes the size of the tab close buttons.

Release Notes:

- N/A
2023-12-07 14:11:30 -05:00
Joseph T. Lyons
7c19650a40 Remove when_else
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-12-07 12:37:07 -05:00
Marshall Bowers
393be3cedf
Extract Tab component (#3539)
This PR extracts a new `Tab` component from the tabs implementation in
the workspace.

This will allow us to reuse this component anywhere that we need to use
tabs.

Like our other newer components, the `Tab` component has a relatively
open API.

It accepts `children` (or `child`) as well as a `start_slot` and
`end_slot` to position content in the slots on either end of the
content. These slots also respect the `TabCloseSide` and will switch
positions based on this value.

<img width="763" alt="Screenshot 2023-12-07 at 12 19 42 PM"
src="https://github.com/zed-industries/zed/assets/1486634/78e4db6a-f807-431e-8777-f52f2631e6ed">

Release Notes:

- N/A
2023-12-07 12:30:43 -05:00
Nate Butler
42a3da4ba3
Update pickers (#3529)
[[PR Description]]

- Update the size of all pickers
- Additional styling fixes for File Finder and Outline palettes
- Extend the ui prelude to include common imports

Release Notes:

- N/A
2023-12-07 00:24:46 -05:00
Nate Butler
9e6103f863 Merge branch 'main' into update-pickers 2023-12-06 23:21:42 -05:00
Joseph T. Lyons
d2362d7f12 Merge branch 'main' into feedback-2 2023-12-06 23:16:54 -05:00
Joseph T. Lyons
ee45db8a78 Use when_else() 2023-12-06 22:34:28 -05:00
Max Brunsfeld
a8d96790cf
Enable buffer font size adjustment in zed2 (#3523) 2023-12-06 14:15:25 -08:00
Max Brunsfeld
89c8a7c242 Enable buffer font size adjustment in zed2
Co-authored-by: Nathan <nathan@zed.dev>
2023-12-06 13:52:33 -08:00
Marshall Bowers
41fc30f62e
Always show tooltips on buttons (#3521)
This PR fixes an issue where tooltips weren't being shown on selected
buttons.

We now always show tooltips on buttons that have one.

Release Notes:

- N/A
2023-12-06 16:29:35 -05:00
Marshall Bowers
dbb501d7eb Add gap between label and keybinding in Tooltip 2023-12-06 15:45:03 -05:00
Antonio Scandurra
cc9eff89f5 Use a handler instead of an action for clicks
This prevents dispatching actions on buttons that were not the target of the click.

Co-Authored-By: Marshall <marshall@zed.dev>
2023-12-06 19:12:01 +01:00
Antonio Scandurra
14def2a1a3 Merge remote-tracking branch 'origin/main' into assistant-2
# Conflicts:
#	crates/ui2/src/components/icon.rs
2023-12-06 18:18:58 +01:00
Marshall Bowers
8f1c74b8bc
Factor out LabelLike to share common label styles (#3510)
This PR factors out a new `LabelLike` component to share common styles
between the `Label` and `HighlightedLabel` components.

Release Notes:

- N/A
2023-12-06 11:17:12 -05:00
Nate Butler
0ced310f93 Merge branch 'main' into update-pickers 2023-12-06 11:10:30 -05:00
Nate Butler
cf971f706c Extend ui prelude 2023-12-06 11:07:46 -05:00
Nate Butler
b5c790ed29 WIP update picker style 2023-12-06 11:01:22 -05:00
Nate Butler
3b8c566f31 Merge branch 'main' into update-pickers 2023-12-06 10:48:50 -05:00
Marshall Bowers
f833cd7c16
Use specified color for non-highlighted text in HighlightedLabel (#3509)
This PR fixes an issue where the specified color for a
`HighlightedLabel` was not respected as the default color for
non-highlighted text.

Release Notes:

- N/A
2023-12-06 10:41:49 -05:00
Nate Butler
cb0880cf3c Add debugging colors to styled_ext 2023-12-06 10:08:26 -05:00
Piotr Osiewicz
1f538c5fdd Merge branch 'main' into copilot2 2023-12-06 15:13:13 +01:00
Piotr Osiewicz
3f9fe58c48 Signed out state is looking good 2023-12-06 13:00:57 +01:00
Antonio Scandurra
9eb98122ec Merge remote-tracking branch 'origin/main' into assistant-2 2023-12-06 12:53:02 +01:00
Marshall Bowers
e0ca7f844a Merge branch 'main' into pane-toolbar-tabbar-ui 2023-12-05 14:15:18 -05:00
Nate Butler
27703a3279 Update tabs rendering, fix tab spacing bug
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-12-05 14:04:12 -05:00
Joseph T. Lyons
ce8bdb354b Merge branch 'main' into feedback-2 2023-12-05 12:49:48 -05:00
Nate Butler
dccdcd3221 Add indicator component
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-12-05 12:41:54 -05:00
Antonio Scandurra
e534c5fdcd WIP 2023-12-05 18:14:24 +01:00
Piotr Osiewicz
c9b50c8bab Add v_stack and h_stack to ui::prelude 2023-12-05 16:48:17 +01:00
Nate Butler
f9efaebddf Update icon size 2023-12-05 09:10:16 -05:00
Max Brunsfeld
ae6ddceb67
Enable more collab UI features (#3496)
* Current Call section of the collab panel
* Improve the collab titlebar
* Add basic UI for following

Following only partially works, but the UI for following is now in
place.
2023-12-04 18:01:11 -08:00
Conrad Irwin
9162f299a7 Fix project panel context menu 2023-12-05 00:41:00 +00:00
Max Brunsfeld
63667ecf6f Start bringing back the current call section of the collab panel
Co-authored-by: Nathan <nathan@zed.dev>
2023-12-04 15:46:56 -08:00
Conrad Irwin
1c9b984738 Remove cx param 2023-12-04 23:35:31 +00:00
Conrad Irwin
c82fea375d Dispatch actions on focused node
Allows us to implement context menu matching nicely
2023-12-04 22:58:04 +00:00
Nate Butler
5bdaf0e074 Work on light theme, update tab 2023-12-04 17:54:37 -05:00
Conrad Irwin
2c2e5144c9 Fix context key matching
* You need to check all layers of the context stack
* When in command, the context should be based on where focus was (to
  match `available_actions`.
2023-12-04 21:28:37 +00:00
Marshall Bowers
fb352af35c Merge branch 'main' into diagnostics-style-2 2023-12-04 11:56:55 -05:00
Nate Butler
7a0aa1e5df Clean up ButtonLike
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-12-04 11:32:25 -05:00
Nate Butler
118c9b5fe8 Ensure disabled buttons don't have interaction styles 2023-12-04 09:37:56 -05:00
Conrad Irwin
1da18ebe9a copilot_menu2 (though only tested offling, which is insufficient) 2023-12-01 23:43:02 -07:00
Nate Butler
2bf48872b6 Progress on diagnostic multibuffer
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-12-01 16:53:09 -05:00
Nate Butler
03ebf0a5a9 Implement FixedWidth for all button types
[no-ci]

Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-12-01 16:20:39 -05:00
Nate Butler
89aa6a3726 Re-add diagnostic headers 2023-12-01 15:30:01 -05:00
Marshall Bowers
c3e7732eab
Add support for optional icon to Button (#3479)
This PR extends `Button` with support for an optional icon to be
displayed next to the label.

As part of this, the functionality for displaying an icon within a
button has been factored out into an internal `ButtonIcon` component.
`ButtonIcon` is now used by both `IconButton` and `Button` to
encapsulate the concerns of an icon that is rendered within a button.

Release Notes:

- N/A
2023-12-01 14:30:38 -05:00
Marshall Bowers
4b23c5c658
Add selected_label to Button (#3478)
This PR adds a new `selected_label` method to `Button`.

This can be used to set a different label that should be rendered when
the `Button` is selected.

Release Notes:

- N/A
2023-12-01 13:29:11 -05:00
Marshall Bowers
12b58f5b60 Add selected_icon to IconButton 2023-12-01 13:10:53 -05:00
Marshall Bowers
f09d9ef723 Clean up some ButtonLike doc comments 2023-12-01 13:09:35 -05:00