Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
collab panel: Open selected channel notes (#41560)
Agus Zubiaga046b43f1358c
diff --git a/assets/keymaps/default-linux.json b/assets/keymaps/default-linux.jsonindex 19f9e3ca919..979e5a6ccc1 100644--- a/assets/keymaps/default-linux.json+++ b/assets/keymaps/default-linux.json@@ -1020,7 +1020,8 @@"context": "CollabPanel","bindings": {"alt-up": "collab_panel::MoveChannelUp",- "alt-down": "collab_panel::MoveChannelDown"+ "alt-down": "collab_panel::MoveChannelDown",+ "alt-enter": "collab_panel::OpenSelectedChannelNotes"}},{diff --git a/assets/keymaps/default-macos.json b/assets/keymaps/default-macos.jsonindex fc20b274c23..4f9b85ff037 100644--- a/assets/keymaps/default-macos.json+++ b/assets/keymaps/default-macos.json@@ -1085,7 +1085,8 @@"use_key_equivalents": true,"bindings": {"alt-up": "collab_panel::MoveChannelUp",- "alt-down": "collab_panel::MoveChannelDown"+ "alt-down": "collab_panel::MoveChannelDown",+ "alt-enter": "collab_panel::OpenSelectedChannelNotes"}},{diff --git a/assets/keymaps/default-windows.json b/assets/keymaps/default-windows.jsonindex 944870d0376..29146f3080d 100644--- a/assets/keymaps/default-windows.json+++ b/assets/keymaps/default-windows.json@@ -1038,7 +1038,8 @@"use_key_equivalents": true,"bindings": {"alt-up": "collab_panel::MoveChannelUp",- "alt-down": "collab_panel::MoveChannelDown"+ "alt-down": "collab_panel::MoveChannelDown",+ "alt-enter": "collab_panel::OpenSelectedChannelNotes"}},{diff --git a/crates/collab_ui/src/collab_panel.rs b/crates/collab_ui/src/collab_panel.rsindex 57d510d94c1..29eff951d97 100644--- a/crates/collab_ui/src/collab_panel.rs+++ b/crates/collab_ui/src/collab_panel.rs@@ -54,6 +54,10 @@ actions!(CollapseSelectedChannel,/// Expands the selected channel in the tree view.ExpandSelectedChannel,+ /// Opens the meeting notes for the selected channel in the panel.+ ///+ /// Use `collab::OpenChannelNotes` to open the channel notes for the current call.+ OpenSelectedChannelNotes,/// Starts moving a channel to a new location.StartMoveChannel,/// Moves the selected item to the current location.@@ -1856,6 +1860,17 @@ impl CollabPanel {}}+ fn open_selected_channel_notes(+ &mut self,+ _: &OpenSelectedChannelNotes,+ window: &mut Window,+ cx: &mut Context<Self>,+ ) {+ if let Some(channel) = self.selected_channel() {+ self.open_channel_notes(channel.id, window, cx);+ }+ }+fn set_channel_visibility(&mut self,channel_id: ChannelId,@@ -2976,6 +2991,7 @@ impl Render for CollabPanel {.on_action(cx.listener(CollabPanel::remove_selected_channel)).on_action(cx.listener(CollabPanel::show_inline_context_menu)).on_action(cx.listener(CollabPanel::rename_selected_channel))+ .on_action(cx.listener(CollabPanel::open_selected_channel_notes)).on_action(cx.listener(CollabPanel::collapse_selected_channel)).on_action(cx.listener(CollabPanel::expand_selected_channel)).on_action(cx.listener(CollabPanel::start_move_selected_channel))diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rsindex a548a04aa7b..b1de240eb62 100644--- a/crates/workspace/src/workspace.rs+++ b/crates/workspace/src/workspace.rs@@ -7089,6 +7089,9 @@ actions!([/// Opens the channel notes for the current call.///+ /// Use `collab_panel::OpenSelectedChannelNotes` to open the channel notes for the selected+ /// channel in the collab panel.+ ////// If you want to open a specific channel, use `zed::OpenZedUrl` with a channel notes URL -/// can be copied via "Copy link to section" in the context menu of the channel notes/// buffer. These URLs look like `https://zed.dev/channel/channel-name-CHANNEL_ID/notes`.