Commit Graph

518 Commits

Author SHA1 Message Date
Max Brunsfeld
233aac5573 Make DismissEvent a unit struct
Co-authored-by: Conrad <conrad@zed.dev>
2023-11-29 09:42:54 -08:00
Marshall Bowers
043cef89eb
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
ac34229118 Add keyboard control over context menus
Co-authored-by: Conrad <conrad@zed.dev>
2023-11-29 09:39:20 -08:00
Marshall Bowers
912c30c05b Remove unneeded .clones 2023-11-29 12:35:39 -05:00
Marshall Bowers
97e6fd295a Remove unneeded wrapping divs in ListItem left content 2023-11-29 12:29:48 -05:00
Nate Butler
a8bf0834e6
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
5fbc60d8da Inviting/Responding/Creating Channels... etc. 2023-11-28 22:47:04 -07:00
Conrad Irwin
0d4839b973 use the right click event for buttons 2023-11-28 21:14:48 -07:00
Marshall Bowers
e36c7dd301
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
8d1518d70c 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
77acba9e4c 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
6bf7ad71eb Show action key bindings in context menus 2023-11-28 16:07:42 -08:00
Conrad Irwin
60ce75c34a Togglable channels, the greatest since sliced bread 2023-11-28 16:52:12 -07:00
Max Brunsfeld
bcf449d3fe Add a basic context menu to the project panel 2023-11-28 15:12:46 -08:00
Marshall Bowers
5666066db4 Merge branch 'main' into collab-panel2 2023-11-28 17:07:40 -05:00
Marshall Bowers
ee027bc112
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
Conrad Irwin
a85e0db1f4 More progress on collab panel 2023-11-28 14:40:32 -07:00
Marshall Bowers
64376ad37a
ui2: Reference theme2 and settings2 crates without the 2 (#3424)
This PR updates the `ui2` crate to reference the `theme2` and
`settings2` crates without the `2` the way we do in our other crates.

Release Notes:

- N/A
2023-11-28 15:30:29 -05:00
Nate Butler
b24a3b8fcb Unused imports 2023-11-28 15:17:09 -05:00
Nate Butler
525fe70de6 Fix missing arrows 2023-11-28 15:15:49 -05:00
Nate Butler
21755c7d20 Update keybinding.rs 2023-11-28 15:12:40 -05:00
Nate Butler
3855413725 Merge branch 'main' into refine-keybindings 2023-11-28 15:12:22 -05:00
Marshall Bowers
070674a4fd
ui2: Unsuppress and fix warnings (#3423)
This PR unsupresses the warnings in `ui2` and summarily fixes them.

Release Notes:

- N/A
2023-11-28 14:44:19 -05:00
Nate Butler
a9cb6589dd Update keybinding.rs 2023-11-28 14:40:26 -05:00
Marshall Bowers
874fde09ab
Add inset variant to ListItem (#3422)
This PR adds an inset variant to the `ListItem` component.

We're now using this inset variant for the `ListItem`s we render in
pickers.

Release Notes:

- N/A
2023-11-28 14:27:19 -05:00
Nate Butler
f33cd3d463 Merge branch 'main' into refine-keybindings 2023-11-28 14:00:09 -05:00
Conrad Irwin
01d3432a40 Merge branch 'main' into collab-panel2 2023-11-28 11:40:58 -07:00
Marshall Bowers
9411898720
Use ListItems in the project panel (#3421)
This PR reworks the project panel to render its items using the
`ListItem` component.

There are a few hacks in here in order to get click handlers working for
the `ListItem`, but we'll want to get these fixed in GPUI.

Release Notes:

- N/A
2023-11-28 13:11:43 -05:00
Antonio Scandurra
3ac545088a WIP: preserve aspect ratio of images 2023-11-28 17:33:11 +01:00
Marshall Bowers
1ee109cec7 Use ListItem when rendering picker matches 2023-11-28 10:44:57 -05:00
Piotr Osiewicz
9fb3cb6a69 fixup! Add contact finder, change ui::List's on_click handler signature 2023-11-28 14:37:53 +01:00
Piotr Osiewicz
6c37393dd1 Add contact finder, change ui::List's on_click handler signature 2023-11-28 14:16:51 +01:00
Nate Butler
979ff70196 Update popover.rs 2023-11-27 20:12:20 -05:00
Nate Butler
ca2052b0c1 Merge branch 'main' into completions-styles 2023-11-27 19:22:07 -05:00
Conrad Irwin
4a25fae51e TEMP 2023-11-27 16:22:01 -07:00
Julia
d551b41aae zed2: Mostly port breadcrumbs & improve StyledText api
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-11-27 16:09:31 -05:00
Marshall Bowers
24f3034106
Add ListItem story (#3411)
This PR adds a story for the `ListItem` component, so we can work on it
in isolation.

Release Notes:

- N/A
2023-11-27 15:24:41 -05:00
Conrad Irwin
4f885252ab
[Zed2] Collab UI (#3403)
Release Notes:

- N/A
2023-11-27 12:40:59 -07:00
Marshall Bowers
19ecccb107 Add ListItem story 2023-11-27 14:20:33 -05:00
Conrad Irwin
82f6f77117 Use editor's overlay implementation 2023-11-27 11:49:51 -07:00
Conrad Irwin
212d9254e1 Merge branch 'main' into completions-styles 2023-11-27 11:49:39 -07:00
Nate Butler
ab83f4319b revert popover changes
[no ci]
2023-11-27 11:51:42 -05:00
Conrad Irwin
fd165206bf
gpui2: Notifications (#3407)
Release Notes:

- N/A
2023-11-27 09:22:31 -07:00
Nate Butler
8a35a02863 Checkpoint - try using overlay for completions popover
[no ci]
2023-11-27 11:22:19 -05:00
Nate Butler
1acc6b462f Start on completions styles 2023-11-27 10:29:29 -05:00
Piotr Osiewicz
5cbe8deb50 Fix up tests 2023-11-27 12:33:44 +01:00
Conrad Irwin
039c933d8e gpui2: Notifications 2023-11-26 22:28:53 -07:00
Nate Butler
6a3925c3e1 Add copilot icons 2023-11-24 09:22:31 -05:00
Nate Butler
7e61d340ce Outline some unfinished elements 2023-11-24 08:58:49 -05:00
Antonio Scandurra
56d043f671 Allow finding which ranges were clicked on an InteractiveText 2023-11-23 18:08:49 +01:00
Piotr Osiewicz
390ecb5b0c Merge branch 'main' into collab_ui-zed2 2023-11-23 15:02:55 +01:00
Piotr Osiewicz
c191943849 Add basic call/user UI in top-right corner.
Allow ui::Avatar to take custom data instead of always relying on URI resolution
2023-11-23 15:00:13 +01:00
Antonio Scandurra
3b918bfee8 Merge branch 'main' into rename-element-traits
# Conflicts:
#	crates/gpui2/src/elements/uniform_list.rs
#	crates/ui2/src/components/context_menu.rs
#	crates/ui2/src/components/list.rs
2023-11-23 12:47:46 +01:00
Nathan Sobo
c23f17ee0b Reorganize element-related traits 2023-11-22 11:19:43 -07:00
Marshall Bowers
fd5793ddec Use children for ListItems 2023-11-22 12:44:51 -05:00
Marshall Bowers
031fca4105 Simplify ContextMenu by not storing list components 2023-11-22 12:41:29 -05:00
Marshall Bowers
a94cf54aab
Fix storybook (#3379)
This PR fixes storybook and gets it back into a compiling and running
state.

Release Notes:

- N/A
2023-11-21 14:28:00 -05:00
Nate Butler
6fe7b22164
UI refinements + Popover (#3377)
[[PR Description]]

- Update default ui_font_size
- Update toolbar style
- Start on ui::Popover

Release Notes:

- N/A
2023-11-21 13:49:10 -05:00
Marshall Bowers
1b05aad30c
Extract Story into separate story crate (#3378)
This PR extracts the `Story` component into a separate `story` crate so
that it can be shared among various crates that define stories.

Release Notes:

- N/A

---------

Co-authored-by: Nate Butler <iamnbutler@gmail.com>
2023-11-21 13:42:00 -05:00
Nate Butler
40a49e6896 Update popover doc
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-11-21 12:43:56 -05:00
Nate Butler
9a145a4d86 Correctly position popover aside, add list item states
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-11-21 12:40:48 -05:00
Nate Butler
9f2e3bab9b Allow popover to take an aside
Co-Authored-By: Marshall Bowers <1486634+maxdeviant@users.noreply.github.com>
2023-11-21 12:26:10 -05:00
Nate Butler
dac7912e87 Start on popover 2023-11-21 12:10:06 -05:00
Marshall Bowers
f4b4bdfd83
ui2: Get component stories compiling again (#3376)
This PR gets the component stories defined in `ui2` compiling again.

Release Notes:

- N/A
2023-11-21 12:06:25 -05:00
Nate Butler
f04deeb5f9 Document InteractionState 2023-11-21 11:51:15 -05:00
Nate Butler
209fb10731 Remove stories mod until it is re-enabled 2023-11-21 01:36:35 -05:00
Nate Butler
8947438510 Update elevation 2023-11-21 01:23:47 -05:00
Nate Butler
453aa5ffd7 TextColor -> Color 2023-11-21 01:05:29 -05:00
Nate Butler
56d45e72cd Add Shape enum to avatar component, refactor UITextSize to styles/typography.rs 2023-11-21 00:59:29 -05:00
Nate Butler
205607a9cd Clean out UI 2023-11-21 00:44:51 -05:00
Piotr Osiewicz
2138715fca Merge remote-tracking branch 'origin/callback-handles' into search2 2023-11-21 01:16:21 +01:00
Mikayla
a844bf7d41
Fix stories
co-authored-by: Piotrek <piotr@zed.dev>
2023-11-20 16:06:10 -08:00
Piotr Osiewicz
54a3b56935 Merge remote-tracking branch 'origin/callback-handles' into search2 2023-11-21 00:40:20 +01:00
Conrad Irwin
8049ec674e Fix last thing 2023-11-20 16:35:56 -07:00
Conrad Irwin
5c0f2e75ea Remove all the settings 2023-11-20 16:30:14 -07:00
Conrad Irwin
3e2dba36b4 Merge branch 'main' into callback-handles 2023-11-20 16:28:35 -07:00
Mikayla
2c4d83c9af
WIP
co-authored-by: conrad <conrad@zed.dev>
co-authored-by: Nathan <nathan@zed.dev>
2023-11-20 14:46:01 -08:00
Marshall Bowers
652e3b0bb6
Rename ListEntry to ListItem (#3371)
This PR renames the `ListEntry` component to `ListItem` to better
reflect its intent.

Release Notes:

- N/A
2023-11-20 16:13:06 -05:00
Marshall Bowers
eb307b22f0
Rework List to use children (#3369)
This PR reworks the `List` component to use `children` instead of
accepting a `Vec<ListItem>` in its constructor.

This is a step towards making the `List` component more open.

Release Notes:

- N/A
2023-11-20 14:58:31 -05:00
Conrad Irwin
d0dd44faad Merge branch 'main' into callback-handles 2023-11-20 12:21:42 -07:00
Piotr Osiewicz
d60855b06d Merge branch 'main' into search2 2023-11-20 19:23:35 +01:00
Piotr Osiewicz
fa8cd843ca fixup! Merge branch 'main' into search2 2023-11-20 18:42:15 +01:00
Piotr Osiewicz
07cc5904f8 Merge branch 'main' into search2 2023-11-20 18:37:41 +01:00
Conrad Irwin
b19a6c0dcc Fix storybook2 2023-11-20 10:16:05 -07:00
Conrad Irwin
f86480ba5d Merge followup mess 2023-11-20 09:58:05 -07:00
Conrad Irwin
0798cfd58c Merge branch 'main' into derive-element-redux 2023-11-20 09:15:38 -07:00
Nate Butler
176a68f90f kb 2023-11-20 10:46:23 -05:00
Mikayla
f3eb1d4abf
Add button port example 2023-11-19 19:11:51 -08:00
Piotr Osiewicz
b67193e322
ui2: Do not enable 'stories' feature by default. (#3363)
This cuts down LLVM IR size from 3 million lines to 700k in debug build.
This then leads to ~3s compile time in debug build (without incremental
on ui itself), as opposed to 10.5s on main.

Release Notes:

- N/A
2023-11-19 12:11:42 +01:00
Piotr Osiewicz
e83a297229 Move binding function back into keybinding module 2023-11-19 11:54:46 +01:00
Piotr Osiewicz
31336b0b7d ui2: Do not enable 'stories' feature by default.
This cuts down LLVM IR size from 3 million lines to 700k in debug build.
This then leads to ~3s compile time in debug build (without incremental on ui itself), as opposed to 10.5s on main.
2023-11-19 11:44:33 +01:00
Nathan Sobo
33cd6f520a Clean compile with redesigned element traits 2023-11-18 21:51:47 -07:00
Nathan Sobo
adc355a1e6 Element refinement passing on ui2 2023-11-18 20:05:47 -07:00
Nathan Sobo
be33f000e2 WIP: Lots of errors, starting on resurrecting derive Element 2023-11-18 00:27:40 -07:00
Nathan Sobo
23ffce9fbe WIP: Work toward eliminating Component trait
This refactor enhances the overall design by promoting reusable and composable UI component structures within the Zed project codebase.
2023-11-18 00:03:23 -07:00
Nathan Sobo
2515bbf990 Move self in Element::paint
Remove mutable state borrows in favor of state ownership in render processes to streamline element rendering.
2023-11-17 23:32:55 -07:00
Nate Butler
b218ab4755 Remove default hover state for icon buttons 2023-11-18 01:02:21 -05:00
Julia
189ddf9380 Merge branch 'main' into unborked-git-zed2-diagnostics-view 2023-11-17 16:43:29 -05:00
Julia
3655a96e54 Merge branch 'main' into unborked-git-zed2-diagnostics-view 2023-11-17 16:32:35 -05:00
Julia
967ef9d414 Render diagnostics view and such a bit more 2023-11-17 16:32:35 -05:00