Commit Graph

518 Commits

Author SHA1 Message Date
Nate Butler
5bdaf0e074 Work on light theme, update tab 2023-12-04 17:54:37 -05: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
Julia
6f9e08ceea Merge branch 'main' into zed2-breadcrumbs 2023-12-01 12:28:36 -05:00
Nate Butler
85d72f63c1
Add Tinted button style placeholder and document ButtonLike (#3476)
- Adds a placeholder `ButtonStyle::Tinted`.
  - Note: Using this now will just give you a block of `gpui::red()`
- Documents ButtonLike and ButtonStyle to hopefully help make choosing a
button style easier.

Release Notes:

- N/A
2023-12-01 12:18:35 -05:00
Julia
13f4cc563c Merge branch 'main' into zed2-breadcrumbs 2023-12-01 11:02:34 -05:00
Nate Butler
88188b0c30 Merge branch 'main' into collab-ui-refinement 2023-12-01 10:50:25 -05:00
Julia
ce16e5b54a Unbreak toolbar layout & improve disabling ButtonLike 2023-12-01 10:33:44 -05:00
Marshall Bowers
6d62e6c562
Respect label_color for Buttons (#3469)
This PR makes `Button`s respect the `label_color` that is specified,
provided they are not disabled or selected.

Release Notes:

- N/A
2023-11-30 20:36:59 -05:00
Conrad Irwin
e1c8369b3d Rename menu_handle to right_click_menu and child to trigger
This makes things more in-line with `popover_menu`.
2023-11-30 16:39:43 -07:00
Conrad Irwin
ebbbeca9a6 Flesh out a popover control 2023-11-30 16:13:44 -07:00
Marshall Bowers
e5a5b1e84c
Rework ListHeader to be more open (#3467)
This PR reworks the `ListHeader` component to be more open.

The `meta` method can now be used to append meta items of any element to
the `ListHeader`, and they will be rendered with the appropriate spacing
between them.

Release Notes:

- N/A
2023-11-30 15:55:31 -05:00
Nate Butler
180ba42456 WIP update popover_menu 2023-11-30 14:54:44 -05:00
Marshall Bowers
e78538e162 Implement Selectable for ListItem and ListHeader 2023-11-30 13:26:12 -05:00
Marshall Bowers
865baaa1a1 Remove unused GraphicSlot enum 2023-11-30 13:25:26 -05:00
Nate Butler
5eb89781e3 Clean up left side titlebar buttons 2023-11-30 13:11:20 -05:00
Marshall Bowers
0a8a84f656
Rename button-related enums (#3463)
This PR renames the `ButtonStyle2` and `ButtonSize2` enums to
`ButtonStyle` and `ButtonSize`, respectively.

Release Notes:

- N/A
2023-11-30 12:04:23 -05:00
Julia
428c517693 Merge branch 'main' into zed2-breadcrumbs 2023-11-30 11:38:29 -05:00
Nate Butler
82b3efa16c Update collab button styles 2023-11-30 09:12:39 -05:00
Antonio Scandurra
cc0bc444b1 Merge remote-tracking branch 'origin/main' into surfaces
# Conflicts:
#	crates/ui2/src/components/avatar.rs
2023-11-30 10:48:20 +01:00
Conrad Irwin
02174084ca
Collab panel2: Now with scrolling and keyboard (#3455)
Also introducing: .track_scroll() for non-uniform lists.

Release Notes:

- N/A
2023-11-30 00:13:52 -07:00
Conrad Irwin
90b8acfb34 Allow toggling subchannel visiblity without joining channel 2023-11-29 23:55:14 -07:00
Nate Butler
92d2048aa4 WIP 2023-11-30 00:28:05 -05:00
Marshall Bowers
9d53287341
Implement Selectable for buttons (#3451)
This PR implements the `Selectable` trait for `ButtonLike`, `Button`,
and `IconButton`.

Release Notes:

- N/A
2023-11-29 18:46:41 -05:00
Conrad Irwin
4c27f4453c Merge branch 'main' into collab-panel2 2023-11-29 16:32:25 -07:00
Marshall Bowers
04bbd107c1
Fix the selected state for the panel icons in the status bar (#3450)
This PR fixes a bug where the selected state for the panel icons in the
status bar was not correctly reflecting whether the panel was open.

It was erroneously using the `is_open` state for the context menu.

Release Notes:

- N/A
2023-11-29 18:20:08 -05:00
Marshall Bowers
b357ae4dc3
Add new Button and IconButton components (#3448)
This PR adds new `Button` and `IconButton` components built on top of
our new button abstractions.

Both of these buttons are built from the common `ButtonLike` base, and
implement the `ButtonCommon` (name TBD) trait in order to provide a
common interface.

There are still some visual tweaks that we'll need to make to the new
buttons, but those should be straightforward to make after we land this.

Release Notes:

- N/A
2023-11-29 17:41:44 -05:00
Conrad Irwin
cd60d466b1 Merge branch 'main' into collab-panel2 2023-11-29 15:40:16 -07:00
Conrad Irwin
3bdd51cb2a Availability indicators 2023-11-29 15:06:58 -07:00
Conrad Irwin
4ebae4d8bd Make LeftSlot take an element 2023-11-29 14:20:26 -07:00
Marshall Bowers
df5de47a78
Make toggle method accept impl Into<Option<bool>> (#3446)
This PR makes the `toggle` method on the various list components accept
an `impl Into<Option<bool>>` instead of just an `Option<bool>`.

This allows a caller with just a `bool` avoid having to wrap the
`Option` themselves.

Release Notes:

- N/A
2023-11-29 16:13:41 -05:00
Conrad Irwin
fb377aed73
Context menu, Dragon Drop, for collab panel (#3441)
Release Notes:

- N/A
2023-11-29 13:40:46 -07:00
Marshall Bowers
d8ed7c0721
Move GraphicSlot out of components module (#3444)
This PR moves the `GraphicSlot` definition out of the `components`
module, as it doesn't contain a component.

Release Notes:

- N/A
2023-11-29 15:29:33 -05:00
Conrad Irwin
6ab3825ab1 No moar toggleable 2023-11-29 13:25:29 -07:00
Marshall Bowers
e77846d2dc Rework Toggle into Toggleable and ToggleState 2023-11-29 14:33:52 -05:00
Marshall Bowers
6f5cc0af94 Rework Disclosure component 2023-11-29 14:07:48 -05:00
Marshall Bowers
c7b79c9aef Remove unnecessary constructor and Clone derives 2023-11-29 13:38:05 -05:00
Marshall Bowers
390b0d8d56 Reorganize list components 2023-11-29 13:34:50 -05:00
Max Brunsfeld
960ef7116d
Add a context menu to the project panel (#3393)
This PR adds a context menu to the project panel in Zed2.

* [x] Allow the context menu to extend outside of the project panel's
bounds
* [x] Add keyboard shortcuts to the context menu
* [x] Dismiss the context menu
    * [x] when running an action
    * [x] when changing selection in the project panel

Release Notes:

NA
2023-11-29 10:04:41 -08:00
Marshall Bowers
3e2c517dd1
Add Disableable trait (#3439)
This PR adds a new `Disableable` trait to use for elements that are
capable of being disabled.

Release Notes:

- N/A
2023-11-29 13:01:26 -05:00
Max Brunsfeld
dbfc7d3555 Merge branch 'main' into project-panel-context-menu 2023-11-29 09:45:31 -08:00