Skip to content

Visual Studio Code, rebuilt in Rust

Rust

fix(workbench): show every container in the top and bottom activity bar

rokartur6705cce2352e
diff --git a/native/crates/app/src/workbench/side_bar.rs b/native/crates/app/src/workbench/side_bar.rs
index a71f7b424f4..f7d108bea09 100644
--- a/native/crates/app/src/workbench/side_bar.rs
+++ b/native/crates/app/src/workbench/side_bar.rs
@@ -1,11 +1,12 @@
//! The side bar card (sidebarPart.ts) and, with `workbench.activityBar.location` `top` or `bottom`, its compact
//! activity bar (`.header-or-footer` of paneCompositePart.ts).
-use gpui::{ClickEvent, Context, Div, InteractiveElement, ParentElement, StatefulInteractiveElement, Styled, Window, div, prelude::FluentBuilder, px};
+use gpui::{ClickEvent, Context, Div, InteractiveElement, ParentElement, Rgba, StatefulInteractiveElement, Styled, Window, div, prelude::FluentBuilder, px, svg};
use super::Workbench;
use super::hover::{HoverOptions, HoverPosition};
use super::search_view::SideBarView;
+use super::view_containers::ContainerIcon;
/// The view containers of the activity bar: icon in the activity bar, icon in the compact bar, title, command, view.
/// Icons are registered icon ids, resolved through the product icon theme and their defaults.
@@ -57,21 +58,54 @@ impl Workbench {
fn compact_activity_bar(&self, footer: bool, cx: &mut Context<Self>) -> Div {
let hover = HoverOptions::composite_bar(if footer { HoverPosition::Above } else { HoverPosition::Below });
let unpinned = self.unpinned_containers();
- let containers = VIEW_CONTAINERS.into_iter().filter(|(_, _, _, command, _)| !self.container_hidden_if_empty(command) && !unpinned.iter().any(|id| id == command));
- let tabs: Vec<_> = containers.map(|(_, icon, title, command, view)| {
- let active = view.is_some_and(|view| view == self.side_bar_view);
+ let containers = self.activity_bar_containers().into_iter().filter(|(command, _)| !unpinned.iter().any(|id| id == command));
+ let tabs: Vec<_> = containers.map(|(command, title)| {
+ let view = self.compact_activity_view(command);
+ let active = view == self.side_bar_view;
let color = if active { self.color("activityBarTop.foreground") } else { self.color("activityBarTop.inactiveForeground") };
- self.icon(icon, 36., 16., color)
+ self.compact_activity_icon(command, color)
.h(px(32.))
.id(command)
+ .debug_selector(move || command.to_owned())
.cursor_pointer()
.when(active, |tab| tab.bg(self.color("sideBar.background")).when(footer, |tab| tab.rounded_b(px(7.))).when(!footer, |tab| tab.rounded_t(px(7.))))
.child(self.action_hover(title, command, hover))
- .when(view.is_some(), |tab| tab.on_click(cx.listener(move |workbench, event: &ClickEvent, window, cx| workbench.activity_item_clicked(active, command, event, window, cx))))
+ .on_click(cx.listener(move |workbench, event: &ClickEvent, window, cx| match view {
+ SideBarView::Generated(id) => workbench.generated_activity_item_clicked(active, id, event, cx),
+ _ => workbench.activity_item_clicked(active, command, event, window, cx),
+ }))
}).collect();
div().h(px(32.)).flex_none().flex().bg(self.tab_strip_background()).children(tabs)
}
+ /// The side bar view an `activity_bar_containers` entry opens.
+ fn compact_activity_view(&self, container: &'static str) -> SideBarView {
+ if let Some((.., view)) = VIEW_CONTAINERS.into_iter().find(|(_, _, _, command, _)| *command == container) {
+ return view.expect("a built-in container opens a view");
+ }
+ match container {
+ "workbench.view.testing" => SideBarView::Testing,
+ id if self.tree_views.containers.iter().any(|contributed| contributed.id == id) => SideBarView::Contributed(id),
+ id => SideBarView::Generated(id),
+ }
+ }
+
+ /// An `activity_bar_containers` entry's 16px icon: the compact bar's codicon of a built-in container, else the
+ /// icon its activity bar item shows.
+ fn compact_activity_icon(&self, container: &'static str, color: Rgba) -> Div {
+ if let Some((_, icon, ..)) = VIEW_CONTAINERS.into_iter().find(|(_, _, _, command, _)| *command == container) {
+ return self.icon(icon, 36., 16., color);
+ }
+ match self.compact_activity_view(container) {
+ SideBarView::Testing => self.icon("beaker", 36., 16., color),
+ SideBarView::Contributed(id) => match &self.tree_views.containers.iter().find(|contributed| contributed.id == id).expect("a contributed container").icon {
+ ContainerIcon::Codicon(name) => self.icon(name, 36., 16., color),
+ ContainerIcon::File(path) => div().w(px(36.)).flex().items_center().justify_center().child(svg().external_path(path.to_string_lossy().into_owned()).size(px(16.)).text_color(color)),
+ },
+ _ => self.icon(self.generated_container_view(container).expect("a container with a view").icon, 36., 16., color),
+ }
+ }
+
/// paneCompositeBar.ts `ViewContainerActivityAction.run`: a double click runs once, and the active view's icon
/// hides the side bar unless `workbench.activityBar.iconClickBehavior` is `focus`.
pub(super) fn activity_item_clicked(&mut self, active: bool, command: &'static str, event: &ClickEvent, window: &mut Window, cx: &mut Context<Self>) {
diff --git a/native/crates/app/src/workbench/view_containers/tests.rs b/native/crates/app/src/workbench/view_containers/tests.rs
index 1ecaaecbeb0..fa24881a710 100644
--- a/native/crates/app/src/workbench/view_containers/tests.rs
+++ b/native/crates/app/src/workbench/view_containers/tests.rs
@@ -51,3 +51,47 @@ fn focus_view_commands_open_the_explorer_pane_and_focus_it(cx: &mut TestAppConte
}
});
}
+
+/// paneCompositeBar.ts shows every side bar container in the activity bar wherever it sits: with
+/// `workbench.activityBar.location` `top`, an extension's `viewsContainers.activitybar` entry appears in the side bar's
+/// header from startup and after an install, titled from package.nls.json, and its tab opens the container.
+#[gpui::test]
+fn the_top_activity_bar_shows_contributed_containers(cx: &mut TestAppContext) {
+ let app_root = Path::new(env!("VSCODE_SRC")).to_path_buf();
+ let themes = scan_extension(&app_root.join("extensions/theme-defaults"), true).unwrap();
+ let theme = load_theme(&[themes], "Dark Modern").unwrap();
+ let fixtures = Path::new(env!("CARGO_MANIFEST_DIR")).join("../../../port/fixtures/extensions/activity-bar-containers");
+ let containers = scan_extension(&fixtures.join("vscode-containers"), false).unwrap();
+ let todo_tree = scan_extension(&fixtures.join("todo-tree"), false).unwrap();
+ let dir = std::env::temp_dir().join(format!("vsrustium-top-activity-bar-{}", std::process::id()));
+ let _ = std::fs::remove_dir_all(&dir);
+ std::fs::create_dir_all(&dir).unwrap();
+ let workspace = config::workspace::Workspace::folder(dir.clone());
+ let settings = Arc::new(Mutex::new(Settings::load(Registry::with_extensions(&[]), dir.join("User"), Some(workspace.clone()))));
+ let (workbench, cx) = cx.add_window_view(|_, cx| {
+ let mut workbench = Workbench::new(theme, app_root.clone(), Some(workspace), Languages::new(&[]), settings, HostSync::new(std::sync::mpsc::channel().0), cx);
+ workbench.update_setting("workbench.activityBar.location", serde_json::json!("top"));
+ workbench.set_tree_views(std::slice::from_ref(&containers));
+ workbench
+ });
+ let containers_id = "workbench.view.extension.containersView";
+ let todo_tree_id = "workbench.view.extension.todo-tree-container";
+ cx.update(|window, cx| drop(window.draw(cx)));
+ assert!(cx.debug_bounds("workbench.view.explorer").is_some(), "the top activity bar shows the built-in containers");
+ assert!(cx.debug_bounds(containers_id).is_some(), "a container of an extension scanned at startup shows");
+ assert!(cx.debug_bounds(todo_tree_id).is_none());
+
+ workbench.update(cx, |workbench, cx| workbench.set_running_extensions(vec![containers, todo_tree], cx));
+ cx.update(|window, cx| drop(window.draw(cx)));
+ assert!(cx.debug_bounds(todo_tree_id).is_some(), "a container of an extension installed at runtime shows");
+ workbench.read_with(cx, |workbench, _| {
+ let titles: Vec<_> = workbench.activity_bar_containers().into_iter().filter(|(id, _)| id.starts_with("workbench.view.extension.")).collect();
+ assert_eq!(titles, [(containers_id, "Containers"), (todo_tree_id, "TODOs")]);
+ });
+
+ let tab = cx.debug_bounds(containers_id).unwrap().center();
+ cx.simulate_click(tab, gpui::Modifiers::none());
+ cx.run_until_parked();
+ workbench.read_with(cx, |workbench, _| assert_eq!(workbench.side_bar_view, crate::workbench::search_view::SideBarView::Contributed(containers_id)));
+ let _ = std::fs::remove_dir_all(&dir);
+}
diff --git a/native/crates/app/src/workbench/view_locations.rs b/native/crates/app/src/workbench/view_locations.rs
index f5d74c30cea..b403086b876 100644
--- a/native/crates/app/src/workbench/view_locations.rs
+++ b/native/crates/app/src/workbench/view_locations.rs
@@ -338,20 +338,26 @@ impl Workbench {
let view = self.generated_container_view(id).expect("a container with a view");
let active = self.side_bar_view == SideBarView::Generated(id) && self.is_part_visible(Part::SideBar);
let icon = if active { self.active_view_icon(view.icon) } else { self.icon(view.icon, 36., 24., inactive) };
- items.push(self.action_bar_item("activity", id, icon.id(id), cx).relative().cursor_pointer().child(self.action_hover(view.name, id, hover)).on_click(cx.listener(move |workbench, event: &ClickEvent, _, cx| {
- if event.click_count() > 1 {
- return;
- }
- let toggles = active && workbench.setting("workbench.activityBar.iconClickBehavior") != "focus";
- match toggles {
- true => workbench.set_part_hidden(Part::SideBar, true, cx),
- false => workbench.open_view_container_of(id, view.id, cx),
- }
- })));
+ items.push(self.action_bar_item("activity", id, icon.id(id), cx).relative().cursor_pointer().child(self.action_hover(view.name, id, hover)).on_click(cx.listener(move |workbench, event: &ClickEvent, _, cx| workbench.generated_activity_item_clicked(active, id, event, cx))));
}
items
}
+ /// `activity_item_clicked` for a generated container, which has no open command.
+ pub(super) fn generated_activity_item_clicked(&mut self, active: bool, id: &'static str, event: &ClickEvent, cx: &mut Context<Self>) {
+ if event.click_count() > 1 {
+ return;
+ }
+ let toggles = active && self.setting("workbench.activityBar.iconClickBehavior") != "focus";
+ match toggles {
+ true => self.set_part_hidden(Part::SideBar, true, cx),
+ false => {
+ let view = self.generated_container_view(id).expect("a container with a view");
+ self.open_view_container_of(id, view.id, cx);
+ }
+ }
+ }
+
/// The pane of a view drawn outside its own container's code.
pub(super) fn movable_view_pane(&mut self, id: &'static str, window: &mut Window, cx: &mut Context<Self>) -> ViewPane {
match id {
diff --git a/port/fixtures/extensions/activity-bar-containers/todo-tree/package.json b/port/fixtures/extensions/activity-bar-containers/todo-tree/package.json
new file mode 100644
index 00000000000..05a739a07f7
--- /dev/null
+++ b/port/fixtures/extensions/activity-bar-containers/todo-tree/package.json
@@ -0,0 +1,31 @@
+{
+ "name": "todo-tree",
+ "publisher": "Gruntfuggly",
+ "version": "0.0.215",
+ "engines": {
+ "vscode": "^1.46.0"
+ },
+ "activationEvents": [
+ "onStartupFinished"
+ ],
+ "contributes": {
+ "viewsContainers": {
+ "activitybar": [
+ {
+ "id": "todo-tree-container",
+ "title": "%todo-tree.activitybar.title%",
+ "icon": "resources/todo-tree-container.svg"
+ }
+ ]
+ },
+ "views": {
+ "todo-tree-container": [
+ {
+ "id": "todo-tree-view",
+ "name": "%todo-tree.container.name%",
+ "when": "!todo-tree-is-empty"
+ }
+ ]
+ }
+ }
+}
diff --git a/port/fixtures/extensions/activity-bar-containers/todo-tree/package.nls.json b/port/fixtures/extensions/activity-bar-containers/todo-tree/package.nls.json
new file mode 100644
index 00000000000..84e821a7798
--- /dev/null
+++ b/port/fixtures/extensions/activity-bar-containers/todo-tree/package.nls.json
@@ -0,0 +1,4 @@
+{
+ "todo-tree.activitybar.title": "TODOs",
+ "todo-tree.container.name": "TODOs"
+}
diff --git a/port/fixtures/extensions/activity-bar-containers/todo-tree/resources/todo-tree-container.svg b/port/fixtures/extensions/activity-bar-containers/todo-tree/resources/todo-tree-container.svg
new file mode 100755
index 00000000000..e44d00db9a4
--- /dev/null
+++ b/port/fixtures/extensions/activity-bar-containers/todo-tree/resources/todo-tree-container.svg
@@ -0,0 +1,4 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M10.5268 1.22702C9.9895 1.4678 9.2269 2.20732 8.91492 2.79206C8.75894 3.08443 8.58562 3.13603 7.61503 3.08443C6.28048 3.01564 5.50054 3.30801 4.72061 4.18512C4.02733 4.97624 3.76736 6.00813 3.99267 7.00563L4.18332 7.77955L3.35139 8.50188C1.27156 10.3077 1.65287 13.541 4.07933 14.6589C4.56462 14.8996 5.10191 15.0888 5.27523 15.0888C5.43122 15.0888 5.70853 15.364 5.89918 15.6907C6.48846 16.671 8.30831 17.1354 9.48688 16.6023C10.0068 16.3615 10.1455 16.4991 10.4401 17.4794C10.6654 18.3221 10.2321 20.3859 9.50421 21.8305L8.91492 23H12.0347C14.4611 23 15 23 15 23L14.41 21.8305C13.68 20.39 13.6292 19.6979 13.4732 18.4253C13.3865 17.5998 13.4212 17.2386 13.6292 16.8258C13.9065 16.2927 13.9238 16.2927 14.4265 16.5507C15.605 17.1526 17.4769 16.7054 18.1008 15.6907C18.2915 15.364 18.5688 15.0888 18.7248 15.0888C18.8981 15.0888 19.4354 14.8996 19.9207 14.6589C22.3471 13.541 22.7284 10.3077 20.6486 8.50188L19.8167 7.77955L20.0073 7.00563C20.2326 6.00813 19.9727 4.97624 19.2794 4.18512C18.4995 3.30801 17.7195 3.01564 16.4023 3.08443C15.3277 3.13603 15.2757 3.11883 14.9638 2.62008C14.5478 1.93215 13.9238 1.39901 13.3346 1.17543C12.6586 0.917456 11.1507 0.951852 10.5268 1.22702Z" stroke="black" stroke-width="1.5" stroke-linejoin="bevel"/>
+<path d="M7 9.5L10.5 13L16.5 7" stroke="black" stroke-width="1.5"/>
+</svg>
diff --git a/port/fixtures/extensions/activity-bar-containers/vscode-containers/package.json b/port/fixtures/extensions/activity-bar-containers/vscode-containers/package.json
new file mode 100644
index 00000000000..6975498d209
--- /dev/null
+++ b/port/fixtures/extensions/activity-bar-containers/vscode-containers/package.json
@@ -0,0 +1,71 @@
+{
+ "name": "vscode-containers",
+ "publisher": "ms-azuretools",
+ "version": "2.4.5",
+ "engines": {
+ "vscode": "^1.105.0"
+ },
+ "activationEvents": [
+ "onTaskType:docker-build",
+ "onTaskType:docker-run",
+ "onTaskType:docker-compose",
+ "onDebugInitialConfigurations",
+ "onDebugResolve:docker",
+ "onFileSystem:containers",
+ "onLanguage:dockerfile",
+ "onLanguage:dockercompose"
+ ],
+ "contributes": {
+ "viewsContainers": {
+ "activitybar": [
+ {
+ "icon": "resources/ContainerTools.svg",
+ "id": "containersView",
+ "title": "%vscode-containers.views.activityBar%"
+ }
+ ]
+ },
+ "views": {
+ "containersView": [
+ {
+ "id": "vscode-containers.views.containers",
+ "name": "%vscode-containers.views.containers%",
+ "icon": "resources/ContainerTools.svg"
+ },
+ {
+ "id": "vscode-containers.views.images",
+ "name": "%vscode-containers.views.images%",
+ "icon": "resources/ContainerTools.svg"
+ },
+ {
+ "id": "vscode-containers.views.registries",
+ "name": "%vscode-containers.views.registries%",
+ "icon": "resources/ContainerTools.svg"
+ },
+ {
+ "id": "vscode-containers.views.networks",
+ "name": "%vscode-containers.views.networks%",
+ "icon": "resources/ContainerTools.svg",
+ "visibility": "collapsed"
+ },
+ {
+ "id": "vscode-containers.views.volumes",
+ "name": "%vscode-containers.views.volumes%",
+ "icon": "resources/ContainerTools.svg",
+ "visibility": "collapsed"
+ },
+ {
+ "id": "vscode-containers.views.dockerContexts",
+ "name": "%vscode-containers.views.dockerContexts%",
+ "icon": "resources/ContainerTools.svg",
+ "visibility": "collapsed"
+ },
+ {
+ "id": "vscode-containers.views.help",
+ "name": "%vscode-containers.views.help%",
+ "icon": "resources/ContainerTools.svg"
+ }
+ ]
+ }
+ }
+}
diff --git a/port/fixtures/extensions/activity-bar-containers/vscode-containers/package.nls.json b/port/fixtures/extensions/activity-bar-containers/vscode-containers/package.nls.json
new file mode 100644
index 00000000000..35b30c6bbb2
--- /dev/null
+++ b/port/fixtures/extensions/activity-bar-containers/vscode-containers/package.nls.json
@@ -0,0 +1,10 @@
+{
+ "vscode-containers.views.containers": "Containers",
+ "vscode-containers.views.activityBar": "Containers",
+ "vscode-containers.views.images": "Images",
+ "vscode-containers.views.registries": "Registries",
+ "vscode-containers.views.networks": "Networks",
+ "vscode-containers.views.volumes": "Volumes",
+ "vscode-containers.views.dockerContexts": "Docker Contexts",
+ "vscode-containers.views.help": "Help and Feedback"
+}
diff --git a/port/fixtures/extensions/activity-bar-containers/vscode-containers/resources/ContainerTools.svg b/port/fixtures/extensions/activity-bar-containers/vscode-containers/resources/ContainerTools.svg
new file mode 100644
index 00000000000..29473a3a5c0
--- /dev/null
+++ b/port/fixtures/extensions/activity-bar-containers/vscode-containers/resources/ContainerTools.svg
@@ -0,0 +1,3 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M21.908 5.24101L14.909 2.40401C13.999 2.03501 13.001 2.03501 12.091 2.40401L2.092 6.45801C1.429 6.72701 1 7.36301 1 8.08001V17.138C1 17.855 1.429 18.492 2.092 18.76L9.091 21.598C9.546 21.782 10.023 21.874 10.5 21.874C10.977 21.874 11.454 21.781 11.909 21.598L21.908 17.543C22.571 17.273 23 16.638 23 15.922V6.86301C23 6.14701 22.571 5.51001 21.908 5.24101ZM5.25 18.42L2.655 17.368C2.562 17.331 2.5 17.237 2.5 17.137V8.51901L5.25 9.63401V18.42ZM9.75 20.242C9.718 20.231 9.687 20.219 9.655 20.206L6.75 19.028V10.241L9.75 11.457V20.241V20.242ZM3.746 7.40501L12.655 3.79301C13.2 3.57201 13.8 3.57201 14.344 3.79301L20.253 6.18901L10.499 10.143L3.745 7.40501H3.746ZM21.5 15.921C21.5 16.024 21.438 16.114 21.344 16.152L11.345 20.206C11.314 20.219 11.282 20.231 11.25 20.242V11.458L21.5 7.30201V15.921ZM13 17.708V12.159C13 11.955 13.123 11.772 13.312 11.696C13.641 11.563 14 11.805 14 12.159V17.708C14 17.912 13.877 18.095 13.688 18.171C13.359 18.304 13 18.062 13 17.708ZM15 16.897V11.348C15 11.144 15.123 10.961 15.312 10.885C15.641 10.752 16 10.994 16 11.348V16.897C16 17.101 15.877 17.284 15.688 17.36C15.359 17.493 15 17.251 15 16.897ZM19 15.275V9.72601C19 9.52201 19.123 9.33901 19.312 9.26301C19.641 9.13001 20 9.37201 20 9.72601V15.275C20 15.479 19.877 15.662 19.688 15.738C19.359 15.871 19 15.629 19 15.275ZM17 16.086V10.537C17 10.333 17.123 10.15 17.312 10.074C17.641 9.94101 18 10.183 18 10.537V16.086C18 16.29 17.877 16.473 17.688 16.549C17.359 16.682 17 16.44 17 16.086Z" fill="#424242"/>
+</svg>
diff --git a/port/ledger.md b/port/ledger.md
index 7fcfdc82a2d..ef5c591781a 100644
--- a/port/ledger.md
+++ b/port/ledger.md
@@ -359,7 +359,7 @@ One row per upstream unit, generated by `bun port/tools/gen-ledger.ts`; mileston
| workbench/parts/panel | workbench part | M11 | verified | | bottom centered card, view tabs from register_panel_view with the "..." overflow of compositeBar.ts (cargo test -p app workbench::panel::, ui-pair port/results/problems.md), `<view id>.focus` per view, Maximize/Restore, Close, Cmd+J, active view in workspace storage; Problems, Output, Debug Console, Test Results (`hideIfEmpty`) and Terminal views with their title actions (cargo test -p app editor_groups the_output_view_shows_in_the_panel, output_view, the_debug_console_and_test_results_are_panel_views, terminal); part_grid tests, ui-pair port/results/layout.md; no panel position or alignment change, no Views and More Actions menu; verified: ui-pair port/results/problems.md (milestone 11 verification): tabs, "..." overflow and the filter box as the reference; tabs at Chromium's fractional text widths (the Problems tab with its badge was 2px wider: GPUI rounds a text element's width up), the filter in the view below 600px of width (`shouldShowFilterInHeader`) |
| workbench/parts/partGrid | workbench part | M11 | verified | | workbench/layout.rs grid on split_view.rs (splitview.ts priorities, snap, visibility), workbench/part_grid.rs sashes, hidden parts, sizes and visibility in LayoutStateModel storage keys: cargo test -p app layout part_grid split_view (reference geometry at 1024x768, Cmd+B for the next open, sash drag, snap); ui-pair grid steps, port/results/layout.md |
| workbench/parts/sessions | workbench part | | removed | | no sign-in/AI by decision (port/notes.md); not ported |
-| workbench/parts/sidebar | workbench part | M11 | verified | | Explorer and Search; compact activity bar for top and bottom (side_bar.rs), No Folder Opened welcome in an empty window (empty_view.rs); pixel-check (port/results/pixels.md, milestone 3): chevron and label edge pixels only; ui-pair port/results/layout.md; verified: every pair of port/results/windows.md (milestone 11 verification) and port/results/references-view.md |
+| workbench/parts/sidebar | workbench part | M11 | verified | | Explorer and Search; compact activity bar for top and bottom (side_bar.rs) with every container the activity bar shows: built-in, Testing, extensions' `viewsContainers.activitybar` from startup and after an install, and generated ones (cargo test -p app the_top_activity_bar_shows_contributed_containers; it showed the five built-in ones only until then), No Folder Opened welcome in an empty window (empty_view.rs); pixel-check (port/results/pixels.md, milestone 3): chevron and label edge pixels only; ui-pair port/results/layout.md; verified: every pair of port/results/windows.md (milestone 11 verification) and port/results/references-view.md |
| workbench/parts/statusbar | workbench part | M11 | verified | | no-folder and folder colors (problems, bell), no remote indicator (workbench/contrib/remote removed, port/notes.md; cargo test -p app the_status_bar_has_no_remote_indicator), editor items Ln/Col, indentation, encoding, EOL, language with tabular-nums at their shaped widths and their upstream hovers; each item runs its editorStatus.ts command (Go to Line, indentation, encoding, EOL and language pickers: cargo test -p app editor_status); extension entries in statusbarModel.ts order around problems and the editor items (status_entries.rs), and the `status.progress` window progress entry with its spinner; verified: ui-pair messages.json vs the reference (port/results/windows.md, milestone 11 verification): extension entries, warning background, window progress entry, bell |
| workbench/parts/titlebar | workbench part | M9 | verified | | command center with the folder name, nav and layout actions (Customize Layout runs since port/results/manage-menu.md; with the activity bar on top or bottom the title bar's Manage gear opens MenuId.GlobalActivity below it, cargo test -p app manage_menu); a click on the command center opens Quick Open with the Go to File and Show and Run Commands help picks (port/results/command-center.md); drag region as `-webkit-app-region` (empty bar drags and double-click zooms, command center and layout controls no-drag; cargo test -p app title_bar, port/results/command-center.md); context menus of the bar, the title and the command center with the Command Center, Navigation Controls and Layout Controls toggles and the path items (cargo test -p app title_bar); pixel-check file and titlebar (port/results/pixels.md): blending rounding and glyph edges only; the inactive window: `titleBar.inactiveBackground`/`inactiveForeground`, `commandCenter.inactiveBorder`, contents at 0.6 opacity, `modernUI.inactiveShellBackground` (cargo test -p app theme::tests; ui-pair `new-window.json`, port/results/windows.md) |
| workbench/parts/views | workbench part | M11 | verified | | Explorer views as panes (view_panes.rs): collapse by mouse and keys, sashes, header drag to reorder with drop overlay, state in workbench.explorer.views.state; no view actions, view menus or hidden views; cargo test -p app view_panes, ui-pair port/results/layout.md; pane headers drawn statically (workbench.rs section_header): no collapse, resize or view actions; verified: ui-pair port/results/references-view.md and every pair of port/results/windows.md (milestone 11 verification): the Explorer panes and contributed views as the reference; Explorer and Source Control views as panes of a ViewPaneContainer (view_panes.rs `PaneContainer`): collapse by mouse and keys, sashes, header drag to reorder with drop overlay, single view merged into the container, header actions, state in the container's storageId; cargo test -p app view_panes scm_container, ui-pair port/results/layout.md and port/fixtures/ui-pair/m11/scm-panes.json (port/notes.md View panes); verified: ui-pair port/results/references-view.md and every pair of port/results/windows.md (milestone 11 verification): the Explorer panes and contributed views as the reference; Run and Debug, Extensions and webview containers still draw section_header rows: no collapse, resize or view actions; welcome buttons draw their `$(icon)`s (cargo test -p app a_welcome_button_draws_its_label_icons; ui-pair port/fixtures/ui-pair/icons/scm-welcome.json: github's Publish to GitHub button with the github codicon as the reference); wrapped text stacks unsnapped 18.2px lines as Chromium (vendor gpui elements/text.rs; cargo test -p app wrapped_lines_keep_their_fractional_line_height): scm-welcome's Publish button 0.5pt from the reference, was 2.5pt; left: the port wraps "Git" of "To learn more about how to use Git" to the next line; a merged view's "..." puts the Views submenu, a separator and the view's own actions (panecomposite.ts `getSecondaryActions`; cargo test -p app a_merged_changes_view_shows_the_views_submenu_in_its_more_actions a_merged_view_without_actions_lists_the_view_toggles_flat) |