Commit Graph
557 Commits
Author SHA1 Message Date
Max Brunsfeld 78513a54a4 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 6a3785004a Indicate collaborators' presence (grayscale), speaking and muted status 2023-12-07 14:18:34 -08:00
Marshall Bowers 5982a32d51 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. LyonsandMarshall Bowers 1a4e5ea92d Remove when_else
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-12-07 12:37:07 -05:00
Marshall Bowers 35efac9839 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 964d226a7b 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 facda33434 Merge branch 'main' into update-pickers 2023-12-06 23:21:42 -05:00
Joseph T. Lyons 263b79c047 Merge branch 'main' into feedback-2 2023-12-06 23:16:54 -05:00
Joseph T. Lyons 5ecc231919 Use when_else() 2023-12-06 22:34:28 -05:00
Max Brunsfeld 2b4494f086 Enable buffer font size adjustment in zed2 (#3523) 2023-12-06 14:15:25 -08:00
Max BrunsfeldandNathan 5392e6ca24 Enable buffer font size adjustment in zed2
Co-authored-by: Nathan <nathan@zed.dev>
2023-12-06 13:52:33 -08:00
Marshall Bowers 0f767d5bf2 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 e4265ff0b4 Add gap between label and keybinding in Tooltip 2023-12-06 15:45:03 -05:00
Antonio ScandurraandMarshall 4aab4c5411 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 c62305edea 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 2191cb7f3b 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 6625197f45 Merge branch 'main' into update-pickers 2023-12-06 11:10:30 -05:00
Nate Butler 7fa50c00ed Extend ui prelude 2023-12-06 11:07:46 -05:00
Nate Butler 1fbeca9451 WIP update picker style 2023-12-06 11:01:22 -05:00
Nate Butler e35178be27 Merge branch 'main' into update-pickers 2023-12-06 10:48:50 -05:00
Marshall Bowers f929473b81 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 e0a2b108ca Add debugging colors to styled_ext 2023-12-06 10:08:26 -05:00
Piotr Osiewicz aac14f5c41 Merge branch 'main' into copilot2 2023-12-06 15:13:13 +01:00
Piotr Osiewicz 633224ed26 Signed out state is looking good 2023-12-06 13:00:57 +01:00
Antonio Scandurra c9300e2384 Merge remote-tracking branch 'origin/main' into assistant-2 2023-12-06 12:53:02 +01:00
Marshall Bowers 106c479785 Merge branch 'main' into pane-toolbar-tabbar-ui 2023-12-05 14:15:18 -05:00
Nate ButlerandMarshall Bowers ef129b5512 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 5bf1b4404a Merge branch 'main' into feedback-2 2023-12-05 12:49:48 -05:00
Nate ButlerandMarshall Bowers 563a34c9f6 Add indicator component
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-12-05 12:41:54 -05:00
Antonio Scandurra 304dbed62b WIP 2023-12-05 18:14:24 +01:00
Piotr Osiewicz 98a55f2636 Add v_stack and h_stack to ui::prelude 2023-12-05 16:48:17 +01:00
Nate Butler 761c84d8a5 Update icon size 2023-12-05 09:10:16 -05:00
Max Brunsfeld 63fa23813f 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 861148cf24 Fix project panel context menu 2023-12-05 00:41:00 +00:00
Max BrunsfeldandNathan debcb52436 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 1f7391fd60 Remove cx param 2023-12-04 23:35:31 +00:00
Conrad Irwin a3ea5a944e Dispatch actions on focused node
Allows us to implement context menu matching nicely
2023-12-04 22:58:04 +00:00
Nate Butler 7989ec5072 Work on light theme, update tab 2023-12-04 17:54:37 -05:00
Conrad Irwin 05f23386e3 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 9d6a58fdd1 Merge branch 'main' into diagnostics-style-2 2023-12-04 11:56:55 -05:00
Nate ButlerandMarshall Bowers 2fce2d590d Clean up ButtonLike
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-12-04 11:32:25 -05:00
Nate Butler 0767dae65a Ensure disabled buttons don't have interaction styles 2023-12-04 09:37:56 -05:00
Conrad Irwin 3d93aa7421 copilot_menu2 (though only tested offling, which is insufficient) 2023-12-01 23:43:02 -07:00
Nate ButlerandMarshall Bowers ccb0db693c Progress on diagnostic multibuffer
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-12-01 16:53:09 -05:00
Nate ButlerandMarshall Bowers d271ef7527 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 45b93a6903 Re-add diagnostic headers 2023-12-01 15:30:01 -05:00
Marshall Bowers 263eaec9c8 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 3e1f07f55f 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 ba3e8870bd Add selected_icon to IconButton 2023-12-01 13:10:53 -05:00
Marshall Bowers 859e5686a7 Clean up some ButtonLike doc comments 2023-12-01 13:09:35 -05:00