Nate Butler
acbeafea3a
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
Nate Butler
a24d4920fd
Merge branch 'main' into collab-ui-refinement
2023-12-01 10:50:25 -05:00
Marshall Bowers
16465bb2e9
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
f139380986
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
c948ffad89
Flesh out a popover control
2023-11-30 16:13:44 -07:00
Marshall Bowers
70e0762838
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
0a836c7934
WIP update popover_menu
2023-11-30 14:54:44 -05:00
Marshall Bowers
b2f481567f
Implement Selectable for ListItem and ListHeader
2023-11-30 13:26:12 -05:00
Marshall Bowers
53b923ce9d
Remove unused GraphicSlot enum
2023-11-30 13:25:26 -05:00
Nate Butler
98ed3b9a2f
Clean up left side titlebar buttons
2023-11-30 13:11:20 -05:00
Marshall Bowers
16e5a3e4d5
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
Nate Butler
0953738f9d
Update collab button styles
2023-11-30 09:12:39 -05:00
Antonio Scandurra
dce8677ea7
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
4c694ad474
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
a359832abb
Allow toggling subchannel visiblity without joining channel
2023-11-29 23:55:14 -07:00
Nate Butler
fe80b7a347
WIP
2023-11-30 00:28:05 -05:00
Marshall Bowers
7f4c0fc6a4
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
a3da146926
Merge branch 'main' into collab-panel2
2023-11-29 16:32:25 -07:00
Marshall Bowers
6db2d19250
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
b0bc31b883
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
19f550c129
Merge branch 'main' into collab-panel2
2023-11-29 15:40:16 -07:00
Conrad Irwin
573b51326c
Availability indicators
2023-11-29 15:06:58 -07:00
Conrad Irwin
8426dc6da1
Make LeftSlot take an element
2023-11-29 14:20:26 -07:00
Marshall Bowers
22e7659624
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
416f7f91b0
Context menu, Dragon Drop, for collab panel ( #3441 )
...
Release Notes:
- N/A
2023-11-29 13:40:46 -07:00
Marshall Bowers
31f70353a7
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
4df2a078a7
No moar toggleable
2023-11-29 13:25:29 -07:00
Marshall Bowers
48493d1f6a
Rework Toggle into Toggleable and ToggleState
2023-11-29 14:33:52 -05:00
Marshall Bowers
9438636415
Rework Disclosure component
2023-11-29 14:07:48 -05:00
Marshall Bowers
51e94393ea
Remove unnecessary constructor and Clone derives
2023-11-29 13:38:05 -05:00
Marshall Bowers
bf04532715
Reorganize list components
2023-11-29 13:34:50 -05:00
Max Brunsfeld
e43284ae8a
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
a449e90498
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
0d3b09ea8d
Merge branch 'main' into project-panel-context-menu
2023-11-29 09:45:31 -08:00
Max Brunsfeld and Conrad
d018e9c0db
Make DismissEvent a unit struct
...
Co-authored-by: Conrad <conrad@zed.dev >
2023-11-29 09:42:54 -08:00
Marshall Bowers
7d40150cbf
Remove unneeded wrapping divs in ListItem left content ( #3438 )
...
This PR removes some unneeded wrapping `div`s around the left content in
`ListItem`s.
Release Notes:
- N/A
2023-11-29 12:40:35 -05:00
Max Brunsfeld and Conrad
9a733dedd7
Add keyboard control over context menus
...
Co-authored-by: Conrad <conrad@zed.dev >
2023-11-29 09:39:20 -08:00
Marshall Bowers
426d457c80
Remove unneeded .clones
2023-11-29 12:35:39 -05:00
Marshall Bowers
b0a9686c6c
Remove unneeded wrapping divs in ListItem left content
2023-11-29 12:29:48 -05:00
Nate Butler and Marshall Bowers
dfb60c6d1d
Button2 – Part1 ( #3420 )
...
## TODO
- [x] Remove `InteractionState`
- [ ] `Selectable` should use `Selection` instead of a boolean
- [x] Clean out ui2 prelude
- [ ] Build out button2 button types
- [ ] Port old buttons
Release Notes:
- N/A
---------
Co-authored-by: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com >
2023-11-29 12:23:09 -05:00
Conrad Irwin
efd1bc5be0
Inviting/Responding/Creating Channels... etc.
2023-11-28 22:47:04 -07:00
Conrad Irwin
d21311b5bc
use the right click event for buttons
2023-11-28 21:14:48 -07:00
Marshall Bowers
9bdfd34961
Remove ID hack in ListItem ( #3431 )
...
This PR removes the ID hack in `ListItem`, since the underlying issue
was fixed in #3430 .
Release Notes:
- N/A
2023-11-28 23:11:29 -05:00
Conrad Irwin
816425c971
Fix stateful elements in Components
...
Previously a component assumed its element was stateless, this was
incorrect!
2023-11-28 20:47:11 -07:00
Max Brunsfeld and Marshall
621bb446e2
Right-align key bindings in context menus
...
Remove extra div in `List` that prevented list items from
filling the available space.
Co-authored-by: Marshall <marshall@zed.dev >
2023-11-28 17:23:49 -08:00
Max Brunsfeld
8990ccbc48
Show action key bindings in context menus
2023-11-28 16:07:42 -08:00
Conrad Irwin
3949976c78
Togglable channels, the greatest since sliced bread
2023-11-28 16:52:12 -07:00
Max Brunsfeld
053f3b646a
Add a basic context menu to the project panel
2023-11-28 15:12:46 -08:00
Marshall Bowers
ab89e5c686
Merge branch 'main' into collab-panel2
2023-11-28 17:07:40 -05:00
Marshall Bowers
644a341bc5
Fix tooltips not showing on IconButtons ( #3427 )
...
This PR fixes tooltips not showing on `IconButton`s.
The "fix" here is the same hack that we used to fix `on_click` handlers
for `ListItem`s, where we introduce another layer of wrapping with an
element with an ID set.
This PR also adds a story for the `IconButton` so this issue can be
tested/observed in isolation.
Release Notes:
- N/A
2023-11-28 17:01:53 -05:00