Commit graph

12496 commits

Author SHA1 Message Date
Marshall Bowers
456baaa112
Mainline GPUI2 UI work (#3099)
This PR mainlines the current state of new GPUI2-based UI from the
`gpui2-ui` branch.

Included in this is a performance improvement to make use of the
`TextLayoutCache` when calling `layout` for `Text` elements.

Release Notes:

- N/A

---------

Co-authored-by: Nate Butler <iamnbutler@gmail.com>
Co-authored-by: Antonio Scandurra <me@as-cii.com>
2023-10-06 13:18:56 -04:00
Piotr Osiewicz
c46137e40d
chore: Upgrade to Rust 1.73 (#3096)
Release Notes:
- N/A
2023-10-06 14:50:29 +02:00
Piotr Osiewicz
b391f5615b
rust: Highlight async functions in completions (#3095)
Before (code in screenshot is from this branch,
`crates/zed/languages/rust.rs:179`):

![image](https://github.com/zed-industries/zed/assets/24362066/6b709f8c-1b80-4aaa-8ddc-8db9dbca5a5e)
Notice how the last 2 entries (that are async functions) are not
highlighted properly.
After:

![image](https://github.com/zed-industries/zed/assets/24362066/88337f43-b97f-4257-9c31-54c9023e8dbb)

This is slightly suboptimal, as it's hard to tell that this is an async
function - I guess adding an `async` prefix is not really an option, as
then we should have a prefix for non-async functions too. Still, at
least you can tell that something is a function in the first place. :)

Release Notes:
- Fixed Rust async functions not being highlighted in completions.
2023-10-06 14:43:03 +02:00
Max Brunsfeld
559433bed0
Fix panic when immediately closing a window while opening paths (#3092)
Fixes this panic that I've been seeing in Slack:


[example](https://zed-industries.slack.com/archives/C04S6T1T7TQ/p1696530575535779)


```
thread 'main' panicked at 'assertion failed: opened_items.len() == project_paths_to_open.len()'
crates/workspace/src/workspace.rs:3628
<backtrace::capture::Backtrace>::create
<backtrace::capture::Backtrace>::new
Zed::init_panic_hook::{closure#0}
std::panicking::rust_panic_with_hook
std::panicking::begin_panic_handler::{{closure}}
std::sys_common::backtrace::__rust_end_short_backtrace
_rust_begin_unwind
core::panicking::panic_fmt
core::panicking::panic
<workspace::Workspace>::new_local::{closure#0}::{closure#0}
```

I believe it was caused by a window being closed immediately, while it
was still loading some paths. There was a mismatch in expectation
between the `workspace::open_items` function (which contains this
assertion), and the `Workspace::load_workspace` method. That later
method can return an empty vector if the workspace handle is dropped
while it is executing.

Release Notes:

- Fixed a crash when closing a Zed window immediately after opening it
2023-10-05 16:28:23 -07:00
Max Brunsfeld
8fafae2cfa Fix panic when immediately closing a window while opening paths 2023-10-05 16:21:14 -07:00
Max Brunsfeld
b3c9473bc8 collab 0.23.2 2023-10-05 16:06:28 -07:00
Max Brunsfeld
b77c815bcd
Fix bugs in handling mutual following (#3091)
This fixes some bugs in our following logic, due to our attempts to
prevent infinite loops when two people follow each other.

* Propagate all of leader's views to a new follower, even if those views
were originally created by that follower.
* Propagate active view changes to followers, even if the active view is
following that follower.
* Avoid redundant active view updates on the client.

Release Notes:

- Fixed bugs where it was impossible to follow someone into a view that
they previously following you into.
2023-10-05 15:16:58 -07:00
Mikayla Maki
37de4a9990
Add markdown parsing to channel chat (#3088)
TODO:
- [x] Add markdown rendering to channel chat
- [x] Unify (?) rendering logic between hover popover and chat
- [x] ~~Determine how to deal with document-oriented markdown like `#`~~
Unimportant until we want to do something special with `#channel`
- [x] Tidy up spacing and styles in chat panel

Release Notes:

- Added markdown rendering to channel chat
- Improved channel chat message style
- Fixed a bug where long chat messages would not soft wrap
2023-10-05 14:30:12 -07:00
Mikayla
c4870e1b6b
re-unify markdown parsing between hover_popover and chat 2023-10-05 14:22:41 -07:00
Max Brunsfeld
438dd42f7d Fix bugs in handling mutual following
* Propagate all of leader's views to a new follower, even if those views
  were originally created by that follower.
* Propagate active view changes to followers, even if the active view is
  following that follower.
* Avoid redundant active view updates on the client.
2023-10-05 13:28:46 -07:00
Mikayla
f57d563578
Improve chat rendering 2023-10-05 11:58:41 -07:00
Joseph T. Lyons
c8535440d3
Add session id (#3090)
Release Notes:

- N/A
2023-10-05 14:57:08 -04:00
Joseph T. Lyons
84ea34f918 Add session id 2023-10-05 14:50:48 -04:00
Mikayla
44ada52185
Fix bug where chat text wouldn't wrap to width 2023-10-05 11:06:29 -07:00
Conrad Irwin
78b1231386
Clear SelectionGoal on input (#3089)
Release Notes:

- `up` and `down` now go to the correct place after inserting
2023-10-05 09:57:36 -06:00
Conrad Irwin
f1c743286d Clear SelectionGoal on input 2023-10-05 09:02:52 -06:00
Mikayla
d298afba01
Create markdown text element and add to channel chat 2023-10-04 17:47:30 -07:00
Mikayla Maki
acffc7e7f0
Remove old code from notes icon click handler (#3085)
Release Notes:

- Fix clicking the notes icon when people are in the channel (preview
only)
2023-10-04 15:15:25 -07:00
Mikayla Maki
b0e56b7c54
107 channel touch ups (#3087)
Release Notes:

- Add user avatars to channel chat messages
- Group messages by sender
- Fix visual bugs in new chat and note buttons
2023-10-04 15:14:39 -07:00
Max Brunsfeld
df2fa87e6b collab 0.23.1 2023-10-04 15:12:17 -07:00
Max Brunsfeld
a27be35325
Ensure chat messages are retrieved in order of id (#3086)
Also, remove logic for implicitly marking chat messages as observed when
they are fetched. I think this is unnecessary, because the client always
explicitly acknowledges messages when they are shown.

Release Notes:

- Fixed a bug where chat messages were shown out of order (preview only)
2023-10-04 15:10:49 -07:00
Mikayla
2f3c3d510f
Fix hit boxes and hover styles for new buttons
co-authored-by: conrad <conrad.irwin@gmail.com>
2023-10-04 14:44:50 -07:00
Max Brunsfeld
d09767a90b Ensure chat messages are retrieved in order of id 2023-10-04 14:43:53 -07:00
Conrad Irwin
427a857e9a
Fix panic in increment (#3084)
Release Notes:

- Fixes a panic in vim when incrementing a non-number.
2023-10-04 15:39:24 -06:00
Conrad Irwin
e9842091e4
save tweaks (#3031)
- use SaveAll instead of Save
- TODO: fix where closing a multi-buffer gives a confusing save prompt
2023-10-04 15:38:07 -06:00
Mikayla
73e78a2257
Adjust channel rendering to group related messages 2023-10-04 14:29:08 -07:00
Conrad Irwin
f7cd0e84f9 Remove old code from notes icon click handler 2023-10-04 15:18:26 -06:00
Conrad Irwin
a4e77af571 Fix panic in increment 2023-10-04 15:13:01 -06:00
Mikayla
5074bccae4
Add image avatars to channel messages 2023-10-04 14:04:02 -07:00
Conrad Irwin
7d94b0325f
Fix renaming (#3083)
Release Notes:

- Fix bugs arising from saving an untitled buffer
2023-10-04 14:50:31 -06:00
Conrad Irwin
ff1722d307 Fix tracking newly saved buffers
Co-Authored-By: Mikayla Maki <mikayla@zed.dev>
2023-10-04 14:44:21 -06:00
Joseph T. Lyons
6cb674a0aa collab 0.23.0 2023-10-04 15:01:38 -04:00
Joseph T. Lyons
6db47478cf v0.108.x dev 2023-10-04 15:00:53 -04:00
Mikayla Maki
01b45f4f23
Show when a channel resource changes (#3074)
This PR adds a mechanism for notifying the client when a channel note
has been edited or a message has been changed.

TODO: 
- [x] Fix infinite loop when opening the chat panel
- [x] Switch to client-side ack model of observation detection
- [x] Add client-side-only change detection (e.g. for when a channel
note is open locally but not focused)
- [x] Review implementation / query performance.
- [x] Fix lack of ACK on restart for channel buffers
- [x] remove channel note opening on click
- [x] Fix channel messages sent while chat channel is in the background
not showing the channel as changed.

Release Notes:

- N/A
2023-10-04 11:57:33 -07:00
Mikayla
4d61d01943
Add an RPC handler for channel buffer acks
co-authored-by: max <max@zed.dev>
2023-10-04 11:47:13 -07:00
Mikayla
dd0edcd203
Changed the on-click behavior of joining a channel to not open the chat, and only open 1 project instead of all projects
Co-authored-by: conrad <conrad.irwin@gmail.com>
Co-authored-by: max <max@zed.dev>
2023-10-04 11:46:08 -07:00
Mikayla
e548572f12
Fix channel messages test 2023-10-04 10:13:02 -07:00
Mikayla
db8096ccdc
Fix most tests for new chat changes 2023-10-03 20:50:17 -07:00
Mikayla
3bc7024f8b
Fix unit test
co-authored-by: Conrad <conrad.irwin@gmail.com>
2023-10-03 20:03:57 -07:00
Mikayla
4ff80a7074
Fix a few mouse event id bugs and move facepile to the left
co-authored-by: conrad <conrad.irwin@gmail.com>
2023-10-03 19:45:33 -07:00
Mikayla
23ee8211c7
Lower frequency of popup warning when leaving a call
co-authored-by: conrad <conrad.irwin@gmail.com>
2023-10-03 19:30:05 -07:00
Max Brunsfeld
95342c8c33 Merge branch 'main' into channel-changes 2023-10-03 17:52:28 -07:00
Max Brunsfeld
61e0289014 Acknowledge channel notes and chat changes when views are active
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-10-03 17:40:10 -07:00
Max Brunsfeld
af09861f5c Specify uuid crate in the root Cargo.toml
Co-authored-by: Mikayla <mikayla@zed.dev>
2023-10-03 17:39:24 -07:00
Conrad Irwin
55d2b9b3c9
join channels (#3082)
Release Notes:

- Clicking on a channel in the sidebar will now join the channel and
open the notes
- If you join a channel that already shared projects, you will join the
projects automatically and follow the host.
- Clicking on the current channel in the sidebar will re-open the notes.
- Chat can now be accessed from the right click menu of channels.


- (probably not worth mentioning) Various improvements to hover states
and tooltips in the collab ui; and if you click on a channel while in
another call, confirm before switching.
2023-10-03 13:54:11 -06:00
Conrad Irwin
044fb9e2f5 Confirm on switching channels 2023-10-03 13:45:48 -06:00
Mikayla
6007c8705c
Upgrade SeaORM to latest version, also upgrade sqlite bindings, rustqlite, and remove SeaQuery
co-authored-by: Max <max@zed.dev>
2023-10-03 12:16:53 -07:00
Conrad Irwin
d696b394c4 Tooltips for contacts 2023-10-03 12:54:39 -06:00
Mikayla
32c4138758
Added db message and edit operation observation
Co-authored-by: Max <max@zed.dev>
2023-10-03 11:39:59 -07:00
Conrad Irwin
d8bfe77a3b Scroll so that collab panel is in good state for calls 2023-10-03 12:00:02 -06:00