Skip to content

Visual Studio Code, rebuilt in Rust

Rust

feat(scm): draw inline submenus with their contributed icon

rokartur6271fcb1d486
diff --git a/native/crates/app/src/main.rs b/native/crates/app/src/main.rs
index 232e48b7e33..3c39ad0db2f 100644
--- a/native/crates/app/src/main.rs
+++ b/native/crates/app/src/main.rs
@@ -552,6 +552,7 @@ pub(crate) fn open_window(request: WindowRequest, cx: &mut App) -> anyhow::Resul
workbench.set_command_palette_menu(command_palette::menu(&extensions));
workbench.menus.extend(menus::extension_menus(&extensions));
workbench.command_icons = menus::command_icons(&extensions);
+ workbench.submenu_icons = menus::submenu_icons(&extensions);
workbench.status_entries = main_thread_status_bar::static_entries(&extensions);
workbench.file_icons = file_icons;
workbench.product_icons = product_icons::settings_product_icons(&extensions, &settings.lock().unwrap());
diff --git a/native/crates/app/src/menus.rs b/native/crates/app/src/menus.rs
index 7108c9dab1b..ecf64bc7736 100644
--- a/native/crates/app/src/menus.rs
+++ b/native/crates/app/src/menus.rs
@@ -16,7 +16,7 @@ use crate::command_palette::locale_compare;
use crate::contextkey::{Context, Expr};
use crate::notifications::Severity;
-#[derive(Clone, Copy, Debug, PartialEq, Eq)]
+#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[allow(clippy::enum_variant_names, reason = "upstream MenuId names")]
pub enum MenuId {
MenubarMainMenu,
@@ -937,23 +937,33 @@ pub fn command_icons(extensions: &[ScannedExtension]) -> std::collections::HashM
};
for command in commands {
let Some(id) = command["command"].as_str() else { continue };
- let icon = match &command["icon"] {
- Value::String(icon) => match icon.strip_prefix("$(").and_then(|icon| icon.strip_suffix(')')) {
- Some(codicon) => CommandIcon::Codicon(codicon.to_string()),
- None => CommandIcon::Image(extension.location.join(icon), extension.location.join(icon)),
- },
- Value::Object(paths) => {
- let path = |key: &str| extension.location.join(paths.get(key).and_then(Value::as_str).unwrap_or_default());
- CommandIcon::Image(path("light"), path("dark"))
- }
- _ => continue,
- };
+ let Some(icon) = contributed_icon(extension, &command["icon"]) else { continue };
icons.insert(id.to_string(), icon);
}
}
icons
}
+/// menusExtensionPoint.ts: a contributed submenu's `icon`, which its menu items show in toolbars.
+pub fn submenu_icons(extensions: &[ScannedExtension]) -> std::collections::HashMap<MenuId, CommandIcon> {
+ contributed_submenus(extensions).into_iter().filter_map(|(_, submenu, _, icon)| Some((submenu, icon?))).collect()
+}
+
+/// A contributed command's or submenu's `icon`: `$(codicon)`, a path for both themes, or `{ light, dark }` paths.
+fn contributed_icon(extension: &ScannedExtension, icon: &Value) -> Option<CommandIcon> {
+ match icon {
+ Value::String(icon) => match icon.strip_prefix("$(").and_then(|icon| icon.strip_suffix(')')) {
+ Some(codicon) => Some(CommandIcon::Codicon(codicon.to_string())),
+ None => Some(CommandIcon::Image(extension.location.join(icon), extension.location.join(icon))),
+ },
+ Value::Object(paths) => {
+ let path = |key: &str| extension.location.join(paths.get(key).and_then(Value::as_str).unwrap_or_default());
+ Some(CommandIcon::Image(path("light"), path("dark")))
+ }
+ _ => None,
+ }
+}
+
/// A command's icon in a toolbar (`ICommandAction.icon`).
#[derive(Clone, Debug, PartialEq)]
pub enum CommandIcon {
@@ -994,7 +1004,7 @@ pub fn extension_menus(extensions: &[ScannedExtension]) -> Vec<MenuItem> {
message(Severity::Error, format!("{key} is a proposed menu identifier. It requires 'package.json#enabledApiProposals: [\"{proposal}\"]' and is only available when running out of dev or with the following command line switch: --enable-proposed-api {}", extension.id));
continue;
}
- let Some(menu) = api_menu.or_else(|| submenus.iter().find(|(id, ..)| id == key).map(|(_, menu, _)| *menu)) else { continue };
+ let Some(menu) = api_menu.or_else(|| submenus.iter().find(|(id, ..)| id == key).map(|(_, menu, ..)| *menu)) else { continue };
for entry in entries {
let (entry_value, title) = match entry["command"].as_str() {
Some(id) => {
@@ -1011,7 +1021,7 @@ pub fn extension_menus(extensions: &[ScannedExtension]) -> Vec<MenuItem> {
continue;
}
let submenu_id = entry["submenu"].as_str().expect("checked by menu_item_reject");
- let Some((_, submenu, label)) = submenus.iter().find(|(id, ..)| id == submenu_id) else {
+ let Some((_, submenu, label, _)) = submenus.iter().find(|(id, ..)| id == submenu_id) else {
message(Severity::Error, format!("Menu item references a submenu `{submenu_id}` which is not defined in the 'submenus' section."));
continue;
};
@@ -1032,10 +1042,9 @@ pub fn extension_menus(extensions: &[ScannedExtension]) -> Vec<MenuItem> {
items
}
-/// `contributes.submenus`: id, menu id and label; the first registration of an id wins. Icons are not kept: they
-/// show in toolbars (`editor/title`, view titles), which the port has no menus for yet.
-fn contributed_submenus(extensions: &[ScannedExtension]) -> Vec<(String, MenuId, String)> {
- let mut submenus: Vec<(String, MenuId, String)> = Vec::new();
+/// `contributes.submenus`: id, menu id, label and icon; the first registration of an id wins.
+fn contributed_submenus(extensions: &[ScannedExtension]) -> Vec<(String, MenuId, String, Option<CommandIcon>)> {
+ let mut submenus: Vec<(String, MenuId, String, Option<CommandIcon>)> = Vec::new();
for extension in extensions {
let message = |severity, text: String| crate::perf::extension_point_message(&extension.id, severity, text);
for submenu in extension.description["contributes"]["submenus"].as_array().into_iter().flatten() {
@@ -1063,7 +1072,7 @@ fn contributed_submenus(extensions: &[ScannedExtension]) -> Vec<(String, MenuId,
message(Severity::Warning, "`` is not a valid submenu label".into());
continue;
}
- submenus.push((id.to_string(), MenuId::Api(submenus.len()), label.to_string()));
+ submenus.push((id.to_string(), MenuId::Api(submenus.len()), label.to_string(), contributed_icon(extension, &submenu["icon"])));
}
}
submenus
diff --git a/native/crates/app/src/menus/tests.rs b/native/crates/app/src/menus/tests.rs
index e51585dda6f..070f5fc33be 100644
--- a/native/crates/app/src/menus/tests.rs
+++ b/native/crates/app/src/menus/tests.rs
@@ -212,19 +212,20 @@ fn extension_submenus() {
"a",
json!({
"commands": [{ "command": "a.one", "title": "One" }],
- "submenus": [{ "id": "a.more", "label": "More" }, { "id": "a.blank", "label": "" }],
+ "submenus": [{ "id": "a.more", "label": "More", "icon": "$(plus)" }, { "id": "a.blank", "label": "" }],
"menus": {
"editor/context": [{ "submenu": "a.more", "group": "1_more" }, { "submenu": "a.more" }, { "submenu": "a.blank" }],
"a.more": [{ "command": "a.one" }]
}
}),
),
- extension("b", json!({ "submenus": [{ "id": "a.more", "label": "Again" }] })),
+ extension("b", json!({ "submenus": [{ "id": "a.more", "label": "Again", "icon": "$(gear)" }] })),
];
let items = extension_menus(&extensions);
let actions = menu_actions(&items, MenuId::EditorContext, &no_context());
let one = MenuAction::Command { id: "a.one".into(), title: "One".into(), enabled: true, checked: false, alt: None };
assert_eq!(actions, [MenuAction::Submenu { title: "More".into(), actions: vec![one], checked: false }]);
+ assert_eq!(submenu_icons(&extensions), [(MenuId::Api(0), CommandIcon::Codicon("plus".into()))].into());
}
/// menusExtensionPoint.ts, the `submenus` and `menus` handlers: what they skip is a message of the extension.
diff --git a/native/crates/app/src/workbench.rs b/native/crates/app/src/workbench.rs
index 6d872cad2d3..b162fa91e59 100644
--- a/native/crates/app/src/workbench.rs
+++ b/native/crates/app/src/workbench.rs
@@ -488,6 +488,7 @@ pub struct Workbench {
pub(crate) github_clients: crate::main_thread_github::GitHubClients,
/// `contributes.commands` icons, for the view toolbars.
pub command_icons: HashMap<String, crate::menus::CommandIcon>,
+ pub submenu_icons: HashMap<crate::menus::MenuId, crate::menus::CommandIcon>,
webview_views: webview_views::WebviewViews,
pub extensions_viewlet: extensions_view::ExtensionsViewlet,
pub extension_editors: Vec<extension_editor::ExtensionEditor>,
@@ -841,6 +842,7 @@ impl Workbench {
quick_diffs: Default::default(),
github_clients: Default::default(),
command_icons: HashMap::new(),
+ submenu_icons: HashMap::new(),
webview_views: Default::default(),
extensions_viewlet: extensions_view::ExtensionsViewlet::new(cx),
extension_editors: Vec::new(),
diff --git a/native/crates/app/src/workbench/editor_view.rs b/native/crates/app/src/workbench/editor_view.rs
index b92c8821458..0382ea3549f 100644
--- a/native/crates/app/src/workbench/editor_view.rs
+++ b/native/crates/app/src/workbench/editor_view.rs
@@ -428,7 +428,7 @@ impl Workbench {
}
// layoutActions.ts: the only workbench submenu here, with its `Codicon.gear` icon.
crate::menus::Entry::Submenu { submenu: submenu @ crate::menus::MenuId::NotebookEditorLayoutConfigure, .. } => {
- let button = self.submenu_button(*submenu, "gear", item.title.clone(), foreground, cx);
+ let button = self.submenu_button(*submenu, Some(&crate::menus::CommandIcon::Codicon("gear".into())), item.title.clone(), context.clone(), Vec::new(), foreground, cx);
actions.push((item.order, self.title_action(bar, &actions.len().to_string(), button, cx)));
}
crate::menus::Entry::Submenu { .. } => {}
@@ -438,25 +438,6 @@ impl Workbench {
actions.into_iter().map(|(_, element)| element).collect()
}
- /// A title icon whose dropdown shows `submenu` below it (WorkbenchToolBar's `SubmenuItemAction` dropdown).
- fn submenu_button(&self, submenu: crate::menus::MenuId, icon: &str, title: String, foreground: Rgba, cx: &mut Context<Self>) -> gpui::Stateful<Div> {
- let bounds = Rc::new(Cell::new(Bounds::default()));
- let measured = bounds.clone();
- self.icon(icon, 22., 16., foreground)
- .id(gpui::SharedString::from(format!("submenu-button-{submenu:?}")))
- .rounded(px(4.))
- .cursor_pointer()
- .hover(|icon| icon.bg(self.color("toolbar.hoverBackground")))
- .on_click(cx.listener(move |workbench, _: &gpui::ClickEvent, window, cx| {
- cx.stop_propagation();
- let context = workbench.key_context(window);
- let actions = crate::menus::menu_actions(&workbench.menus, submenu, &context);
- workbench.show_context_menu_actions(actions, &context, bounds.get(), Vec::new(), window, cx);
- }))
- .child(canvas(move |element_bounds, _, _| measured.set(element_bounds), |_, _, _, _| {}).absolute().size_full())
- .child(self.hover_target(gpui::SharedString::from(format!("submenu-button-hover-{submenu:?}")), super::hover::HoverContent::Text(title), super::hover::HoverOptions::mouse()))
- }
-
/// `--modern-ui-connected-tab-strip-background` (connectedEditorTabs.ts): the connected tabs background,
/// else the tabs background, else the editor's.
pub(super) fn tab_strip_background(&self) -> Rgba {
diff --git a/native/crates/app/src/workbench/extension_management.rs b/native/crates/app/src/workbench/extension_management.rs
index d8e8552d8b1..7501c2c5867 100644
--- a/native/crates/app/src/workbench/extension_management.rs
+++ b/native/crates/app/src/workbench/extension_management.rs
@@ -282,6 +282,7 @@ impl Workbench {
self.menus = crate::menus::workbench_menus();
self.menus.extend(crate::menus::extension_menus(&running));
self.command_icons = crate::menus::command_icons(&running);
+ self.submenu_icons = crate::menus::submenu_icons(&running);
self.set_default_keybindings(crate::keybindings::default_keybindings(&running));
if let Some(file) = self.keybindings.user_file.clone() {
self.set_user_keybindings(crate::keybindings::user_keybindings(&file));
diff --git a/native/crates/app/src/workbench/scm_actions/tests.rs b/native/crates/app/src/workbench/scm_actions/tests.rs
index 078ff49549f..46375a3f165 100644
--- a/native/crates/app/src/workbench/scm_actions/tests.rs
+++ b/native/crates/app/src/workbench/scm_actions/tests.rs
@@ -208,6 +208,34 @@ fn a_merged_changes_view_shows_the_views_submenu_in_its_more_actions(cx: &mut Te
assert!(matches!(&menu[2], MenuAction::Command { id, .. } if id == "workbench.scm.action.setListViewMode"), "{menu:?}");
}
+/// menuEntryActionViewItem.ts `SubmenuEntryActionViewItem`: a submenu in an inline group draws its icon, which opens
+/// the submenu with the toolbar's arguments (git's `git.repositories.stash`, `$(plus)`).
+#[gpui::test]
+fn an_inline_submenu_opens_with_the_toolbar_arguments(cx: &mut TestAppContext) {
+ use crate::menus::{Entry, MenuItem};
+ let (workbench, _receiver, cx) = workbench_in("scm-inline-submenu", cx);
+ cx.simulate_resize(gpui::size(gpui::px(1024.), gpui::px(768.)));
+ request(&workbench, cx, "$registerSourceControl", register(0, "/w/repo"));
+ workbench.update_in(cx, |workbench, window, cx| {
+ let submenu = MenuId::Api(0);
+ let item = |menu, entry, title: &str, group: &str| MenuItem { menu, entry, title: title.into(), group: group.into(), order: 0., when: None };
+ workbench.menus.push(item(MenuId::ScmTitle, Entry::Submenu { submenu, toggled: None }, "Stash", "navigation"));
+ workbench.menus.push(item(submenu, Entry::Command { id: "git.stash".into(), precondition: None, toggled: None, alt: None }, "Stash", ""));
+ workbench.submenu_icons.insert(submenu, crate::menus::CommandIcon::Codicon("plus".into()));
+ drop(workbench.execute_command("workbench.view.scm", Vec::new(), window, cx));
+ workbench.set_part_hidden(crate::workbench::layout::Part::SideBar, false, cx);
+ });
+ cx.run_until_parked();
+ let button = cx.debug_bounds("submenu-button-Api(0)").expect("the submenu draws in the title").center();
+ cx.simulate_click(button, gpui::Modifiers::none());
+ cx.run_until_parked();
+ workbench.read_with(cx, |workbench, _| {
+ let menu = workbench.context_menu.as_ref().expect("the submenu opens");
+ assert!(matches!(&menu.levels[0].actions[..], [MenuAction::Command { id, .. }] if id == "git.stash"), "{:?}", menu.levels[0].actions);
+ assert_eq!(menu.args, [json!({ "$mid": 5, "handle": 0 })]);
+ });
+}
+
#[gpui::test]
fn ref_changes_refresh_the_graph_or_mark_it_outdated_when_scrolled(cx: &mut TestAppContext) {
let (workbench, _receiver, cx) = workbench_in("scm-graph-ref-changes", cx);
diff --git a/native/crates/app/src/workbench/scm_view.rs b/native/crates/app/src/workbench/scm_view.rs
index ed455353a5f..a7acf56c587 100644
--- a/native/crates/app/src/workbench/scm_view.rs
+++ b/native/crates/app/src/workbench/scm_view.rs
@@ -1055,16 +1055,15 @@ impl Workbench {
let primary = if matches!(menu, MenuId::ScmTitle | MenuId::ScmSourceControlTitle | MenuId::ViewTitle) { "navigation" } else { "inline" };
let mut items: Vec<&crate::menus::MenuItem> = self.menus.iter().filter(|item| item.menu == menu && item.group == primary && item.when.as_ref().is_none_or(|when| when.evaluate(context))).collect();
items.sort_by(|a, b| a.order.total_cmp(&b.order).then_with(|| a.title.cmp(&b.title)));
- let commands: Vec<(String, String)> = items
- .into_iter()
- .filter_map(|item| match &item.entry {
- crate::menus::Entry::Command { id, .. } => Some((id.clone(), item.title.clone())),
- crate::menus::Entry::Submenu { .. } => None,
- })
- .collect();
let mut buttons = div().flex().items_center();
- for (id, title) in commands {
- let button = self.command_button(&id, title, args.clone(), foreground, cx);
+ for item in items {
+ let (id, button) = match &item.entry {
+ crate::menus::Entry::Command { id, .. } => (id.clone(), self.command_button(id, item.title.clone(), args.clone(), foreground, cx)),
+ crate::menus::Entry::Submenu { submenu, .. } => {
+ let button = self.submenu_button(*submenu, self.submenu_icons.get(submenu), item.title.clone(), context.clone(), args.clone(), foreground, cx);
+ (format!("{submenu:?}"), button)
+ }
+ };
buttons = buttons.child(match bar {
Some(bar) => self.action_bar_item(bar, &id, button, cx),
None => button,
@@ -1073,16 +1072,43 @@ impl Workbench {
buttons
}
- /// A menu command as a toolbar button (`MenuEntryActionViewItem`): its icon, else its title, with its hover.
- pub(in crate::workbench) fn command_button(&self, id: &str, title: String, args: Vec<Value>, foreground: Rgba, cx: &mut Context<Self>) -> gpui::Stateful<Div> {
- let icon = match self.command_icons.get(id) {
+ /// A command's or submenu's icon in a toolbar: its codicon or image, else its title.
+ fn command_icon(&self, icon: Option<&CommandIcon>, title: &str, foreground: Rgba) -> Div {
+ match icon {
Some(CommandIcon::Codicon(name)) => self.icon(name, 22., 16., foreground),
Some(CommandIcon::Image(light, dark)) => {
let path = if self.theme.kind == crate::theme::ThemeKind::Light { light } else { dark };
div().size(px(22.)).flex().items_center().justify_center().child(img(path.clone()).size(px(16.)))
}
- None => div().px(px(4.)).child(title.clone()),
- };
+ None => div().px(px(4.)).child(title.to_string()),
+ }
+ }
+
+ /// A submenu as a toolbar button (`SubmenuEntryActionViewItem`): its icon opens the submenu below it, whose
+ /// commands get `args`.
+ pub(in crate::workbench) fn submenu_button(&self, submenu: MenuId, icon: Option<&CommandIcon>, title: String, context: HashMap<String, Value>, args: Vec<Value>, foreground: Rgba, cx: &mut Context<Self>) -> gpui::Stateful<Div> {
+ let bounds = std::rc::Rc::new(std::cell::Cell::new(Bounds::default()));
+ let measured = bounds.clone();
+ let key = format!("{submenu:?}-{}", args.first().map(Value::to_string).unwrap_or_default());
+ self.command_icon(icon, &title, foreground)
+ .id(gpui::SharedString::from(format!("submenu-button-{key}")))
+ .debug_selector(move || format!("submenu-button-{submenu:?}"))
+ .rounded(px(4.))
+ .cursor_pointer()
+ .hover(|icon| icon.bg(self.color("toolbar.hoverBackground")))
+ .on_mouse_down(MouseButton::Left, stop_action_mouse_down)
+ .on_click(cx.listener(move |workbench, _: &ClickEvent, window, cx| {
+ cx.stop_propagation();
+ let actions = crate::menus::menu_actions(&workbench.menus, submenu, &context);
+ workbench.show_context_menu_actions(actions, &context, bounds.get(), args.clone(), window, cx);
+ }))
+ .child(gpui::canvas(move |element_bounds, _, _| measured.set(element_bounds), |_, _, _, _| {}).absolute().size_full())
+ .child(self.hover_target(gpui::SharedString::from(format!("submenu-button-hover-{key}")), HoverContent::Text(title), HoverOptions::action_item()))
+ }
+
+ /// A menu command as a toolbar button (`MenuEntryActionViewItem`): its icon, else its title, with its hover.
+ pub(in crate::workbench) fn command_button(&self, id: &str, title: String, args: Vec<Value>, foreground: Rgba, cx: &mut Context<Self>) -> gpui::Stateful<Div> {
+ let icon = self.command_icon(self.command_icons.get(id), &title, foreground);
let command = id.to_string();
icon.id(gpui::SharedString::from(format!("command-button-{id}-{}", args.first().map(Value::to_string).unwrap_or_default())))
.rounded(px(4.))
diff --git a/port/ledger.md b/port/ledger.md
index d096e830343..aa1bea6fc07 100644
--- a/port/ledger.md
+++ b/port/ledger.md
@@ -529,7 +529,7 @@ One row per upstream unit, generated by `bun port/tools/gen-ledger.ts`; mileston
| workbench/contrib/remoteTunnel | workbench contribution | | removed | | no sign-in/AI by decision (port/notes.md); not ported |
| workbench/contrib/replNotebook | workbench contribution | M17 | verified | | verified (session m17d): cargo test -p app repl; ui-pair m17/interactive-restart.json with replPair.open repl (executed, restored, executed again, status bar) matches (/tmp/m17f); repl_notebook.rs: `$tryShowNotebookDocument` with view type `repl` (ReplEditorInput: one editor per notebook, `ensureInputBoxCell`, `REPL - N` label or `asRepl` label, scratchpad close without asking, soft revert on dispose, tab kind 4 `jupyter-notebook` editor `repl`, `debug-line-by-line` icon), the last cell as the input box under the list of the others (interactive.rs draws and runs both), `repl.execute` (insert before the input), `repl.input.focus`, `repl.focusLastItemExecuted`, `mostRecentReplEditor`, editors delta `viewType: repl`: cargo test -p app repl_notebook, ui-pair m17/interactive-window.json (replPair.open repl). The REPL editor comes back after a reload (ReplEditorSerializer `workbench.editorinputs.replEditorInput`, notebooks.rs). REPL hot exit (ReplWindowWorkingCopyEditorHandler: `notebook/<type>/repl` backups, a REPL editor opened on the restored notebook): cargo test -p app a_repl_backup_opens_a_repl_editor. Not done: the status bar while the REPL input has the focus (reference: `LF` only, then `Spaces: 4 LF Cell 1 of 1`; port: `Ln 1, Col 1 Spaces: 4 LF`), ui-pair m17/interactive-window.json (replPair.open repl) |
| workbench/contrib/sash | workbench contribution | M11 | verified | | `workbench.sash.size` (editor group sashes 4..20, their highlight 1..8; the part grid's sashes are its 4px gaps) and `workbench.sash.hoverDelay` on every sash (part grid, view panes, editor groups, find widget, keybindings table), three-dot grippers on the part sashes with `workbench.sash.autoHideGrippers` and its delay (part_grid.rs); cargo test -p app part_grid; verified: ui-pair hot-exit.json `sash` vs the reference (port/results/windows.md, milestone 11 verification) |
-| workbench/contrib/scm | workbench contribution | M14 | ported | [3 S] scm_repositories_view.rs:415: the Repositories rows lack the reference's 4px pane inset, the tree's indent guides and the repository row's `...` for its menu's secondary actions <br> [3 S] scm_view.rs:1062: inline submenus are not drawn (git's Stash submenu on the Stashes artifact group) <br> [3 M] scm_view.rs:114, :742: headers as view_panes panes; labels.ts shorten | SCM view: input box, action button, groups, resources with decorations, inline and title actions, activity badge, status bar commands (workbench/scm_view.rs); quick diff gutter and peek (quick_diff.rs, quick_diff_widget.rs), multiple repositories, tree view mode and sort (scm_tree.rs), Graph view (scm_history.rs, scm_graph_view.rs) with its history item ref picker and filters (scm_graph_view/ref_picker.rs; ui-pair m11/scm-graph-refs.json), view actions (scm_actions.rs), editor commands run from the resource row: cargo test -p app scm; Graph subjects draw their `$(icon)`s (cargo test -p app a_subject_draws_its_icons); Repositories view with selection modes, sort keys, nested repositories and explorer mode's artifact groups, folders and artifacts with their menus (scm_repositories_view.rs; cargo test -p app the_repositories_ explorer_mode_), its Shift+click range and list keys (cargo test -p app the_repositories_tree_takes_shift_clicks_and_keys), Escape and `list.toggleSelection` (cargo test -p app escape_and_toggle_selection_leave_the_shown_repositories), the lone repository's expansion and `scm.repositoriesViewState` (cargo test -p app lone_repository), the shown repositories and sort key across sessions (cargo test -p app the_shown_repositories_come_back_with_their_sort_key) |
+| workbench/contrib/scm | workbench contribution | M14 | ported | [3 S] scm_repositories_view.rs:415: the Repositories rows lack the reference's 4px pane inset, the tree's indent guides and the repository row's `...` for its menu's secondary actions <br> [3 M] scm_view.rs:114, :742: headers as view_panes panes; labels.ts shorten | SCM view: input box, action button, groups, resources with decorations, inline and title actions, activity badge, status bar commands (workbench/scm_view.rs); quick diff gutter and peek (quick_diff.rs, quick_diff_widget.rs), multiple repositories, tree view mode and sort (scm_tree.rs), Graph view (scm_history.rs, scm_graph_view.rs) with its history item ref picker and filters (scm_graph_view/ref_picker.rs; ui-pair m11/scm-graph-refs.json), view actions (scm_actions.rs), editor commands run from the resource row: cargo test -p app scm; Graph subjects draw their `$(icon)`s (cargo test -p app a_subject_draws_its_icons); Repositories view with selection modes, sort keys, nested repositories and explorer mode's artifact groups, folders and artifacts with their menus (scm_repositories_view.rs; cargo test -p app the_repositories_ explorer_mode_), its Shift+click range and list keys (cargo test -p app the_repositories_tree_takes_shift_clicks_and_keys), Escape and `list.toggleSelection` (cargo test -p app escape_and_toggle_selection_leave_the_shown_repositories), the lone repository's expansion and `scm.repositoriesViewState` (cargo test -p app lone_repository), the shown repositories and sort key across sessions (cargo test -p app the_shown_repositories_come_back_with_their_sort_key), inline submenus with their contributed icon (cargo test -p app an_inline_submenu_opens_with_the_toolbar_arguments extension_submenus) |
| workbench/contrib/screenshotTool | workbench contribution | | removed | | Artur: internal infrastructure or developer tool with no 1:1 counterpart in the native port |
| workbench/contrib/scrollLocking | workbench contribution | M14 | verified | | workbench/scroll_locking.rs: Toggle and Hold Locked Scrolling and the prominent `status.scrollLockingEnabled` entry: cargo test -p app scroll_locking; a locked wheel scroll moves every other visible editor as far from its position when tracked (`onDidEditorPaneScroll`; cargo test -p app a_locked_scroll_moves_every_other_visible_editor); Hold locks while its key is down and unlocks on the key up (keybindingService.ts `enableKeybindingHoldMode`; cargo test -p app a_held_key_locks_scrolling_until_it_goes_up); without a focused element Hold toggles, as the key up reaches the workbench through the focus path |
| workbench/contrib/search | workbench contribution | M12 | verified | | Search view (workbench/search_view.rs, search_actions.rs) and its model (search_model.rs): cargo test -p app search_model (searchResult, fileMatch and replace tests) and workbench::search_actions (context menu, input history, hover right click, the replace preview opened and updated with the replace string), port/tools/ui-pair frames match the reference in dark, light and hc (port/notes.md milestone 12); anythingQuickAccess.ts file picks: cargo test -p app anything_quick_access quick_open. No notebook or AI results; Find in Folder from the Explorer (cargo test -p app find_in_folder; ui-pair m12/find-in-folder.json with `search.mode` newEditor matches); ui-pair m12/search-replace.json (query, Replace input, preview) matches; the message words at their exact widths, so "2 results in 2 files - Open in editor" fits one line as in the reference (cargo test -p app the_message_words_take_their_exact_width; pair: same box, 408 device px wide) |