Commit Graph

16015 Commits

Author SHA1 Message Date
Nate Butler
e778e17f54
Style assistant panel (#3711)
[[PR Description]]

Styles most of the assistant panel. A few notes:

- We now cut off the title if it gets to long so the assistant tools
don't get cut off
- I wasn't able to get to the "no api key" state, so that hasn't been
style checked yet.
- A few of icons were updated in this PR

I also added a new tooltip that teaches you a bit about role cycling:

![CleanShot 2023-12-19 at 12 08
15@2x](https://github.com/zed-industries/zed/assets/1714999/89dcdcc0-9ef9-4527-94a2-6146b5f127f2)

🐜 Known issues 🐜

- There is a bug where zooming the panel makes it shift 1px (@maxdeviant
I think this has to do with panel borders)
- We are showing a timestamp for new conversations before you have sent
a message/launched an assist action. I wasn't sure how to case this out.

Before:

![CleanShot 2023-12-19 at 12 06
17@2x](https://github.com/zed-industries/zed/assets/1714999/16154add-a7f4-455a-a5c5-706847e012a2)

![CleanShot 2023-12-19 at 12 05
00@2x](https://github.com/zed-industries/zed/assets/1714999/a6d325ec-59c2-41b3-ad82-6cf88f2f70a0)

After:

![CleanShot 2023-12-19 at 12 05
37@2x](https://github.com/zed-industries/zed/assets/1714999/aaa4668e-b361-411a-8865-1989bd1c3ae1)

![CleanShot 2023-12-19 at 12 05
52@2x](https://github.com/zed-industries/zed/assets/1714999/0c6a9970-56ab-43cc-9394-fd3f6bf0ed6a)


Release Notes:

- N/A
2023-12-19 12:11:18 -05:00
Marshall Bowers
616ea131af
Style buffer search input (#3713)
This PR styles the text input for the buffer search.

Release Notes:

- N/A
2023-12-19 12:11:06 -05:00
Max Brunsfeld
b797cd3e71
Fix panel resize (#3707)
* [x] Reposition right dock handle
* [x] Handle mouse events correctly for drag and drop
* [x] Prevent drag events from passing through the resize handle to the
draggable items in the panels (channels, files)
* [x] Stop the editor gutter from stealing mouse move events
2023-12-19 09:08:56 -08:00
Nate Butler
5d95e13cc8 Update assistant editor 2023-12-19 12:04:01 -05:00
Max Brunsfeld
e655d2434a Don't stop propagation on mouse move over editor gutter 2023-12-19 09:02:25 -08:00
Nate Butler
d8eea949ef Update assistant panel message header, model switcher 2023-12-19 11:58:20 -05:00
Nate Butler
a1085184a1 use to_string to return the format distance string from FormatDistance 2023-12-19 11:57:57 -05:00
Max Brunsfeld
cf037ea4a8 Merge branch 'main' into fix-panel-resize 2023-12-19 08:55:55 -08:00
Nate Butler
d8a8feb45c Add FormatDistance struct, add hide_prefix option 2023-12-19 11:41:14 -05:00
Marshall Bowers
3e6b84a726
Wire up the middle mouse button to close tabs (#3714)
This PR wires up the middle mouse button to close tabs.

Right now we're doing this using `on_mouse_down`, but we need a way in
GPUI2 to have an `on_click` for a mouse button other than the left one.

Release Notes:

- N/A
2023-12-19 11:26:55 -05:00
Nate Butler
79653d2175 Rename format distance test names 2023-12-19 11:19:18 -05:00
Nate Butler
ae313ff830 Allow format_distance to take a DateTimeType 2023-12-19 11:16:59 -05:00
Nate Butler
30b01b9bc0 Update imports, tab height const 2023-12-19 11:03:08 -05:00
Nate Butler
286f654517 Update assistant header 2023-12-19 10:57:36 -05:00
Antonio Scandurra
cc107f72f8
Maintain scroll position in CollabPanel after updating entries (#3712)
Release Notes:

- N/A
2023-12-19 16:41:25 +01:00
Nate Butler
57efaa92cf Style assistant header, update icons 2023-12-19 10:30:46 -05:00
Antonio Scandurra
dd84993d76 Maintain scroll position in CollabPanel after updating entries
Co-Authored-By: Julia <julia@zed.dev>
2023-12-19 16:06:00 +01:00
Nate Butler
42a02e4fb6 Remove red border 2023-12-19 10:03:59 -05:00
Nate Butler
2c402f9b5d Ensure conversation items fill the container 2023-12-19 10:03:26 -05:00
Nate Butler
49502af4d3 Update conversation item rendering 2023-12-19 09:56:29 -05:00
Antonio Scandurra
91b65958a7
Fix janky editor scrollbar dragging (#3710)
We can receive multiple events before computing the next frame, and in
that case we want to compute a drag delta between the position for the
previous mouse event and the current one.

Release Notes:

- N/A
2023-12-19 15:41:15 +01:00
Antonio Scandurra
b30fd3f574 Fix janky editor scrollbar dragging
We can receive multiple events before computing the next frame, and
in that case we want to compute a drag delta between the position for the
previous mouse event and the current one.
2023-12-19 15:32:42 +01:00
Antonio Scandurra
1bb85c1b9a
Prevent default when mousing down on a button that responds to clicks (#3709)
This ensures that ancestors that track focus don't accidentally steal it
on mouse down, which was preventing the editor from deploying the code
actions menu.

Release Notes:

- N/A
2023-12-19 14:41:58 +01:00
Antonio Scandurra
afbc61a344 Prevent default when mousing down on a button that responds to clicks
This ensures that ancestors that track focus don't accidentally steal
it on mouse down, which was preventing the editor from deploying the
code actions menu.
2023-12-19 14:27:19 +01:00
Antonio Scandurra
02e53025f3 Track caller on h_stack and v_stack 2023-12-19 14:26:30 +01:00
Antonio Scandurra
6a0740fa6d
Set window edited in zed2 (#3708)
Release Notes:

- N/A
2023-12-19 12:05:32 +01:00
Antonio Scandurra
ae32706cfe Fix tests 2023-12-19 11:04:32 +01:00
Antonio Scandurra
ba0d7e35bb Set window edited 2023-12-19 10:26:06 +01:00
Kirill Bulatov
4b74f30d0a Properly restore termina current dir when deserializing the project 2023-12-19 06:44:26 +02:00
Max Brunsfeld
2979eb9da9 Allow transparent divs to be considered "top layers"
This changes the meaning of `was_top_layer` so that it is checking that
nothing opaque is on top of the given layer. The layer in question
need not be opaque.
2023-12-18 18:32:08 -08:00
Max Brunsfeld
b88370d5ad Respect a div's own z-index when adding its event listeners 2023-12-18 18:02:19 -08:00
Max Brunsfeld
ee8e1454fc Fix drag and drop logic in div's mouse handling
* Attach mouse up and mouse move listeners immediately, not just when there
  is already a drag in progress, because when starting a drag, these other
  events may fire before the next frame.
* Remove bounds checks for handling mouse move and mouse events, since a
  dragged object may be moved outside of its original container.

Co-authored-by: Nathan Sobo <nathan@zed.dev>
2023-12-18 16:17:56 -08:00
Max Brunsfeld
e6f3731efd Fix position of right dock handle
Co-authored-by: Nathan Sobo <nathan@zed.dev>
2023-12-18 16:05:54 -08:00
Marshall Bowers
91f1be213b
Style project share notification (#3706)
This PR styles the project share notification, so we're not staring a
red rectangle.

<img width="425" alt="Screenshot 2023-12-18 at 6 06 14 PM"
src="https://github.com/zed-industries/zed/assets/1486634/7ae9a2d3-d5d9-427c-9125-3a47df5f6a2f">

Release Notes:

- N/A
2023-12-18 18:13:09 -05:00
Marshall Bowers
912f7e6c1a
Add ability to warn on missing theme values (#3705)
This PR adds the ability to warn in the `theme_importer` when a theme is
missing values.

Providing the `--warn-on-missing` flag to the `theme_importer` will
print a warning for missing theme value when printing the theme.

```sh
cargo run -p theme_importer -- --warn-on-missing
```

Release Notes:

- N/A
2023-12-18 17:18:49 -05:00
Marshall Bowers
734bbfa66f
Use status colors for contact availability indicators (#3704)
This PR updates the availability indicators in the contact list to use
the status colors from the theme.

Release Notes:

- N/A
2023-12-18 16:56:44 -05:00
Marshall Bowers
64ceb61aa3
Add pane dividers (#3703)
This PR adds dividers between panes in a split.

Release Notes:

- N/A
2023-12-18 16:32:51 -05:00
Nate Butler
6da0fa98e2
Add toolbar spacing (#3702)
[[PR Description]]

Release Notes:

- N/A
2023-12-18 16:18:53 -05:00
Nate Butler
a286ec4650 Update toolbar.rs 2023-12-18 16:10:13 -05:00
Marshall Bowers
9785481aba
Make Disclosure accept an ID (#3701)
This PR makes the `Disclosure` component accept an ID rather than using
a static ID for all disclosures.

Release Notes:

- N/A
2023-12-18 15:21:04 -05:00
Nate Butler
9cd8e99a9a Update toolbar.rs 2023-12-18 14:10:12 -05:00
Nate Butler
2ae39b70c8 Add left side padding 2023-12-18 13:55:30 -05:00
Marshall Bowers
4fdf6a867a
Wire up offline contact list (#3700)
This PR wires up the offline contact list.

Also enables toggling both the online and offline contact lists.

Release Notes:

- N/A
2023-12-18 13:54:11 -05:00
Nate Butler
c9893ce2fd Use flex_1 div instead of justify_center in toolbar 2023-12-18 13:51:04 -05:00
Nathan Sobo
d058515b81
Use a different frame arena for each window (#3696)
This fixes a panic that was caused by sharing the same frame allocator
for different windows.

Release Notes:

- N/A
2023-12-18 11:49:59 -07:00
Max Brunsfeld
0000e68310 Remove unused Arena::sized method 2023-12-18 10:41:02 -08:00
Antonio Scandurra
37efe82c5e Use a different frame arena for all elements
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-12-18 19:35:17 +01:00
Marshall Bowers
98f5a3d544
Center text on welcome screen (#3699)
This PR centers the text "Code at the speed of thought" on the welcome
screen.

Release Notes:

- N/A
2023-12-18 13:35:05 -05:00
Marshall Bowers
0aa690f915
Always show channel toggle when collapsed (#3698)
This PR makes the channel toggle disclosure always visible when a
channel tree is collapsed, as opposed to just being visible on hover.

This makes it possible to visually identify collapsed channel trees
without having to hover over each entry.

Release Notes:

- N/A
2023-12-18 13:27:47 -05:00
Nate Butler
f143467478
Update collab panel signed out state (#3697)
[[PR Description]]

Before: 

![CleanShot 2023-12-18 at 13 10
14@2x](https://github.com/zed-industries/zed/assets/1714999/a0e536c3-b5bf-45e2-893b-89b1ae7b4c47)

After:

![CleanShot 2023-12-18 at 13 10
36@2x](https://github.com/zed-industries/zed/assets/1714999/5d66a4a9-cc19-420d-82c7-58ec5cd264e4)

One known issue:

The "Sign in to enable collaboration" text below the button should be
centered, but it looks like label is reserving the full width. Need to
look in to that.

Release Notes:

- N/A
2023-12-18 13:22:45 -05:00