Introduce channel notes (#2880)

![Screen Shot 2023-08-24 at 5 26 53
PM](https://github.com/zed-industries/zed/assets/326587/3e84c5a6-1aaf-4335-a880-4c32eb83332d)

### Todo

* [x] Snapshot channel buffers when everyone closes the buffer
* [x] Ensure that users who are in both a project and a channel note
have the same color in both places
* [x] Allow following project collaborators into channel notes
* [x] Expose notes for the current channel under "Current Call" section
of the collaboration panel
* [x] Offline state for the channel notes view
* [x] Make the channel context menu accessible to all members (to expose
the notes)
* [x] Wire in view and Item method overrides

Release Notes:

- N/A
This commit is contained in:
Mikayla Maki 2023-08-24 18:01:28 -07:00 committed by GitHub
commit fbc7b37b2f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
59 changed files with 3394 additions and 750 deletions

View file

@ -391,7 +391,7 @@ mod test {
the lazy dog"
})
.await;
let cursor = cx.update_editor(|editor, _| editor.pixel_position_of_cursor());
let cursor = cx.update_editor(|editor, cx| editor.pixel_position_of_cursor(cx));
// entering visual mode should select the character
// under cursor
@ -400,7 +400,7 @@ mod test {
fox jumps over
the lazy dog"})
.await;
cx.update_editor(|editor, _| assert_eq!(cursor, editor.pixel_position_of_cursor()));
cx.update_editor(|editor, cx| assert_eq!(cursor, editor.pixel_position_of_cursor(cx)));
// forwards motions should extend the selection
cx.simulate_shared_keystrokes(["w", "j"]).await;
@ -430,7 +430,7 @@ mod test {
b
"})
.await;
let cursor = cx.update_editor(|editor, _| editor.pixel_position_of_cursor());
let cursor = cx.update_editor(|editor, cx| editor.pixel_position_of_cursor(cx));
cx.simulate_shared_keystrokes(["v"]).await;
cx.assert_shared_state(indoc! {"
a
@ -438,7 +438,7 @@ mod test {
ˇ»b
"})
.await;
cx.update_editor(|editor, _| assert_eq!(cursor, editor.pixel_position_of_cursor()));
cx.update_editor(|editor, cx| assert_eq!(cursor, editor.pixel_position_of_cursor(cx)));
// toggles off again
cx.simulate_shared_keystrokes(["v"]).await;
@ -510,7 +510,7 @@ mod test {
b
ˇ"})
.await;
let cursor = cx.update_editor(|editor, _| editor.pixel_position_of_cursor());
let cursor = cx.update_editor(|editor, cx| editor.pixel_position_of_cursor(cx));
cx.simulate_shared_keystrokes(["shift-v"]).await;
cx.assert_shared_state(indoc! {"
a
@ -518,7 +518,7 @@ mod test {
ˇ"})
.await;
assert_eq!(cx.mode(), cx.neovim_mode().await);
cx.update_editor(|editor, _| assert_eq!(cursor, editor.pixel_position_of_cursor()));
cx.update_editor(|editor, cx| assert_eq!(cursor, editor.pixel_position_of_cursor(cx)));
cx.simulate_shared_keystrokes(["x"]).await;
cx.assert_shared_state(indoc! {"
a