Skip to content

Commit 6e8c6c4

Browse files
Caio Raphaelclaude
authored andcommitted
Re-enable collab and notification panels
Restore CollabPanel and NotificationPanel that were previously removed. Adds panel loading, toggle focus actions, and View menu entry. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent ffb8f70 commit 6e8c6c4

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

crates/zed/src/zed.rs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,12 @@ fn initialize_panels(
633633
let outline_panel = OutlinePanel::load(workspace_handle.clone(), cx.clone());
634634
let terminal_panel = TerminalPanel::load(workspace_handle.clone(), cx.clone());
635635
let git_panel = GitPanel::load(workspace_handle.clone(), cx.clone());
636+
let channels_panel =
637+
collab_ui::collab_panel::CollabPanel::load(workspace_handle.clone(), cx.clone());
638+
let notification_panel = collab_ui::notification_panel::NotificationPanel::load(
639+
workspace_handle.clone(),
640+
cx.clone(),
641+
);
636642
let debug_panel = DebugPanel::load(workspace_handle.clone(), cx);
637643

638644
async fn add_panel_when_ready(
@@ -656,6 +662,8 @@ fn initialize_panels(
656662
add_panel_when_ready(terminal_panel, workspace_handle.clone(), cx.clone()),
657663
add_panel_when_ready(git_panel, workspace_handle.clone(), cx.clone()),
658664
add_panel_when_ready(debug_panel, workspace_handle.clone(), cx.clone()),
665+
add_panel_when_ready(channels_panel, workspace_handle.clone(), cx.clone()),
666+
add_panel_when_ready(notification_panel, workspace_handle.clone(), cx.clone()),
659667
initialize_agent_panel(workspace_handle, prompt_builder, cx.clone()).map(|r| r.log_err()),
660668
);
661669

@@ -1019,6 +1027,25 @@ fn register_actions(
10191027
workspace.toggle_panel_focus::<TerminalPanel>(window, cx);
10201028
},
10211029
)
1030+
.register_action(
1031+
|workspace: &mut Workspace,
1032+
_: &collab_ui::collab_panel::ToggleFocus,
1033+
window: &mut Window,
1034+
cx: &mut Context<Workspace>| {
1035+
workspace.toggle_panel_focus::<collab_ui::collab_panel::CollabPanel>(window, cx);
1036+
},
1037+
)
1038+
.register_action(
1039+
|workspace: &mut Workspace,
1040+
_: &collab_ui::notification_panel::ToggleFocus,
1041+
window: &mut Window,
1042+
cx: &mut Context<Workspace>| {
1043+
workspace
1044+
.toggle_panel_focus::<collab_ui::notification_panel::NotificationPanel>(
1045+
window, cx,
1046+
);
1047+
},
1048+
)
10221049
.register_action({
10231050
let app_state = Arc::downgrade(&app_state);
10241051
move |_, _: &NewWindow, _, cx| {

crates/zed/src/zed/app_menus.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ pub fn app_menus(cx: &mut App) -> Vec<Menu> {
4242
MenuItem::action("Outline Panel", outline_panel::ToggleFocus),
4343
MenuItem::action("Terminal Panel", terminal_panel::ToggleFocus),
4444
MenuItem::action("Debugger Panel", debug_panel::ToggleFocus),
45+
MenuItem::action("Collab Panel", collab_ui::collab_panel::ToggleFocus),
4546
MenuItem::separator(),
4647
MenuItem::action("Diagnostics", diagnostics::Deploy),
4748
MenuItem::separator(),

0 commit comments

Comments
 (0)