debugger: Update the default layout (#31057)
- Remove the modules list and loaded sources list from the default layout - Move the console to the center pane so it's visible initially Release Notes: - Debugger Beta: changed the default layout of the debugger panel, hiding the modules list and loaded sources list by default and making the console more prominent. --------- Co-authored-by: Remco Smits <djsmits12@gmail.com>
This commit is contained in:
co-authored by
Remco Smits
parent
97e437c632
commit
71fb17c507
@@ -1,5 +1,6 @@
|
||||
use crate::{
|
||||
debugger_panel::DebugPanel,
|
||||
persistence::DebuggerPaneItem,
|
||||
tests::{active_debug_session_panel, init_test, init_test_workspace, start_debug_session},
|
||||
};
|
||||
use dap::{
|
||||
@@ -110,7 +111,8 @@ async fn test_module_list(executor: BackgroundExecutor, cx: &mut TestAppContext)
|
||||
});
|
||||
|
||||
running_state.update_in(cx, |this, window, cx| {
|
||||
this.activate_item(crate::persistence::DebuggerPaneItem::Modules, window, cx);
|
||||
this.ensure_pane_item(DebuggerPaneItem::Modules, window, cx);
|
||||
this.activate_item(DebuggerPaneItem::Modules, window, cx);
|
||||
cx.refresh_windows();
|
||||
});
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ use std::sync::{
|
||||
|
||||
use crate::{
|
||||
DebugPanel,
|
||||
persistence::DebuggerPaneItem,
|
||||
session::running::variable_list::{CollapseSelectedEntry, ExpandSelectedEntry},
|
||||
tests::{active_debug_session_panel, init_test, init_test_workspace, start_debug_session},
|
||||
};
|
||||
@@ -706,7 +707,13 @@ async fn test_keyboard_navigation(executor: BackgroundExecutor, cx: &mut TestApp
|
||||
cx.focus_self(window);
|
||||
let running = item.running_state().clone();
|
||||
|
||||
let variable_list = running.read_with(cx, |state, _| state.variable_list().clone());
|
||||
let variable_list = running.update(cx, |state, cx| {
|
||||
// have to do this because the variable list pane should be shown/active
|
||||
// for testing keyboard navigation
|
||||
state.activate_item(DebuggerPaneItem::Variables, window, cx);
|
||||
|
||||
state.variable_list().clone()
|
||||
});
|
||||
variable_list.update(cx, |_, cx| cx.focus_self(window));
|
||||
running
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user