Commit Graph

585 Commits

Author SHA1 Message Date
Conrad Irwin
7899833367 Don't hang the app when signing in offline 2023-12-13 15:52:43 -07:00
Marshall Bowers
ee509e043d
Rework ListItem and ListHeader to use slot-based APIs (#3635)
This PR reworks the `ListItem` and `ListHeader` components to use
slot-based APIs, making them less opinionated about their contents.

Splitting this out of the collab UI styling PR so we can land it to
avoid conflicts.

Co-authored-by: Nate <nate@zed.dev>

Release Notes:

- N/A
2023-12-13 16:08:31 -05:00
Max Brunsfeld
e09b07ddae
Allow dragging tabs (#3616) 2023-12-12 16:20:37 -08:00
Max Brunsfeld
6362221363 Scroll the tab bar to show the active tab
Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Marshall <marshall@zed.dev>
2023-12-12 15:42:33 -08:00
Max Brunsfeld
a579713a45 Allow dragging and dropping tabs
Co-authored-by: Nathan <nathan@zed.dev>
Co-authored-by: Marshall <marshall@zed.dev>
2023-12-12 15:07:03 -08:00
Max Brunsfeld
a4a501603e Start work on dragging tabs 2023-12-12 15:04:49 -08:00
Julia
2e00da5a79
zed2 notification panel (#3603)
Release Notes:

- N/A
2023-12-12 18:04:47 -05:00
Marshall Bowers
e489e2e583
Enable scrolling in tab bar (#3614)
This PR enables scrolling horizontally in the tab bar.

Currently this requires holding down <kbd>Shift</kbd> for the scroll to
activate. We'll need to look into this.

Scrolling also currently works when there is a split in the editor, as
the non-split view goes down a different rendering path that does not
constrain the pane width, which breaks a number of things.

Release Notes:

- N/A
2023-12-12 16:38:25 -05:00
Marshall Bowers
d2feaa41a5
Extract TabBar component (#3613)
This PR extracts a new `TabBar` component from the tab bar
implementation in the workspace.

Release Notes:

- N/A
2023-12-12 15:50:05 -05:00
Julia
fd6320b136 Finish fixing up Avatar using URI 2023-12-12 11:49:04 -05:00
Julia
44d40625fe Start changing Avatar to use URI
Co-Authored-By: Antonio Scandurra <antonio@zed.dev>
2023-12-12 11:27:40 -05:00
Kirill Bulatov
ca8e8d1065 Finish removing all dangerous focus APIs 2023-12-12 16:11:14 +02:00
Max Brunsfeld
cbce49ff68 Start work on dragging entries in the project panel 2023-12-11 15:52:58 -08:00
Max Brunsfeld
a208229a2c Use Box instead of Rc for List event handlers 2023-12-11 15:52:06 -08:00
Marshall Bowers
75c1f0e997
Add w_vw and h_vh to StyledExt for setting sizes in viewport units (#3600)
This PR adds `w_vw` and `h_vh` methods to `StyledExt`.

These methods are the same as their `w` and `h` counterparts, but
operate in viewport units, giving us the equivalent of `vw` and `vh` in
CSS.

You can see them in action in this story:

```
cargo run -p storybook2 -- components/viewport_units
```

Release Notes:

- N/A
2023-12-11 18:19:11 -05:00
Mikayla
3198eb6c6d
Merge branch 'main' into splits 2023-12-11 10:16:32 -08:00
Piotr Osiewicz
ddbd5cf2cb Merge branch 'main' into project_search2 2023-12-11 16:47:48 +01:00
Conrad Irwin
4290c67b6a Restore namespace parameter to actions!
This does not yet fix `derive(Action)`, but will conflict with a lot so
wanted to merge quickly.
2023-12-09 15:18:31 -07:00
Mikayla
fd34d1da31
Add back semi-funcitonal pane resizing code 2023-12-08 16:29:42 -08:00
Julia
40b219f861
zed2: Position terminal context menu, wire up dismis, and unbork context menu (#3561)
Release Notes:

- N/A
2023-12-08 14:47:28 -05:00
Julia
79e6dedb7a Track focus shenanigans with context menu
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-12-08 13:49:42 -05:00
Joseph T. Lyons
f4c93abad5
🚧 Feedback modal UI 🚧 (#3536)
[[PR Description]]

TODO: 
- [x] Add placeholder text to editor
- [x] Add external link icon to "Community repo" button
- [x] Show `not-allowed` cursor for disabled buttons
- [ ] Add `Headline` ui component
- [ ] Finish UI pass
- [ ] Fix `IconPosition` on button (should swap the icon side)
- [ ] Add conditional tooltip for disabled "Send feedback" button.
- [ ] Add common/top feedback link.
- [ ] Add `vw`/`vh` units to allow sizing the modal based on viewport
size.

Release Notes:

- N/A
2023-12-08 13:30:42 -05:00
Piotr Osiewicz
d0a673ec62 buffer_search: Add tooltips, polish keybinds 2023-12-08 12:37:20 +01:00
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
439df24526 Merge branch 'main' into feedback-modal-ui 2023-12-07 12:58:53 -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
5e5eb25aab WIP
[no-ci]
2023-12-07 10:50:07 -05:00
Piotr Osiewicz
b04838c23a WIP, search bar looks kinda okay 2023-12-07 16:26:40 +01:00
Nate Butler
f798b193d0 WIP 2023-12-07 01:46:28 -05:00
Nate Butler
7a1eb54106 checkpoint 2023-12-07 00:33:24 -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