Visual Studio Code, rebuilt in Rust
Rust
fix(workbench): draw scrollbars on side views and editor pages
rokarturfc3008c287a0
diff --git a/native/crates/app/src/multi_diff_editor.rs b/native/crates/app/src/multi_diff_editor.rsindex 0011b1bf11b..514670532f3 100644--- a/native/crates/app/src/multi_diff_editor.rs+++ b/native/crates/app/src/multi_diff_editor.rs@@ -35,6 +35,8 @@ pub struct MultiDiffInput {pub scroll_top: f32,/// The list's height as last laid out.pub view_height: Rc<Cell<f32>>,+ /// The list's bounds as last laid out, for its scrollbar.+ pub view_bounds: Rc<Cell<gpui::Bounds<gpui::Pixels>>>,/// The editor's width, diffs and file list, as last laid out.pub body_width: Rc<Cell<f32>>,/// The source's context keys for every file's toolbar (`IResolvedMultiDiffSource.contextKeys`).@@ -117,7 +119,7 @@ impl Row {impl MultiDiffInput {pub fn new(source: Option<Side>, label: Option<String>, files: Vec<FileDiff>) -> Self {- MultiDiffInput { source, label, files, scroll_top: 0., view_height: Rc::default(), body_width: Rc::default(), context_keys: Vec::new(), cursor: None, hovered_header: None, original_focused: false, file_list_focus: None, collapsed_folders: HashSet::new(), unchanged_drag: None }+ MultiDiffInput { source, label, files, scroll_top: 0., view_height: Rc::default(), view_bounds: Rc::default(), body_width: Rc::default(), context_keys: Vec::new(), cursor: None, hovered_header: None, original_focused: false, file_list_focus: None, collapsed_folders: HashSet::new(), unchanged_drag: None }}/// `MultiDiffEditorInput` name: the label, else "Multi Diff Editor", with the file count.diff --git a/native/crates/app/src/workbench/debug_view.rs b/native/crates/app/src/workbench/debug_view.rsindex a68e70c4d9d..eb9c9fba79f 100644--- a/native/crates/app/src/workbench/debug_view.rs+++ b/native/crates/app/src/workbench/debug_view.rs@@ -403,7 +403,7 @@ impl Workbench {bar.into_any_element()});// The tree takes the focus in the capture phase, before a row's menu records it as the focus to return to.- let body = div().id(id).flex_1().min_h_0().overflow_y_scroll().when_some(list_focus.cloned(), |body, focus| {+ let body = div().id(id).when_some(list_focus.cloned(), |body, focus| {body.track_focus(&focus).capture_any_mouse_down(move |_, window, cx| window.focus(&focus, cx))});let depths = rows.iter().map(|(_, depth, _)| *depth).collect();@@ -412,7 +412,7 @@ impl Workbench {let guides = self.tree_guides_in_group(group.clone(), depths, &active);let inset = self.pane_row_inset();let rows = rows.into_iter().enumerate().map(|(index, (row, _, _))| div().relative().child(row).children(guides.row(index, inset)));- let body = body.group(group).children(rows).into_any_element();+ let body = self.scrollable(id, None, body.group(group).children(rows), cx).flex_1().into_any_element();super::view_panes::ViewPane { id, title: title.into(), description: None, actions: bar, draws_more: false, show_actions: false, body }}diff --git a/native/crates/app/src/workbench/editor_view/multi_diff_editor_view.rs b/native/crates/app/src/workbench/editor_view/multi_diff_editor_view.rsindex fadeec08359..a25524ad7de 100644--- a/native/crates/app/src/workbench/editor_view/multi_diff_editor_view.rs+++ b/native/crates/app/src/workbench/editor_view/multi_diff_editor_view.rs@@ -9,7 +9,7 @@use std::collections::HashMap;use std::path::{Path, PathBuf};-use gpui::{AnyElement, Context, Div, FontWeight, ScrollWheelEvent, Stateful, StyledText, Window, canvas, div, prelude::*, px};+use gpui::{AnyElement, Context, Div, FontWeight, Stateful, StyledText, Window, canvas, div, prelude::*, px};use serde_json::{Value, json};use super::diff_editor_view::{char_ranges, diagonal_fill};@@ -26,6 +26,7 @@ use crate::workbench::comment_thread_floating_layout::Span;use crate::menus::{Entry, MenuId};use crate::multi_diff_editor::{CONTENT_BOTTOM_PADDING, EMPTY_MODEL, FileDiff, FileListRow, HEADER_HEIGHT, MULTI_DIFF_EDITOR_SCHEME, MultiDiffInput, Row, sticky_header_top};use crate::workbench::hover::{HoverContent, HoverOptions};+use crate::workbench::list_scroll::{ListId, ListScroller};use crate::workbench::host_requests::uri_parts;use crate::workbench::scm_tree::{TreeRow, tree_rows};use crate::workbench::scm_view::{INDENT, TWISTIE};@@ -680,6 +681,17 @@ impl Workbench {self.active_multi_diff_mut().expect("found above").scroll_top = target.clamp(0., max);}+ /// compressedVirtualizedScrollView.ts `_scrollableElement` of the multi diff editor of model `model`: the files'+ /// heights are its scroll height.+ pub(in crate::workbench) fn multi_diff_list_scroller(&self, model: u32) -> ListScroller {+ let input = &self.editors.multi_diffs[&model];+ let side_by_side = self.diff_side_by_side();+ let line_height = self.multi_diff_line_height();+ let height: f32 = input.files.iter().map(|file| self.multi_diff_file_height(file, side_by_side, line_height)).sum();+ let bounds = input.view_bounds.get();+ ListScroller::Placed { bounds, top: input.scroll_top, max: height - f32::from(bounds.size.height) }+ }+/// actions.ts `GoToFileAction`: opens the file's `goToFileUri`, else the resource the header passed.fn go_to_multi_diff_file(&mut self, args: Vec<Value>, window: &mut Window, cx: &mut Context<Self>) -> Outcome {let Some(uri) = args.into_iter().next() else { return Outcome::done() };@@ -1040,19 +1052,16 @@ impl Workbench {}}))});- div()+ let list = div().id("multi-diff-file-list").debug_selector(|| "multi-diff-file-list".into()).track_focus(&self.multi_diff_file_list_focus)- .w(px(width))- .flex_none()- .h_full()- .overflow_y_scroll().font_family(".SystemUIFont").text_size(px(13.)).text_color(foreground).bg(self.color("multiDiffEditor.background"))- .children(rows)+ .children(rows);+ self.scrollable("multi-diff-file-list", None, list, cx).w(px(width)).flex_none().h_full()}/// The file list's rows and the index of the focused one: the row the keys moved to, else the active file's.@@ -1140,11 +1149,12 @@ impl Workbench {fn multi_diff_list(&self, window: &mut Window, cx: &mut Context<Self>) -> gpui::Stateful<Div> {let id = self.editors.active_tab().expect("drawn for the active tab").model_id;let input = &self.editors.multi_diffs[&id];- let (part_width, view_height) = (self.editors.diff_part_width.clone(), input.view_height.clone());+ let (part_width, view_height, view_bounds) = (self.editors.diff_part_width.clone(), input.view_height.clone(), input.view_bounds.clone());let measure = canvas(move |bounds, _, _| {part_width.set(f32::from(bounds.size.width));view_height.set(f32::from(bounds.size.height));+ view_bounds.set(bounds);},|_, _, _, _| {},)@@ -1204,7 +1214,6 @@ impl Workbench {}file_top += file_height;}- let total_height = file_top;let floating: Vec<Div> = self.multi_diff_floating_hosts(window).into_iter().filter(|side| visible(side.top, side.top + side.host.viewport.height)).map(|side| {let widgets = self.floating_comment_widgets(&side.host, side.content_left, window, cx);div().absolute().top(px(side.top - scroll_top)).left(px(side.left)).w(px(side.content_left + side.host.viewport.width)).h(px(side.host.viewport.height)).children(widgets)@@ -1225,21 +1234,13 @@ impl Workbench {.font_family(EDITOR_FONT).child(measure).children(editors)- .on_scroll_wheel(cx.listener(move |workbench, event: &ScrollWheelEvent, _, cx| {- let line_height = workbench.multi_diff_line_height();- let Some(input) = workbench.editors.multi_diffs.get_mut(&id) else { return };- let delta = f32::from(event.delta.pixel_delta(px(line_height)).y);- let max = (total_height - input.view_height.get()).max(0.);- input.scroll_top = (input.scroll_top - delta).clamp(0., max);- cx.stop_propagation();- cx.notify();- })).children(rows).children(placeholders).children(gutters).children(floating).children(headers).children(lines)+ .child(self.list_scroll_layer(ListId::MultiDiff(id), cx)).children(content_menu)}diff --git a/native/crates/app/src/workbench/extension_editor.rs b/native/crates/app/src/workbench/extension_editor.rsindex 7e1a19af897..0fbe2544102 100644--- a/native/crates/app/src/workbench/extension_editor.rs+++ b/native/crates/app/src/workbench/extension_editor.rs@@ -248,7 +248,7 @@ impl Workbench {tabs.push((Tab::Changelog, "Changelog"));}let content = match editor.tab {- Tab::Details => self.extension_details(editor, &extension),+ Tab::Details => self.extension_details(editor, &extension, cx),Tab::Changelog => self.extension_markdown_area(editor.webview.as_ref().map(|(_, webview)| webview), &editor.changelog, "No Changelog available."),Tab::Features => self.extension_features(editor, &extension, manifest.as_ref(), cx),};@@ -386,14 +386,14 @@ impl Workbench {}/// Details: the README (75% at most, centered) and the 25% side panel.- fn extension_details(&self, editor: &ExtensionEditor, extension: &Extension) -> Div {+ fn extension_details(&self, editor: &ExtensionEditor, extension: &Extension, cx: &mut Context<Self>) -> Div {let webview = editor.webview.as_ref().filter(|(tab, _)| *tab == Tab::Details).map(|(_, webview)| webview);div().flex_1().min_w_0().flex().child(div().flex_1().min_w_0().max_w(gpui::relative(0.75)).mx_auto().h_full().flex().child(self.extension_markdown_area(webview, &editor.readme, "No README available.")))- .child(div().w(gpui::relative(0.25)).min_w(px(175.)).h_full().child(self.additional_details(extension)))+ .child(div().w(gpui::relative(0.25)).min_w(px(175.)).h_full().child(self.additional_details(extension, cx)))}/// A markdown tab: the webview placed over an empty box, or the no-content text.@@ -416,7 +416,7 @@ impl Workbench {}/// `AdditionalDetailsWidget`: Installation, Marketplace, Categories and Resources.- fn additional_details(&self, extension: &Extension) -> Div {+ fn additional_details(&self, extension: &Extension, cx: &mut Context<Self>) -> Div {let mut sections: Vec<Div> = Vec::new();let rows = |title: &str, entries: Vec<(&str, String, bool)>| {let mut info = div().flex().flex_col();@@ -498,11 +498,12 @@ impl Workbench {sections.push(div().child(div().text_size(px(15.6)).pb(px(12.)).child("Resources")).child(list));}let count = sections.len();- let mut content = div().id("additional-details").overflow_y_scroll().h_full().p(px(12.)).flex().flex_col();+ let mut content = div().id("additional-details").p(px(12.)).flex().flex_col();for (index, section) in sections.into_iter().enumerate() {content = content.child(section.when(index > 0, |section| section.pt(px(16.))).pb(px(16.)).when(index + 1 < count, |section| section.border_b_1().border_color(gpui::rgba(0x80808038))));}- div().h_full().child(content)+ // extensionEditor.ts `renderAdditionalDetails`: a DomScrollableElement with the default options.+ div().h_full().flex().flex_col().child(self.dom_scrollable("additional-details", None, content, cx).flex_1())}/// Features (extensionFeaturesTab.ts): the contributed features on the left, the selected one's table or markdown on the right.@@ -549,7 +550,9 @@ impl Workbench {FeatureData::Markdown(markdown) => self.feature_markdown("feature-markdown", &markdown, cx),},};- let detail = div().id("feature-detail").flex_1().overflow_y_scroll().p(px(12.)).flex().flex_col().child(div().text_size(px(15.6)).pb(px(12.)).child(label.to_owned())).child(content);+ let detail = div().id("feature-detail").p(px(12.)).flex().flex_col().child(div().text_size(px(15.6)).pb(px(12.)).child(label.to_owned())).child(content);+ // extensionFeaturesTab.ts `ExtensionFeatureView`: the body in a DomScrollableElement with the default options.+ let detail = self.dom_scrollable("feature-detail", None, detail, cx).flex_1();div().flex_1().min_w_0().flex().child(list).child(detail)}diff --git a/native/crates/app/src/workbench/extensions_list_view.rs b/native/crates/app/src/workbench/extensions_list_view.rsindex 7411f15c2a6..a592ce848a6 100644--- a/native/crates/app/src/workbench/extensions_list_view.rs+++ b/native/crates/app/src/workbench/extensions_list_view.rs@@ -225,7 +225,8 @@ impl Workbench {).track_scroll(&pane.scroll).size_full();- div().flex_1().min_h_0().child(list).into_any_element()+ let handle = pane.scroll.0.borrow().base_handle.clone();+ div().relative().flex_1().min_h_0().child(list).child(self.scrollable_layer(pane.descriptor.id, &handle, cx)).into_any_element()}/// extensionsList.ts `Renderer`: the row of one extension.diff --git a/native/crates/app/src/workbench/list_scroll.rs b/native/crates/app/src/workbench/list_scroll.rsindex ebfce845ec1..16f47966c34 100644--- a/native/crates/app/src/workbench/list_scroll.rs+++ b/native/crates/app/src/workbench/list_scroll.rs@@ -54,10 +54,14 @@ pub enum ListId {ParameterHints,/// Any other list, tree or widget in a ScrollableElement, by its element id (`Workbench::scrollable`).Scrollable(&'static str),+ /// A page in a DomScrollableElement, by its element id (`Workbench::dom_scrollable`).+ Page(&'static str),+ /// The files of the multi diff editor of this model id (compressedVirtualizedScrollView.ts `_scrollableElement`).+ MultiDiff(u32),}-/// The GPUI state a list scrolls with: a scrolled div or uniform list, a `list` of measured rows, or a notebook-/// list's scroll top and its maximum as they are now.+/// The GPUI state a list scrolls with: a scrolled div or uniform list, a `list` of measured rows, or the scroll top+/// and its maximum, as they are now, of a list that places its rows itself (a notebook, a multi diff editor).#[derive(Clone)]pub enum ListScroller {Div(ScrollHandle),@@ -65,7 +69,7 @@ pub enum ListScroller {/// A tab bar's scrolled tabs, after `sticky_width` of sticky tabs that stay in place: the bar scrolls as one/// element, as multiEditorTabsControl.ts's tabs container does with its sticky tabs inside.Tabs { handle: ScrollHandle, sticky_width: f32 },- Notebook { bounds: Bounds<Pixels>, top: f32, max: f32 },+ Placed { bounds: Bounds<Pixels>, top: f32, max: f32 },}impl ListScroller {@@ -77,7 +81,7 @@ impl ListScroller {Bounds::new(bounds.origin - point(px(*sticky_width), px(0.)), size(bounds.size.width + px(*sticky_width), bounds.size.height))}ListScroller::List(state) => state.viewport_bounds(),- ListScroller::Notebook { bounds, .. } => *bounds,+ ListScroller::Placed { bounds, .. } => *bounds,}}@@ -86,7 +90,7 @@ impl ListScroller {let offset = match self {ListScroller::Div(handle) | ListScroller::Tabs { handle, .. } => handle.offset(),ListScroller::List(state) => state.scroll_px_offset_for_scrollbar(),- ListScroller::Notebook { top, .. } => return point(0., *top),+ ListScroller::Placed { top, .. } => return point(0., *top),};point(-f32::from(offset.x), -f32::from(offset.y))}@@ -95,7 +99,7 @@ impl ListScroller {let max = match self {ListScroller::Div(handle) | ListScroller::Tabs { handle, .. } => handle.max_offset(),ListScroller::List(state) => state.max_offset_for_scrollbar(),- ListScroller::Notebook { max, .. } => return point(0., max.max(0.)),+ ListScroller::Placed { max, .. } => return point(0., max.max(0.)),};point(f32::from(max.x).max(0.), f32::from(max.y).max(0.))}@@ -152,7 +156,8 @@ impl Workbench {ListId::CommentThread { controller, thread } => ListScroller::Div(self.floating_comments_scroll(controller, thread)),ListId::MarkerMessage => ListScroller::Div(self.marker_navigation.scroll.clone()),ListId::ParameterHints => ListScroller::Div(self.parameter_hints.body_scroll.clone()),- ListId::Scrollable(id) => ListScroller::Div(self.scrollable_handle(id)),+ ListId::Scrollable(id) | ListId::Page(id) => ListScroller::Div(self.scrollable_handle(id)),+ ListId::MultiDiff(model) => self.multi_diff_list_scroller(model),}}@@ -160,6 +165,23 @@ impl Workbench {/// wheel, fading scrollbars and top shadow over it. The returned box takes `content`'s place in its parent; a view/// that reveals rows itself passes its own `handle`.pub(super) fn scrollable(&self, id: &'static str, handle: Option<&ScrollHandle>, content: gpui::Stateful<gpui::Div>, cx: &mut Context<Self>) -> gpui::Stateful<gpui::Div> {+ self.scroll_box(id, ListId::Scrollable(id), handle, content, cx)+ }++ /// A page's `DomScrollableElement` around `content`: as `scrollable`, with the element's default wheel and only the+ /// vertical scrollbar.+ pub(super) fn dom_scrollable(&self, id: &'static str, handle: Option<&ScrollHandle>, content: gpui::Stateful<gpui::Div>, cx: &mut Context<Self>) -> gpui::Stateful<gpui::Div> {+ self.scroll_box(id, ListId::Page(id), handle, content, cx)+ }++ /// The scroll layer of a list that scrolls itself in `handle`, as a uniform list does in its base handle; its+ /// relative parent lays it over the list.+ pub(super) fn scrollable_layer(&self, id: &'static str, handle: &ScrollHandle, cx: &mut Context<Self>) -> impl IntoElement + use<> {+ self.list_scrolls.handles.borrow_mut().insert(id, handle.clone());+ self.list_scroll_layer(ListId::Scrollable(id), cx)+ }++ fn scroll_box(&self, id: &'static str, list: ListId, handle: Option<&ScrollHandle>, content: gpui::Stateful<gpui::Div>, cx: &mut Context<Self>) -> gpui::Stateful<gpui::Div> {let handle = match handle {Some(handle) => {self.list_scrolls.handles.borrow_mut().insert(id, handle.clone());@@ -175,7 +197,7 @@ impl Workbench {.flex().flex_col().child(content.flex_1().min_h_0().min_w_0().overflow_y_scroll().track_scroll(&handle))- .child(self.list_scroll_layer(ListId::Scrollable(id), cx))+ .child(self.list_scroll_layer(list, cx))}fn scrollable_handle(&self, id: &'static str) -> ScrollHandle {@@ -193,8 +215,9 @@ impl Workbench {match (scroller, list) {(ListScroller::Div(handle) | ListScroller::Tabs { handle, .. }, _) => handle.set_offset(point(px(-position.x), px(-position.y))),(ListScroller::List(state), _) => state.set_offset_from_scrollbar(point(px(0.), px(-position.y))),- (ListScroller::Notebook { .. }, ListId::Notebook(tab)) => self.set_notebook_scroll_top(tab, position.y),- (ListScroller::Notebook { .. }, _) => unreachable!("only notebook lists scroll a notebook"),+ (ListScroller::Placed { .. }, ListId::Notebook(tab)) => self.set_notebook_scroll_top(tab, position.y),+ (ListScroller::Placed { .. }, ListId::MultiDiff(model)) => self.editors.multi_diffs.get_mut(&model).expect("scrolled while open").scroll_top = position.y,+ (ListScroller::Placed { .. }, _) => unreachable!("only notebooks and multi diff editors place their rows"),}true}@@ -223,7 +246,10 @@ impl Workbench {pub(super) fn horizontal_scrolling(&self, list: ListId) -> bool {// keybindingsEditor.ts creates its table with `horizontalScrolling: false`.match list {- ListId::KeybindingsTable | ListId::SettingsTree | ListId::CommentThread { .. } | ListId::ParameterHints => false,+ // The pages and the multi diff list lay their content out to their width and scroll it only down.+ ListId::KeybindingsTable | ListId::SettingsTree | ListId::CommentThread { .. } | ListId::ParameterHints | ListId::Page(_) | ListId::MultiDiff(_) => false,+ // multiDiffEditorFileList.ts creates its tree with `horizontalScrolling: false`.+ ListId::Scrollable("multi-diff-file-list") => false,ListId::EditorTabs { .. } | ListId::MarkerMessage => true,_ => self.setting("workbench.list.horizontalScrolling") == json!(true),}@@ -235,8 +261,8 @@ impl Workbench {// multiEditorTabsControl.ts `createTabsScrollbar`: `vertical: Hidden`, `getTabsScrollbarSizing` 3 or 10.ListId::EditorTabs { .. } => (0., if self.setting("workbench.editor.titleScrollbarSizing") == json!("large") { 10. } else { 3. }),ListId::MarkerMessage => (6., 6.),- // The DomScrollableElement's default, modernUI.contribution.ts `MODERN_UI_SCROLLBAR_SIZE`.- ListId::ParameterHints => (8., 0.),+ // scrollableElement.ts global default, set by modernUI.contribution.ts `MODERN_UI_SCROLLBAR_SIZE`.+ ListId::ParameterHints | ListId::Page(_) | ListId::MultiDiff(_) => (8., 0.),_ => (SCROLLBAR_SIZE, if self.horizontal_scrolling(list) { SCROLLBAR_SIZE } else { 0. }),}}@@ -299,9 +325,10 @@ impl Workbench {return;}let tabs = matches!(list, ListId::EditorTabs { .. });- let editor_widget = matches!(list, ListId::MarkerMessage | ListId::ParameterHints);+ let editor_widget = matches!(list, ListId::MarkerMessage | ListId::ParameterHints | ListId::Page(_) | ListId::MultiDiff(_));let number = |key: &str, default: f64| self.setting(key).as_f64().unwrap_or(default) as f32;- // The tabs' and editor widgets' ScrollableElements keep their default sensitivities and scroll without animation.+ // The ScrollableElements of the tabs, editor widgets, pages and multi diff list keep their default sensitivities+ // and scroll without animation.let (sensitivity, fast) = match tabs || editor_widget {true => (1., 5.),false => (number("workbench.list.mouseWheelScrollSensitivity", 1.), number("workbench.list.fastScrollSensitivity", 5.)),@@ -423,8 +450,8 @@ impl Workbench {let horizontal_bar = horizontal.then(|| Scrollbar::new(vertical_size, width, width + max.x, position.x));let tabs = matches!(list, ListId::EditorTabs { .. });let scroll_by_page = !tabs && self.setting("workbench.list.scrollByPage") == json!(true);- // gotoErrorWidget.ts creates its ScrollableElement with `useShadows: false`.- let shadow = (position.y > 0. && list != ListId::MarkerMessage).then(|| self.scroll_shadow());+ // gotoErrorWidget.ts and compressedVirtualizedScrollView.ts create theirs with `useShadows: false`.+ let shadow = (position.y > 0. && !matches!(list, ListId::MarkerMessage | ListId::MultiDiff(_))).then(|| self.scroll_shadow());let now = Instant::now();let (mut opacity, mut shown, animating, drag) = match self.list_scrolls.lists.get(&list) {Some(scroll) => (scroll.bars.opacity(now), scroll.bars.shown, scroll.bars.in_transition(now), scroll.drag),@@ -494,9 +521,10 @@ impl Workbench {window.on_mouse_event(move |event: &ScrollWheelEvent, phase, window, cx| {// Not `is_hovered`: it is false after a key press until the pointer moves, and a wheel does not move it.if phase == DispatchPhase::Capture && wheel_hitbox.should_handle_scroll(window) {- // ScrollableElement without `consumeMouseWheelIfScrollbarIsNeeded`: a wheel the comments or the- // marker message cannot take goes on to the widget, which scrolls the editor.- if matches!(list, ListId::CommentThread { .. } | ListId::MarkerMessage) && !workbench_wheel.read(cx).list_takes_wheel(list, event) {+ // ScrollableElement without `consumeMouseWheelIfScrollbarIsNeeded`: a wheel these cannot take goes+ // on to what is under the pointer: the widget of the comments or the marker message, which+ // scrolls the editor, or a code editor in a page or in the multi diff list (a sideways wheel).+ if matches!(list, ListId::CommentThread { .. } | ListId::MarkerMessage | ListId::Page(_) | ListId::MultiDiff(_)) && !workbench_wheel.read(cx).list_takes_wheel(list, event) {return;}cx.stop_propagation();diff --git a/native/crates/app/src/workbench/list_scroll/tests.rs b/native/crates/app/src/workbench/list_scroll/tests.rsindex 26fae968e55..c5f3c227c4c 100644--- a/native/crates/app/src/workbench/list_scroll/tests.rs+++ b/native/crates/app/src/workbench/list_scroll/tests.rs@@ -205,3 +205,22 @@ fn the_panels_draw_their_bodies_in_a_scrollable(cx: &mut TestAppContext) {}std::fs::remove_dir_all(dir).unwrap();}++/// The side views and editor pages whose upstream bodies sit in a ScrollableElement or a DomScrollableElement draw+/// them through `Workbench::scrollable` or `Workbench::dom_scrollable`.+#[gpui::test]+fn the_views_and_pages_draw_their_bodies_in_a_scrollable(cx: &mut TestAppContext) {+ let (dir, workbench, cx) = explorer("views", cx);+ let views = [+ ("workbench.files.action.focusOpenEditorsView", "open-editors"),+ ("workbench.view.extensions", "workbench.views.extensions.popular"),+ ("workbench.trust.manage", "workspace-trust-editor-body"),+ ("workbench.action.openProcessExplorer", "process-explorer"),+ ];+ for (command, id) in views {+ run(&workbench, command, cx);+ let drawn: Vec<_> = workbench.read_with(cx, |workbench, _| workbench.list_scrolls.handles.borrow().keys().copied().collect());+ assert!(drawn.contains(&id), "{command} draws {id} in a scrollable: {drawn:?}");+ }+ std::fs::remove_dir_all(dir).unwrap();+}diff --git a/native/crates/app/src/workbench/notebook_editor.rs b/native/crates/app/src/workbench/notebook_editor.rsindex 3fe823e37ee..0cfe756f184 100644--- a/native/crates/app/src/workbench/notebook_editor.rs+++ b/native/crates/app/src/workbench/notebook_editor.rs@@ -999,7 +999,7 @@ impl Workbench {let view = self.notebook_views.views.get(&tab);let bounds = view.map(|view| view.bounds.get()).unwrap_or_default();let top = view.map_or(0., |view| view.scroll_top);- ListScroller::Notebook { bounds, top, max: self.notebook_scroll_height(tab) - f32::from(bounds.size.height) }+ ListScroller::Placed { bounds, top, max: self.notebook_scroll_height(tab) - f32::from(bounds.size.height) }}pub(super) fn set_notebook_scroll_top(&mut self, tab: u32, top: f32) {diff --git a/native/crates/app/src/workbench/notebook_variables.rs b/native/crates/app/src/workbench/notebook_variables.rsindex 4ca76f6dc39..297a5004743 100644--- a/native/crates/app/src/workbench/notebook_variables.rs+++ b/native/crates/app/src/workbench/notebook_variables.rs@@ -282,8 +282,8 @@ impl Workbench {let list_focused = focus.is_focused(window) || menu_return == Some(&focus);let mut rows = Vec::new();self.notebook_variable_rows(ROOT, 0, list_focused, &mut rows, cx);- let body = div().id(NOTEBOOK_VARIABLES_VIEW).flex_1().min_h_0().overflow_y_scroll().track_focus(&focus).capture_any_mouse_down(move |_, window, cx| window.focus(&focus, cx));- super::view_panes::ViewPane { id: NOTEBOOK_VARIABLES_VIEW, title: title.into(), description: None, actions: None, draws_more: false, show_actions: false, body: body.children(rows).into_any_element() }+ let body = div().id(NOTEBOOK_VARIABLES_VIEW).track_focus(&focus).capture_any_mouse_down(move |_, window, cx| window.focus(&focus, cx));+ super::view_panes::ViewPane { id: NOTEBOOK_VARIABLES_VIEW, title: title.into(), description: None, actions: None, draws_more: false, show_actions: false, body: self.scrollable(NOTEBOOK_VARIABLES_VIEW, None, body.children(rows), cx).flex_1().into_any_element() }}/// notebookVariablesTree.ts `NotebookVariableRenderer`: `name:` with the type as its title, then the value in thediff --git a/native/crates/app/src/workbench/open_editors_view.rs b/native/crates/app/src/workbench/open_editors_view.rsindex e7841fe3ddb..65061dce15c 100644--- a/native/crates/app/src/workbench/open_editors_view.rs+++ b/native/crates/app/src/workbench/open_editors_view.rs@@ -95,10 +95,6 @@ impl Workbench {let mut body = div().id("open-editors").track_focus(&self.open_editors_focus)- .track_scroll(&self.open_editors_scroll)- .overflow_y_scroll()- .flex_1()- .min_h_0().flex().flex_col();for (position, row) in rows.into_iter().enumerate() {@@ -115,7 +111,7 @@ impl Workbench {actions: Some(self.open_editors_title_actions(window, cx).into_any_element()),draws_more: false,show_actions: focused,- body: body.into_any_element(),+ body: self.scrollable("open-editors", Some(&self.open_editors_scroll), body, cx).flex_1().into_any_element(),}}diff --git a/native/crates/app/src/workbench/process_explorer.rs b/native/crates/app/src/workbench/process_explorer.rsindex d496ce8096f..3276b0ad19b 100644--- a/native/crates/app/src/workbench/process_explorer.rs+++ b/native/crates/app/src/workbench/process_explorer.rs@@ -730,39 +730,32 @@ impl ProcessExplorer {impl Render for ProcessExplorer {fn render(&mut self, window: &mut Window, cx: &mut Context<Self>) -> impl IntoElement {- let Some(workbench) = self.workbench.upgrade() else { return div() };- let workbench = workbench.read(cx);+ let Some(workbench_entity) = self.workbench.upgrade() else { return div() };+ let workbench = workbench_entity.read(cx);let rows = self.rows();let tree_focused = self.focus.is_focused(window);let mut active = self.selection.clone();active.extend(self.focused);let active_guides = active_guide_nodes(&rows, &active);let elements: Vec<AnyElement> = rows.iter().enumerate().map(|(index, row)| self.render_row(index, row, workbench, tree_focused, &active_guides, cx)).collect();- div()- .size_full()- .relative()- .bg(workbench.color("editor.background"))- .text_color(workbench.color("foreground"))- .text_size(px(13.))- .child(- div()- .id("process-explorer")- .role(Role::Tree)- .aria_label("Process Explorer")- .track_focus(&self.focus)- .on_key_down(cx.listener(|explorer, event: &KeyDownEvent, window, cx| explorer.tree_key_down(event, window, cx)))- .on_hover(cx.listener(|explorer, hovered: &bool, _, cx| {- explorer.tree_hovered = *hovered;- cx.notify();- }))- .size_full()- .overflow_y_scroll()- .track_scroll(&self.scroll)- .flex()- .flex_col()- .children(elements),- )- .children(self.render_menu(workbench, cx))+ let (background, foreground) = (workbench.color("editor.background"), workbench.color("foreground"));+ let menu = self.render_menu(workbench, cx);+ let tree = div()+ .id("process-explorer")+ .role(Role::Tree)+ .aria_label("Process Explorer")+ .track_focus(&self.focus)+ .on_key_down(cx.listener(|explorer, event: &KeyDownEvent, window, cx| explorer.tree_key_down(event, window, cx)))+ .on_hover(cx.listener(|explorer, hovered: &bool, _, cx| {+ explorer.tree_hovered = *hovered;+ cx.notify();+ }))+ .flex()+ .flex_col()+ .children(elements);+ // processExplorerControl.ts: a WorkbenchDataTree, which scrolls in a list's ScrollableElement.+ let tree = workbench_entity.update(cx, |workbench, cx| workbench.scrollable("process-explorer", Some(&self.scroll), tree, cx));+ div().size_full().relative().bg(background).text_color(foreground).text_size(px(13.)).child(tree.size_full()).children(menu)}}diff --git a/native/crates/app/src/workbench/profiles_editor_view.rs b/native/crates/app/src/workbench/profiles_editor_view.rsindex 8f064aa3003..ba7e6f10815 100644--- a/native/crates/app/src/workbench/profiles_editor_view.rs+++ b/native/crates/app/src/workbench/profiles_editor_view.rs@@ -900,8 +900,9 @@ impl Workbench {let folders = self.profile_row_container("Folders & Workspaces", div().flex().flex_col().child(div().line_height(px(18.)).opacity(0.9).child(description)).child(table).child(div().mt(px(8.)).flex().child(add_folder)));let name = (!profile.is_default).then(|| self.profile_row_container("Name", self.profile_name_input(window, cx)));let icon = (!profile.is_default).then(|| self.profile_row_container("Icon", self.profile_icon_row(profile.icon.as_deref(), IconTarget::Profile(profile.id.clone()), self.user_data_profiles.editor.icon_bounds.clone(), cx)));- let body = div().id("profile-body").flex_1().min_h_0().overflow_y_scroll().child(div().mt(px(15.)).ml(px(28.)).children(name).children(icon).children(use_for_current).child(use_for_new).child(contents).child(folders));- div().size_full().flex().flex_col().child(title).child(body)+ let body = div().id("profile-body").child(div().mt(px(15.)).ml(px(28.)).children(name).children(icon).children(use_for_current).child(use_for_new).child(contents).child(folders));+ // userDataProfilesEditor.ts: the `.profile-body` rows are a WorkbenchAsyncDataTree, which scrolls in a list's ScrollableElement.+ div().size_full().flex().flex_col().child(title).child(self.scrollable("profile-body", None, body, cx).flex_1())}fn new_profile_contents(&self, profiles: &[Profile], window: &Window, cx: &mut Context<Self>) -> impl IntoElement + use<> {@@ -962,9 +963,6 @@ impl Workbench {let icon = self.profile_icon_row(new_profile.icon.as_deref(), IconTarget::NewProfile, editor.icon_bounds.clone(), cx);let body = div().id("new-profile-body")- .flex_1()- .min_h_0()- .overflow_y_scroll().child(div().mt(px(15.))@@ -981,7 +979,7 @@ impl Workbench {.flex().flex_col().child(div().ml(px(27.)).h(px(40.)).flex_none().flex().items_center().text_size(px(26.)).font_weight(FontWeight::SEMIBOLD).child(editor.name.value.clone()))- .child(body)+ .child(self.scrollable("new-profile-body", None, body, cx).flex_1()).child(buttons)}diff --git a/native/crates/app/src/workbench/refactor_preview.rs b/native/crates/app/src/workbench/refactor_preview.rsindex 959968b4c02..c21cd77637c 100644--- a/native/crates/app/src/workbench/refactor_preview.rs+++ b/native/crates/app/src/workbench/refactor_preview.rs@@ -238,7 +238,7 @@ impl Workbench {.on_click(cx.listener(move |workbench, _: &ClickEvent, window, cx| drop(workbench.execute_command(command, Vec::new(), window, cx))))};let buttons = div().flex_none().h(px(50.)).pl(px(20.)).pt(px(10.)).flex().items_start().child(button("refactor-preview-apply", "Apply", true, "refactorPreview.apply")).child(button("refactor-preview-discard", "Discard", false, "refactorPreview.discard"));- div().flex_1().min_h_0().flex().flex_col().child(div().id("refactor-preview-tree").flex_1().min_h_0().overflow_y_scroll().flex().flex_col().children(elements)).child(buttons)+ div().flex_1().min_h_0().flex().flex_col().child(self.scrollable("refactor-preview-tree", None, div().id("refactor-preview-tree").flex().flex_col().children(elements), cx).flex_1()).child(buttons)}fn refactor_preview_row(&self, index: usize, row: Row, depth: usize, cx: &mut Context<Self>) -> AnyElement {diff --git a/native/crates/app/src/workbench/tree_guides.rs b/native/crates/app/src/workbench/tree_guides.rsindex 2cf1b2679d2..62be298b637 100644--- a/native/crates/app/src/workbench/tree_guides.rs+++ b/native/crates/app/src/workbench/tree_guides.rs@@ -205,7 +205,7 @@ impl Workbench {self.search.focus_and_select(Some(row.key));window.focus(&self.search.focus.clone(), cx);}- ListId::KeybindingsTable | ListId::SettingsTree | ListId::EditorTabs { .. } | ListId::Notebook(_) | ListId::CommentThread { .. } | ListId::MarkerMessage | ListId::ParameterHints | ListId::Scrollable(_) => unreachable!("only the Explorer and Search lists are trees"),+ ListId::KeybindingsTable | ListId::SettingsTree | ListId::EditorTabs { .. } | ListId::Notebook(_) | ListId::CommentThread { .. } | ListId::MarkerMessage | ListId::ParameterHints | ListId::Scrollable(_) | ListId::Page(_) | ListId::MultiDiff(_) => unreachable!("only the Explorer and Search lists are trees"),}cx.notify();}@@ -215,7 +215,7 @@ impl Workbench {ListId::Explorer => self.folder.as_ref().map(|tree| tree.rows().iter().map(|row| row.depth).collect()).unwrap_or_default(),ListId::Outline => self.notebook_outline_depths().unwrap_or_else(|| self.outline_shown_rows().into_iter().map(|(_, depth)| depth).collect()),ListId::Search => self.search.rows(&self.search_folders(), Some(&self.collapse_results())).iter().map(|row| row.depth).collect(),- ListId::KeybindingsTable | ListId::SettingsTree | ListId::EditorTabs { .. } | ListId::Notebook(_) | ListId::CommentThread { .. } | ListId::MarkerMessage | ListId::ParameterHints | ListId::Scrollable(_) => Vec::new(),+ ListId::KeybindingsTable | ListId::SettingsTree | ListId::EditorTabs { .. } | ListId::Notebook(_) | ListId::CommentThread { .. } | ListId::MarkerMessage | ListId::ParameterHints | ListId::Scrollable(_) | ListId::Page(_) | ListId::MultiDiff(_) => Vec::new(),}}diff --git a/native/crates/app/src/workbench/tree_view.rs b/native/crates/app/src/workbench/tree_view.rsindex c38777d928c..7b348e0daf2 100644--- a/native/crates/app/src/workbench/tree_view.rs+++ b/native/crates/app/src/workbench/tree_view.rs@@ -553,16 +553,14 @@ impl Workbench {.group(group).track_focus(&focus).relative()- .size_full().flex().flex_col()- .overflow_y_scroll().children(message).children(rows).when(outlined, |body| body.child(self.focus_outline().debug_selector(move || format!("tree-view-outline-{id}")))).can_drop(move |dragged, _, _| dragged.downcast_ref::<DraggedTreeItems>().is_some_and(|dragged| accepts_drop(id, controller.as_ref(), dragged)))- .on_drop(cx.listener(move |workbench, dragged: &DraggedTreeItems, _, cx| workbench.drop_tree_items(id, None, dragged, cx)))- .into_any_element();+ .on_drop(cx.listener(move |workbench, dragged: &DraggedTreeItems, _, cx| workbench.drop_tree_items(id, None, dragged, cx)));+ let body = self.scrollable(id, None, body, cx).size_full().into_any_element();super::view_panes::ViewPane { id, title, description: tree.description.clone(), actions: Some(actions), draws_more: false, show_actions: focused, body }}diff --git a/native/crates/app/src/workbench/tree_view/tests.rs b/native/crates/app/src/workbench/tree_view/tests.rsindex 751fb367948..5757fc647e3 100644--- a/native/crates/app/src/workbench/tree_view/tests.rs+++ b/native/crates/app/src/workbench/tree_view/tests.rs@@ -109,6 +109,19 @@ fn a_collapsed_view_fetches_nothing_until_its_pane_expands(cx: &mut TestAppConteassert!(workbench.read_with(cx, |workbench, _| workbench.tree_views.trees[VIEW].items["b"].strikethrough()));}+/// treeView.ts puts the tree in a ScrollableElement: the pointer over it shows its scrollbar.+#[gpui::test]+fn the_tree_shows_its_scrollbar_under_the_pointer(cx: &mut TestAppContext) {+ let mut roots = vec![json!(0)];+ roots.extend((0..50).map(|index| item(&format!("i{index}"), None, 0)));+ let children = [(Value::Null, json!([roots]))];+ let (workbench, cx, _) = shown_tree("scrollbar", json!({}), &children, false, cx);+ let list = crate::workbench::list_scroll::ListId::Scrollable(VIEW);+ let bounds = workbench.read_with(cx, |workbench, _| workbench.list_scroller(list).bounds());+ cx.simulate_mouse_move(bounds.center(), None, gpui::Modifiers::none());+ assert_eq!(workbench.read_with(cx, |workbench, _| workbench.list_hover(list).map(|(over, _)| over)), Some(true));+}+#[gpui::test]fn reveal_opens_the_view_expands_the_parents_and_selects_the_item(cx: &mut TestAppContext) {let (workbench, cx, receiver) = workbench_with("reveal", cx);diff --git a/native/crates/app/src/workbench/walkthrough_part.rs b/native/crates/app/src/workbench/walkthrough_part.rsindex 5c58a95cc28..b92f767afbe 100644--- a/native/crates/app/src/workbench/walkthrough_part.rs+++ b/native/crates/app/src/workbench/walkthrough_part.rs@@ -7,7 +7,7 @@ use std::cell::{Cell, RefCell};use std::path::PathBuf;use gpui::{- AnyElement, Context, Div, FocusHandle, FontWeight, InteractiveText, MouseButton, MouseDownEvent, ScrollDelta, ScrollHandle, ScrollWheelEvent, StyledText,+ AnyElement, Context, Div, FocusHandle, FontWeight, InteractiveText, MouseButton, MouseDownEvent, ScrollHandle, StyledText,TextRun, Window, div, point, prelude::*, px,};use serde_json::{Value, json};@@ -17,7 +17,6 @@ use super::welcome_page::WALKTHROUGH_SCHEME;use crate::commands::Outcome;use crate::editor::view_state::ViewStates;use crate::editor::{OpenEditor, TextDocument};-use crate::list_tree::wheel_scroll_delta;use crate::markdown::{Block, Inline, MarkdownString};#[cfg(test)]@@ -201,17 +200,6 @@ impl Workbench {self.playground.scroll.set_offset(point(px(0.), px(-top)));}- /// scrollableElement.ts `_onMouseWheel` of the page's `DomScrollableElement`: default sensitivities, no smooth scroll.- fn playground_wheel(&mut self, event: &ScrollWheelEvent, cx: &mut Context<Self>) {- let (x, y) = match event.delta {- ScrollDelta::Pixels(delta) => (f32::from(delta.x) / 40., f32::from(delta.y) / 40.),- ScrollDelta::Lines(delta) => (delta.x, delta.y),- };- let (_, delta_top) = wheel_scroll_delta(x, y, event.modifiers.alt, 1., 5.);- self.set_playground_scroll_top(self.playground_scroll_top() + delta_top);- cx.notify();- }-/// walkThroughPart.ts `getArrowScrollHeight`.fn playground_arrow_scroll_height(&self) -> f32 {let font_size = self.setting("editor.fontSize").as_f64().filter(|size| *size >= 1.).unwrap_or(12.) as f32;@@ -253,16 +241,8 @@ impl Workbench {// The browser collapses the margins of neighbors; GPUI adds them, so each block gets the larger one above it.let mut page = div().id("walkthrough-playground")- .flex_1()- .min_h_0()- // Without it a flex item is as wide as its longest unwrapped paragraph.- .min_w_0().flex().flex_col()- // Hidden, not scroll: GPUI's own wheel handler moves 22px a line, the page 50.- .overflow_hidden()- .track_scroll(&self.playground.scroll)- .on_scroll_wheel(cx.listener(|workbench, event: &ScrollWheelEvent, _, cx| workbench.playground_wheel(event, cx))).px(px(20.)).py(px(10.)).font_family(UI_FONT)@@ -281,7 +261,8 @@ impl Workbench {if let Some(focus) = &self.playground.focus {page = page.track_focus(focus);}- div().flex_1().min_h_0().flex().child(page)+ // walkThroughPart.ts: the page in a DomScrollableElement; its paragraphs wrap, so only the vertical bar shows.+ div().flex_1().min_h_0().flex().child(self.dom_scrollable("walkthrough-playground", Some(&self.playground.scroll), page, cx).flex_1())}/// `onDidChangeCursorPosition`: a new cursor position of the focused snippet scrolls the page the least thatdiff --git a/native/crates/app/src/workbench/walkthrough_part/tests.rs b/native/crates/app/src/workbench/walkthrough_part/tests.rsindex 3f472a19a9e..ede74f3833d 100644--- a/native/crates/app/src/workbench/walkthrough_part/tests.rs+++ b/native/crates/app/src/workbench/walkthrough_part/tests.rs@@ -131,11 +131,21 @@ fn the_arrow_and_page_commands_scroll_the_page(cx: &mut TestAppContext) {fn a_wheel_line_scrolls_the_page_50px(cx: &mut TestAppContext) {let (workbench, cx, _) = workbench(cx);let center = workbench.read_with(cx, |workbench, _| workbench.playground.scroll.bounds().center());- cx.simulate_event(gpui::ScrollWheelEvent { position: center, delta: ScrollDelta::Lines(point(0., -2.)), ..Default::default() });+ cx.simulate_event(gpui::ScrollWheelEvent { position: center, delta: gpui::ScrollDelta::Lines(gpui::point(0., -2.)), ..Default::default() });cx.run_until_parked();assert_eq!(workbench.read_with(cx, |workbench, _| workbench.playground_scroll_top()), 100.);}+/// walkThroughPart.ts puts the page in a DomScrollableElement: the pointer over it shows its scrollbar.+#[gpui::test]+fn the_page_shows_its_scrollbar_under_the_pointer(cx: &mut TestAppContext) {+ let (workbench, cx, _) = workbench(cx);+ let page = crate::workbench::list_scroll::ListId::Page("walkthrough-playground");+ let center = workbench.read_with(cx, |workbench, _| workbench.playground.scroll.bounds().center());+ cx.simulate_mouse_move(center, None, gpui::Modifiers::none());+ assert_eq!(workbench.read_with(cx, |workbench, _| workbench.list_hover(page).map(|(over, _)| over)), Some(true));+}+#[gpui::test]fn a_heading_link_scrolls_its_heading_20px_below_the_top(cx: &mut TestAppContext) {let (workbench, cx, _) = workbench(cx);diff --git a/native/crates/app/src/workbench/welcome_page.rs b/native/crates/app/src/workbench/welcome_page.rsindex bba7732978a..10ec02737ec 100644--- a/native/crates/app/src/workbench/welcome_page.rs+++ b/native/crates/app/src/workbench/welcome_page.rs@@ -760,7 +760,8 @@ impl Workbench {.child(div().flex_1().flex().child(div().w(relative(1. / 15.))).child(column(left).w(relative(6. / 15.))).child(div().w(relative(1. / 15.))).child(column(right).w(relative(6. / 15.)))).child(div().ml(relative(1. / 15.)).w(relative(13. / 15.)).child(footer)),};- div().id("welcome-categories").size_full().overflow_y_scroll().px(px(24.)).py(px(12.)).child(grid)+ // gettingStarted.ts `categoriesPageScrollbar`, a DomScrollableElement with the default options.+ self.dom_scrollable("welcome-categories", None, div().id("welcome-categories").px(px(24.)).py(px(12.)).child(grid), cx).size_full()}/// gettingStartedList.ts `GettingStartedIndexList`: the title and the list.@@ -1092,7 +1093,9 @@ impl Workbench {.child(div().w(relative(8. / 15.)).flex().justify_center().child(self.welcome_media(media, step.expect("media of the selected step"), cx))),),};- div().id("welcome-details").relative().size_full().overflow_y_scroll().child(div().h_full().max_w(relative(0.8)).mx_auto().px(px(32.)).child(content)).child(back)+ // gettingStarted.ts `detailsPageScrollbar`, a DomScrollableElement with the default options.+ let page = div().id("welcome-details").relative().child(div().h_full().max_w(relative(0.8)).mx_auto().px(px(32.)).child(content)).child(back);+ self.dom_scrollable("welcome-details", None, page, cx).size_full()}/// `buildStepList` and the Mark Done / Next Section row.diff --git a/native/crates/app/src/workbench/workspace_trust_editor.rs b/native/crates/app/src/workbench/workspace_trust_editor.rsindex 69b9fbc01bf..e701d0f0f74 100644--- a/native/crates/app/src/workbench/workspace_trust_editor.rs+++ b/native/crates/app/src/workbench/workspace_trust_editor.rs@@ -110,16 +110,11 @@ impl Workbench {.flex().flex_col().child(self.trust_section(HEADER, self.trust_header(trusted, cx), window))- .child(- div()- .id("workspace-trust-editor-body")- .flex_1()- .min_h_0()- .overflow_y_scroll()- .track_scroll(&self.trust_editor.scroll)- .child(self.trust_features(trusted, window, cx))- .child(self.trust_section(CONFIGURATION, self.trusted_folders(window, cx), window)),- )+ .child({+ let body = div().id("workspace-trust-editor-body").child(self.trust_features(trusted, window, cx)).child(self.trust_section(CONFIGURATION, self.trusted_folders(window, cx), window));+ // workspaceTrustEditor.ts `bodyScrollBar`: a DomScrollableElement, `horizontal: Hidden`, `vertical: Auto`.+ self.dom_scrollable("workspace-trust-editor-body", Some(&self.trust_editor.scroll), body, cx).flex_1()+ })}/// The root's keydown: Up and Down focus the previous or next section (`navOrder`, wrapping), Escape the editor,diff --git a/port/ledger.md b/port/ledger.mdindex e51ac534b5d..13148910e8f 100644--- a/port/ledger.md+++ b/port/ledger.md@@ -189,7 +189,7 @@ One row per upstream unit, generated by `bun port/tools/gen-ledger.ts`; mileston| mainthread/MainThreadDocuments | MainThread* shape (Rust side) | M8 | verified | | host_sync.rs, host_requests.rs: port/tools/api-tests whole folder suite, `MOCHA_GREP="vscode API - editors"` 13/0/0, `MOCHA_GREP="vscode API - workspace"` 84/2/0 (the 2 upstream skips), `workspace events` 10/0/0 (port/results/api-tests.md, milestone 20 sweep); `port/tools/settings-check preferences` (vscode://defaultsettings and vscode://schemas documents) || mainthread/MainThreadBulkEdits | MainThread* shape (Rust side) | M12 | verified | | file edits of workspace.applyEdit (api-tests: rename & ignoreIfExists, delete & ignoreIfNotExists, #111867 1/3 to 3/3, binary files pass); text edits and EOL changes through workbench/bulk_text_edits.rs, api-tests MOCHA_GREP="vscode API - workspace" 94/2/13 with every applyEdit test passing; cell edits go to the notebook models (api-tests notebook.document `workspace edit API` cases pass, milestone 17); an edit that needs confirmation waits in the Refactor Preview, `false` for no edits (port/resul [... omitted end of long line]; file edits of workspace.applyEdit (api-tests: rename & ignoreIfExists, delete & ignoreIfNotExists, #111867 1/3 to 3/3, binary files pass); text edits and EOL changes through workbench/bulk_text_edits.rs, api-tests MOCHA_GREP="vscode API - workspace" 94/2/13 with every applyEdit test passing; cell edits fail until milestone 13; an edit that needs confirmation waits in the Refactor Preview, `false` for no edits (port/results/refactor-preview.md) || mainthread/MainThreadTextEditors | MainThread* shape (Rust side) | M8 | verified | | host_requests.rs, workbench/editor_view/quick_diff.rs: cargo test -p app the_host_sees_the_code_editors_of_the_rendered_cells cell_list_editors_follow_the_rendered_rows set_options_apply_the_cursor_style_and_line_numbers text_editor_show_and_hide quick_diff_contributed; api-tests `MOCHA_GREP="vscode API - editors"` 13/0/0, `MOCHA_GREP="vscode API - window"` 40/0/0 (port/results/api-tests.md) |-| mainthread/MainThreadTreeViews | MainThread* shape (Rust side) | M11 | verified | | workbench/tree_view.rs, workbench/view_containers.rs: cargo test -p app tree_view custom_tree; api-tests `MOCHA_GREP="vscode API - window|vscode API - tree"` 43/0/1 (the 1 a notebook test, milestone 17; tree.test.ts all pass); ui-pair port/fixtures/extensions/ui-tree-checkbox.json with `ARGS=--extensionDevelopmentPath=<abs>/port/fixtures/extensions/tree-checkbox`; port/results/references-view.md |+| mainthread/MainThreadTreeViews | MainThread* shape (Rust side) | M11 | verified | | workbench/tree_view.rs, workbench/view_containers.rs: cargo test -p app tree_view custom_tree; api-tests `MOCHA_GREP="vscode API - window|vscode API - tree"` 43/0/1 (the 1 a notebook test, milestone 17; tree.test.ts all pass); ui-pair port/fixtures/extensions/ui-tree-checkbox.json with `ARGS=--extensionDevelopmentPath=<abs>/port/fixtures/extensions/tree-checkbox`; port/results/references-view.md; scrollbars: cargo test -p app the_tree_shows_its_scrollbar_under_the_pointer (treeView.ts tree in Workbench::scrollable) || mainthread/MainThreadDownloadService | MainThread* shape (Rust side) | M18 | verified | | `_workbench.downloadResource` copies a file, fetches a URL and rejects a 404 with the upstream message: port/tools/extensions-check; session.rs answers undefined || mainthread/MainThreadErrors | MainThread* shape (Rust side) | M6 | verified | | main_thread_errors.rs: `$onUnexpectedError` goes through log.ts `createUnexpectedErrorHandler` (the stack, or `toErrorMessage`; the same text again within 1000 ms dropped) to the Window log; the session still prints it on stderr (cargo test -p app output::logger main_thread_errors: log.test.ts cases); session.rs writes `$onUnexpectedError` stacks to the port log (code-gpui stderr); seen in port/tools/api-tests api-folder.log || mainthread/MainThreadConsole | MainThread* shape (Rust side) | M6 | verified | | main_thread_errors.rs: `$logExtensionHostMessage` as remoteConsoleUtil.ts: `logRemoteEntryIfError` (errors, `[Extension Host]` label) in a normal window, `logRemoteEntry` (every entry, no label) in an extension test run, to the Window log; console.rs prints it on stderr as the reference main process does (cargo test -p app main_thread_errors; api-tests editors run: renderer.log carries the mocha lines); console.rs formats `$logExtensionHostMessage` like util.format to the port log; cargo test -p exthost console tests; mocha spec output in port/tools/api-tests logs |@@ -579,10 +579,10 @@ One row per upstream unit, generated by `bun port/tools/gen-ledger.ts`; mileston| workbench/contrib/emergencyAlert | workbench contribution | | removed | | no AI or Microsoft services by decision (port/notes.md); API stays inert || workbench/contrib/emmet | workbench contribution | M13 | verified | | workbench/emmet.rs: Emmet: Expand Abbreviation (`emmet.expandAbbreviation` with the language at the cursor and the emmet parent mode of its grammar's scope, emmetAction.test.ts cases), Tab with `emmet.triggerExpansionOnTab`, the Edit menu entry: cargo test -p app emmet menubar || workbench/contrib/encryption | workbench contribution | M10 | n/a | | encryption.contribution.ts only migrates Linux `password-store` argv values to gnome-libsecret; the port runs on macOS and keeps secrets in the Keychain |-| workbench/contrib/extensions | workbench contribution | M18 | verified | | cargo test -p app extension the_manage_menu_lists_the_extension_context_menu the_manage_menu_installs_a_version_and_toggles_an_ignored_recommendation the_manage_menu_auto_updates_a_publisher_and_toggles_a_workspace_recommendation download_specific_version_picks_a_version_then_a_folder a_vsix_name_rejects_a_path_from_the_gallery install_anyway_installs_an_unsigned_extension install_specific_version_installs_the_picked_version an_activated_extensions_row_shows_its_activation_time the_manage_menu_sets_a_theme_of_the_extension the_views_are_panes extension_bisect bisect_finds_the_extension_and_keeps_it_disabled extension_features the_runtime_status_lists_uncaught_errors_and_messages invalid_contributed static_entries_need_the_proposal group_needs_the_proposal debuggers_merge_by_type_and_keep_the_built_in_values skipped_menu_contributions_are_extension_messages contributed_command_messages invalid_views_and_view_containers_are_extension_messages invalid_configuration_is_an_extension_message invalid_json_validation_is_an_extension_message invalid_colors_and_icons_are_extension_messages invalid_semantic_token_contributions_are_extension_messages invalid_problem_patterns_and_matchers_are_extension_messages invalid_grammars_are_extension_messages invalid_notebook_contributions_are_extension_messages (extensionsViews, extensionQuery, extensionEnablementService tests); cargo test -p exthost all_compatible_versions_follow_the_kind_and_the_engine all_versions_ignore_the_engine_but_not_the_block every_profile; ui-pair `menus/extension-context.json` with `--extensionDevelopmentPath=<repo>/port/fixtures/extensions/menus`, `menus/extension-theme.json`, port/fixtures/extensions/ui-view.json. Out with removed parts: Report Issue & Continue (contrib/issue), the authentication point and the Account Preferences item (services/authentication), the Install (Do not Sync), Install Pre-Release (Do not Sync) and Sync This Extension items (Settings Sync, no sign-in by decision, port/notes.md) |+| workbench/contrib/extensions | workbench contribution | M18 | verified | | cargo test -p app extension views_and_pages_draw the_manage_menu_lists_the_extension_context_menu the_manage_menu_installs_a_version_and_toggles_an_ignored_recommendation the_manage_menu_auto_updates_a_publisher_and_toggles_a_workspace_recommendation download_specific_version_picks_a_version_then_a_folder a_vsix_name_rejects_a_path_from_the_gallery install_anyway_installs_an_unsigned_extension install_specific_version_installs_the_picked_version an_activated_extensions_row_shows_its_activation_time the_manage_menu_sets_a_theme_of_the_extension the_views_are_panes extension_bisect bisect_finds_the_extension_and_keeps_it_disabled extension_features the_runtime_status_lists_uncaught_errors_and_messages invalid_contributed static_entries_need_the_proposal group_needs_the_proposal debuggers_merge_by_type_and_keep_the_built_in_values skipped_menu_contributions_are_extension_messages contributed_command_messages invalid_views_and_view_containers_are_extension_messages invalid_configuration_is_an_extension_message invalid_json_validation_is_an_extension_message invalid_colors_and_icons_are_extension_messages invalid_semantic_token_contributions_are_extension_messages invalid_problem_patterns_and_matchers_are_extension_messages invalid_grammars_are_extension_messages invalid_notebook_contributions_are_extension_messages (extensionsViews, extensionQuery, extensionEnablementService tests); cargo test -p exthost all_compatible_versions_follow_the_kind_and_the_engine all_versions_ignore_the_engine_but_not_the_block every_profile; ui-pair `menus/extension-context.json` with `--extensionDevelopmentPath=<repo>/port/fixtures/extensions/menus`, `menus/extension-theme.json`, port/fixtures/extensions/ui-view.json. Out with removed parts: Report Issue & Continue (contrib/issue), the authentication point and the Account Preferences item (services/authentication), Install and Install Pre-Release (Do not Sync) and Sync This Extension (Settings Sync, no sign-in by decision, port/notes.md) || workbench/contrib/externalTerminal | workbench contribution | M15 | verified | | workbench/external_terminal.rs: Open New External Terminal (`workbench.action.terminal.openNativeConsole`, cmd+shift+c), with several workspace folders after the Select workspace folder pick (cargo test -p app open_native_console_picks_a_folder_in_a_multi_root_workspace); cargo test -p app external_terminal; ui-pair (port/results/terminal.md) || workbench/contrib/externalUriOpener | workbench contribution | M12 | verified | | workbench/opener.rs: externalUriOpenerService.ts getRequestedOpener (workbench.externalUriOpeners globs), chooseOpener, "How would you like to open: {0}" picker; no Simple Browser (out of scope); verified at port-m12b-verify: cargo test -p app opener 4/4; Simple Browser is out of scope by decision |-| workbench/contrib/files | workbench contribution | M12 | verified | | explorer.rs, dialog.rs, workbench/workspace_editing.rs, workbench/file_compare.rs: cargo test -p app explorer_actions file_actions view_state nest copy_path copied_path_labels compact get_context compressed_navigation explorer_find find_filters files_dropped_from_finder view_title_and_file_actions new_file_creates file_compare focus_view_commands files_that_do_not_resolve open_editors body_limits_clamp sticky pinned_editors tab_scroll tree_guides hover unpin_hover open_with_opens_the_resource the_context_menu_selects_the_row readonly_keys_follow_the_focused_item_and_its_parent a_failed_create_offers a_folder_dropped_on_the_root a_delete_confirmation_follows_the_dialog_style cmd_v_pastes_the_files_finder_copied dragging_a_root_reorders_the_workspace_folders compacts_single_child_folders_into_one_row a_workspace_root_that_fails_to_resolve_is_decorated_with_its_error a_copy_onto_a_dirty_model_reverts_it_to_the_copied_file an_unreadable_folder_expands_to_no_children (explorerFileNestingTrie.test.ts); ui-pair port/fixtures/ui-pair/m12/workspace-folders.json, port/fixtures/ui-pair/m12/compare-saved.json, m12/compare.json, m12/find-in-folder.json, m12/folder-terminal.json, m12/explorer-ops.json, m12/editor-placeholders.json, m12/open-editors.json, m12/tab-scroll.json, m12/explorer-guides.json, m12/pinned-tabs.json (port/results/contextmenu.md). Differences left (port/notes.md milestone 12): a long tooltip breaks one segment earlier (GPUI line wrapper), the pin action loses its hover after Cmd+W until the pointer moves, a shrink sticky tab with a badge has no room for its name. Virtual workspaces: milestone 25 |+| workbench/contrib/files | workbench contribution | M12 | verified | | explorer.rs, dialog.rs, workbench/workspace_editing.rs, workbench/file_compare.rs: cargo test -p app explorer_actions file_actions view_state nest copy_path copied_path_labels compact get_context compressed_navigation explorer_find find_filters files_dropped_from_finder view_title_and_file_actions new_file_creates file_compare focus_view_commands files_that_do_not_resolve open_editors body_limits_clamp sticky pinned_editors tab_scroll tree_guides hover unpin_hover open_with_opens_the_resource the_context_menu_selects_the_row readonly_keys_follow_the_focused_item_and_its_parent a_failed_create_offers a_folder_dropped_on_the_root a_delete_confirmation_follows_the_dialog_style cmd_v_pastes_the_files_finder_copied dragging_a_root_reorders_the_workspace_folders compacts_single_child_folders_into_one_row a_workspace_root_that_fails_to_resolve_is_decorated_with_its_error a_copy_onto_a_dirty_model_reverts_it_to_the_copied_file an_unreadable_folder_expands_to_no_children (explorerFileNestingTrie.test.ts); ui-pair port/fixtures/ui-pair/m12/workspace-folders.json, port/fixtures/ui-pair/m12/compare-saved.json, m12/compare.json, m12/find-in-folder.json, m12/folder-terminal.json, m12/explorer-ops.json, m12/editor-placeholders.json, m12/open-editors.json, m12/tab-scroll.json, m12/explorer-guides.json, m12/pinned-tabs.json (port/results/contextmenu.md). Differences left (port/notes.md milestone 12): a long tooltip breaks one segment earlier (GPUI line wrapper), the pin action loses its hover after Cmd+W until the pointer moves, a shrink sticky tab with a badge has no room for its name. Virtual workspaces: milestone 25; scrollbars: cargo test -p app the_views_and_pages_draw_their_bodies_in_a_scrollable (open-editors through Workbench::scrollable) || workbench/contrib/folding | workbench contribution | M8 | verified | | `editor.defaultFoldingRangeProvider` picks among extension `FoldingRangeProvider`s from MainThreadLanguageFeatures (workbench/folding_providers.rs): cargo test -p app folding_providers; the setting's enum lists All and the extensions with code, Programming Languages first (`_updateConfigValues`, config registry.rs: cargo test -p config folding_range); `editor.defaultFoldingRangeProvider` picks among extension `FoldingRangeProvider`s from MainThreadLanguageFeatures (workbench/folding_providers.rs): cargo test -p app folding_providers; the setting's enum is not rebuilt for installed extensions; `editor.defaultFoldingRangeProvider` picks among extension `FoldingRangeProvider`s, which come with mainthread/MainThreadLanguageFeatures (port/notes.md milestone 8) || workbench/contrib/format | workbench contribution | M13 | verified | | `editor.defaultFormatter` from the extensions with formatters (config registry `list_default_formatters`), the formatter dialog, notification and Configure Default Formatter pick, Format Document With (workbench/format.rs): cargo test -p app format::, cargo test -p config default_formatter; the `formatter.conflict` Formatting language status with Configure... (cargo test -p app two_formatters_without_a_default) || workbench/contrib/git | workbench contribution | M14 | removed | | IGitService and its delegate serve only chat and agent sessions (removed by decision) |@@ -618,7 +618,7 @@ One row per upstream unit, generated by `bun port/tools/gen-ledger.ts`; mileston| workbench/contrib/performance | workbench contribution | M19 | verified | | Developer: Startup Performance (perf_view.rs, perfviewEditor.ts): System Info, Performance Marks from the timer service, Extension Activation Stats, Raw Perf Marks of the renderer and localExtHost; inputLatencyContrib, startupTimings and the auto profilers only report telemetry or take V8 profiles (no telemetry by decision, platform/profiling n/a); cargo test -p app timer:: perf_view; System Info takes the CPU speed and VM likelihood as Node's `os` reports them and no process memory, which 1.147 turns off (cargo test -p app the_system_info_lists apple_silicon_reports_libuvs_fallback_cpu_speed) || workbench/contrib/policyExport | workbench contribution | M10 | removed | | build tool: `--export-policy-data` writes the policy definitions that upstream's build turns into ADMX and macOS profiles; the port ships no policy templates || workbench/contrib/preferences | workbench contribution | M10 | verified | | settings_editor.rs, workbench/settings_editor_view.rs, workbench/keybindings_editor_view.rs, workbench/define_keybinding.rs, smart_snippet_inserter.rs, workbench/preferences/unsupported_settings.rs: cargo test -p app settings_editor keybindings_editor_view define_keybinding smart_snippet_inserter preferences unsupported_settings a_policy_setting_disables_its_select_and_its_hover_applies_the_policy_filter the_lang_filter_shows_the_language_block_value descriptions_render_emphasis_lists_and_setting_links an_extension_source_opens_the_extension the_editor_hover_shows_the_message_of_a_marked_key; ui-pair port/results/settings-editor.md, port/results/keybindings-editor.md. keyboardLayoutPicker.ts n/a (web only) |-| workbench/contrib/processExplorer | workbench contribution | M19 | verified | | workbench/process_explorer.rs on ps.rs: Open Process Explorer (Developer and Help menu) in a floating window (no auxiliary editor windows in the port), the tree under the app's pid refreshed after each listing, Kill/Force Kill/Copy/Copy All, Debug for `isDebuggable` processes through `debug.startFromConfig` with `attachTo`'s port or pid (cargo test -p app a_node_process_gets_debug), Alt+E, bounds stored; port/tools/shell-gui-check (Help > Open Process Explorer: window "Process Explorer", AXOutline with the vsrustium root and the extension host rows); cargo test -p app process_explorer ps:: |+| workbench/contrib/processExplorer | workbench contribution | M19 | verified | | workbench/process_explorer.rs on ps.rs: Open Process Explorer (Developer and Help menu) in a floating window (no auxiliary editor windows in the port), the tree under the app's pid refreshed after each listing, Kill/Force Kill/Copy/Copy All, Debug for `isDebuggable` processes through `debug.startFromConfig` with `attachTo`'s port or pid (cargo test -p app a_node_process_gets_debug), Alt+E, bounds stored; port/tools/shell-gui-check (Help > Open Process Explorer: window "Process Explorer", AXOutline with the vsrustium root and the extension host rows); cargo test -p app process_explorer ps::; scrollbars: cargo test -p app the_views_and_pages_draw_their_bodies_in_a_scrollable (process-explorer through Workbench::scrollable) || workbench/contrib/quickaccess | workbench contribution | M9 | verified | | commandsQuickAccess.ts as quick_access.rs and command_palette.rs; helpQuickAccess `?` with the providers the port has and the More help pick (cargo test -p app quick_access command_palette tf_idf title_bar), history in profile storage; the workbench's palette items are the reference's, listed when the port registers their command; viewQuickAccess.ts as quick_access/views.rs: `view `, Open View, Quick Open View (Ctrl+Q) and `inViewsPicker` list the side bar, panel and secondary side bar containers, their views under `Parent / Child` separators, the terminals, the separate debug consoles and the output channels; Ctrl+Q again moves to the next pick and releasing Ctrl opens it (quickInput.ts `quickNavigate`) (quick_access::tests::the_view_picker_groups_views_by_container_and_opens_the_pick) || workbench/contrib/relauncher | workbench contribution | M19 | verified | | workbench/relauncher.rs: SettingsChangeRelauncher's macOS settings (chat and agent host ones left out with AI) ask to restart, Restart relaunches with the same arguments, a changed default (`ConfigurationTarget.DEFAULT`) takes the new value without asking; port/tools/shell-gui-check (window.nativeTabs changed in settings.json: prompt shown, old process quit, 1 new process); cargo test -p app relauncher a_changed_default_does_not_ask_to_restart || workbench/contrib/remote | workbench contribution | | removed | | no remote or tunnels by decision (port/notes.md); one local extension host |@@ -658,8 +658,8 @@ One row per upstream unit, generated by `bun port/tools/gen-ledger.ts`; mileston| workbench/contrib/welcomeGettingStarted | workbench contribution | M19 | verified | | walkthroughs.rs, workbench/welcome_page.rs: cargo test -p app walkthroughs welcome_page a_panel_view_showing_completes_its_on_view_step a_workbench_context_key_completes_its_on_context_step a_step_description_keeps_its_bold_italic_and_code_runs a_step_description_draws_its_bold_run a_step_button_draws_its_label_icons a_to_side_step_command_runs_in_a_group_beside_the_page; port/tools/ui-pair with port/fixtures/ui-steps/welcome.json (port/results/welcome.md). Without the Copilot, sync, web and remote items || workbench/contrib/welcomeOnboarding | workbench contribution | M19 | removed | | Developer: Welcome Onboarding 2026 (onboardingVariationA.ts) is sign-in and Copilot setup: no sign-in or AI by decision (port/notes.md) || workbench/contrib/welcomeViews | workbench contribution | M19 | verified | | workbench/views_welcome.rs: the viewsWelcome extension point (git's scm and explorer entries; github's Publish to GitHub needs sign-in) with the workbench's Explorer and Source Control contents; New File... (workbench/new_file.rs); port/tools/ui-pair welcome.json explorer and scm shots match the reference (port/results/welcome.md); cargo test -p app views_welcome; paragraphs wrap as Chromium with a hanging trailing space (vendored GPUI line_layout.rs; ui-pair icons/scm-welcome.json, port/results/icons.md) |-| workbench/contrib/welcomeWalkthrough | workbench contribution | M19 | verified | | h4 headings uppercase (an_h4_is_uppercase); cargo test -p app walkthrough_part 16 passed; ui-pair port/fixtures/ui-pair/m19/playground.json matches the reference in scroll, wrap, shortcut labels, snippet click and typing (port/notes.md Editor Playground) |-| workbench/contrib/workspace | workbench contribution | M12 | verified | | workbench/workspace_trust_view.rs, workbench/workspace_trust_editor.rs: cargo test -p config untrusted; cargo test -p app trusted_entries workspace_trust_editor trusting_the_window; ui-pair startup prompt, port/fixtures/ui-pair/m12/trust-editor.json (0.74% pixels off: the settings and extension counts), m12/trust-table.json (port/notes.md milestone 12) |+| workbench/contrib/welcomeWalkthrough | workbench contribution | M19 | verified | | h4 headings uppercase (an_h4_is_uppercase); cargo test -p app walkthrough_part 16 passed; ui-pair port/fixtures/ui-pair/m19/playground.json matches the reference in scroll, wrap, shortcut labels, snippet click and typing (port/notes.md Editor Playground); scrollbars: cargo test -p app the_page_shows_its_scrollbar_under_the_pointer (the page in Workbench::dom_scrollable) |+| workbench/contrib/workspace | workbench contribution | M12 | verified | | workbench/workspace_trust_view.rs, workbench/workspace_trust_editor.rs: cargo test -p config untrusted; cargo test -p app trusted_entries workspace_trust_editor trusting_the_window; ui-pair startup prompt, port/fixtures/ui-pair/m12/trust-editor.json (0.74% pixels off: the settings and extension counts), m12/trust-table.json (port/notes.md milestone 12); scrollbars: cargo test -p app the_views_and_pages_draw_their_bodies_in_a_scrollable (workspace-trust-editor-body through Workbench::dom_scrollable) || workbench/contrib/workspaces | workbench contribution | M12 | verified | | workbench/workspace_actions.rs: Open File, Open Folder, Open Workspace, Close Folder, Open Recent picker, Clear Recently Opened, File menu and Open Recent submenu (cargo test -p app menubar); workbench/workspace_editing.rs: Add Folder to Workspace, Remove Folder from Workspace (folder picker), Save Workspace As, Duplicate Workspace, File menu `3_workspace` and Explorer `2_workspace` items: cargo test -p app workspace_editing explorer; ui-pair port/fixtures/ui-pair/m12/workspace-folders.json (Explorer menu, palette, folder picker, Untitled (Workspace) window), verified at port-m12b-verify || extension/bat | built-in extension | M7 | verified | | grammar: cargo test -p app syntax::tests::colorize_fixtures_match_the_reference (its colorize-tests fixtures, scopes and 10 default theme colors) || extension/clojure | built-in extension | M7 | verified | | grammar: cargo test -p app syntax::tests::colorize_fixtures_match_the_reference (its colorize-tests fixtures, scopes and 10 default theme colors) |