Visual Studio Code, rebuilt in Rust
Rust
fix(breadcrumbs): match the pickers' place, rows and icons to the reference
rokartur2a7321cb22e0
diff --git a/README.md b/README.mdindex 5332551c954..873c3a0b835 100644--- a/README.md+++ b/README.md@@ -11,8 +11,8 @@ Coverage of VS Code 1.147.0, from [port/ledger.md](port/ledger.md) (584 rows). V```mermaidpie showData- "verified" : 415- "ported" : 15+ "verified" : 416+ "ported" : 14"removed" : 126"n/a" : 28```@@ -25,13 +25,13 @@ pie showData| MainThread* shape (Rust side) | 58 | 1 | 30 | 0 | `████████████████████ 98%` || workbench service | 59 | 6 | 23 | 7 | `██████████████████░░ 91%` || src/vs/editor/contrib | 54 | 0 | 2 | 1 | `████████████████████ 100%` |-| workbench part | 10 | 1 | 2 | 0 | `██████████████████░░ 91%` |+| workbench part | 11 | 0 | 2 | 0 | `████████████████████ 100%` || extension host seam | 7 | 0 | 0 | 0 | `████████████████████ 100%` || cross-cutting check | 5 | 0 | 0 | 0 | `████████████████████ 100%` || src/vs/editor | 0 | 2 | 1 | 1 | `░░░░░░░░░░░░░░░░░░░░ 0%` || src/vs/base | 0 | 0 | 2 | 3 | `████████████████████ 100%` || port feature | 1 | 0 | 0 | 0 | `████████████████████ 100%` |-| **all** | **415** | **15** | **126** | **28** | `███████████████████░ 97%` |+| **all** | **416** | **14** | **126** | **28** | `███████████████████░ 97%` |<!-- coverage:end -->`removed` are parts left out by decision: AI features, Microsoft services, telemetry, remote and tunnels ([port/notes.md](port/notes.md)). `n/a` are upstream test infrastructure and the Electron process, IPC and DOM layers the native architecture replaces.diff --git a/native/crates/app/src/workbench/breadcrumbs/picker.rs b/native/crates/app/src/workbench/breadcrumbs/picker.rsindex 016e3af954c..841fe434080 100644--- a/native/crates/app/src/workbench/breadcrumbs/picker.rs+++ b/native/crates/app/src/workbench/breadcrumbs/picker.rs@@ -331,6 +331,8 @@ impl Workbench {let max_inner_width = f32::from(viewport.width) - 8.;let width = max_inner_width.min((max_inner_width / 4.17).max(240.));let y = f32::from(item.bottom()) + ARROW_SIZE;+ // contextview.ts `layout`: a point anchor is 2px high, so the view starts 2px below `y`.+ let top = y + 2.;let mut max_height = (f32::from(viewport.height) * 0.7).min(300.);if y + max_height >= f32::from(viewport.height) {// Room for the shadow and the status bar.@@ -358,6 +360,7 @@ impl Workbench {let background = self.color("breadcrumbPicker.background");let tree_focused = picker.focus.is_focused(window);let indent = self.tree_indent();+ let align_icons = self.file_icons.as_ref().is_some_and(|icons| !icons.has_folder_icons());let foreground = self.color("foreground");let icon_foreground = self.foreground_or("icon.foreground");let focus_outline = self.theme.color("list.focusOutline").or(self.theme.color("focusBorder")).filter(|_| tree_focused);@@ -378,6 +381,9 @@ impl Workbench {})),None => div().id(("breadcrumbs-picker-twistie", index)).size(px(16.)),};+ // views.css `align-icons-and-twisties`, which only the file picker's tree gets: a file's twistie collapses+ // to its padding when the icon theme has file icons and no folder icons.+ let collapsed_twistie = matches!(row.target, Target::File(_)) && align_icons;let content = match &row.target {Target::Folder(path, is_root) => {let folder = crate::file_icons::FolderIcon { path, is_root: *is_root, expanded: row.expanded == Some(true) };@@ -389,7 +395,8 @@ impl Workbench {div().flex().items_center().children(icon.map(|icon| icon.mr(px(6.)))).child(file_name(path))}Target::Group(label) => div().child(label.to_string()),- Target::Symbol(element) => self.outline_element_label(element, &[], focused, None).flex().items_center(),+ // The picker's symbol icons are uncolored: symbolIcons.css colors only `.codicon-colored` ones.+ Target::Symbol(element) => self.outline_element_label(element, &[], focused, Some(foreground)).flex().items_center(),};div().id(("breadcrumbs-picker-row", index))@@ -400,13 +407,16 @@ impl Workbench {.flex().items_center().cursor_pointer()- // abstractTree.ts `renderElement`: the twistie's padding-left is the indent of the row's depth.- .pl(px(indent * row.depth as f32))+ // roundedCorners.css: modern UI rounds list rows by `cornerRadius-small`.+ .rounded(px(4.))+ // abstractTree.ts `renderElement`: the twistie's padding-left, `DefaultIndent` (8) and the indent per level.+ .pl(px(8. + indent * row.depth as f32)).hover(|row| row.bg(self.color("list.hoverBackground"))).when_some(focus_background.filter(|_| focused), |row, color| row.bg(color))- .when_some(focus_outline.filter(|_| focused), |row, color| row.child(div().absolute().inset_0().border_1().border_color(color)))- .child(twistie.flex_none().mr(px(6.)))- .child(content.flex_1().min_w_0().overflow_hidden().whitespace_nowrap())+ .when_some(focus_outline.filter(|_| focused), |row, color| row.child(div().absolute().inset_0().rounded(px(4.)).border_1().border_color(color)))+ // tree.css: the twistie is shifted 3px right (`translateX(3px)`) inside its 6px padding-right.+ .when(!collapsed_twistie, |row| row.child(twistie.flex_none().ml(px(3.)).mr(px(3.))))+ .child(content.debug_selector(move || format!("breadcrumbs-picker-row-contents-{index}")).flex_1().min_w_0().overflow_hidden().whitespace_nowrap()).on_click(cx.listener(move |workbench, event: &ClickEvent, window, cx| workbench.breadcrumbs_picker_row_clicked(index, event, window, cx))).into_any_element()})@@ -431,8 +441,10 @@ impl Workbench {.h(px(ARROW_SIZE));let tree = div().id("breadcrumbs-picker-tree")+ .debug_selector(|| "breadcrumbs-picker-tree".into()).track_focus(&picker.focus)- .w(px(width))+ // breadcrumbsPicker.ts `_layout` sets the content-box width; the 1px border is outside it.+ .w(px(width + 2.)).pt(px(2.)).bg(background).rounded(px(3.))@@ -443,7 +455,7 @@ impl Workbench {.text_color(foreground).child(div().id("breadcrumbs-picker-rows").h(px(tree_height)).overflow_y_scroll().track_scroll(&picker.scroll).children(row_elements));let widget = div().occlude().flex().flex_col().child(arrow).child(tree);- Some(deferred(anchored().position(point(px(x), px(y - ARROW_SIZE))).child(widget)).with_priority(1).into_any_element())+ Some(deferred(anchored().position(point(px(x), px(top - ARROW_SIZE))).child(widget)).with_priority(1).into_any_element())}}diff --git a/native/crates/app/src/workbench/breadcrumbs/tests.rs b/native/crates/app/src/workbench/breadcrumbs/tests.rsindex 4d1354fbf27..61aa955c841 100644--- a/native/crates/app/src/workbench/breadcrumbs/tests.rs+++ b/native/crates/app/src/workbench/breadcrumbs/tests.rs@@ -86,6 +86,10 @@ fn focus_and_select_shows_the_outline_picker(cx: &mut TestAppContext) {let (picker, active, _) = state(cx);assert_eq!(picker, Some((2, ids(&["A", "A/run", "A/stop", "B"]), Some(ids(&["A/run"])[0].clone()), true)), "run's picker, A expanded");assert!(active, "a showing picker keeps breadcrumbsActive");+ let tree = cx.debug_bounds("breadcrumbs-picker-tree").unwrap();+ let (scale, class) = workbench.update_in(cx, |workbench, window, _| (window.scale_factor(), workbench.color("symbolIcon.classForeground")));+ let colors: Vec<gpui::Hsla> = cx.read_rendered_frame(|scene, _| scene.monochrome_sprites.iter().filter(|sprite| tree.contains(&sprite.bounds.center().map(|v| gpui::px(v.0 / scale)))).map(|sprite| sprite.color).collect());+ assert!(!colors.is_empty() && !colors.contains(&class.into()), "the picker's symbol icons are uncolored: {colors:?}");cx.simulate_keystrokes("alt-left");assert_eq!(state(cx).0.map(|(item, _, focused, _)| (item, focused)), Some((1, Some(ids(&["A"])[0].clone()))), "focusPreviousWithPicker shows A's picker");@@ -108,7 +112,11 @@ fn a_click_shows_the_file_picker(cx: &mut TestAppContext) {std::fs::write(dir.join("b.txt"), "b\n").unwrap();std::fs::create_dir_all(dir.join("sub")).unwrap();std::fs::create_dir_all(dir.join(".git")).unwrap();- workbench.update(cx, |workbench, _| workbench.load_keybindings(crate::keybindings::default_keybindings(&[]), dir.join("User/keybindings.json")));+ workbench.update(cx, |workbench, _| {+ workbench.load_keybindings(crate::keybindings::default_keybindings(&[]), dir.join("User/keybindings.json"));+ let seti = exthost::scan::scan_extension(&std::path::Path::new(env!("VSCODE_SRC")).join("extensions/theme-seti"), true).unwrap();+ workbench.file_icons = crate::file_icons::FileIconTheme::load(&[seti], "vs-seti").ok();+ });cx.run_until_parked();let file_item = cx.debug_bounds("breadcrumb-item-0").expect("the file item is drawn").center();cx.simulate_click(file_item, gpui::Modifiers::none());@@ -123,6 +131,22 @@ fn a_click_shows_the_file_picker(cx: &mut TestAppContext) {let path = |name: &str| dir.join(name).to_string_lossy().into_owned();assert_eq!(rows(cx), Some((vec![path("sub"), path("a.txt"), path("b.txt")], Some(path("a.txt")), true)), ".git is a files.exclude default");+ // breadcrumbsPicker.ts `_layout`, contextview.ts and roundedCorners.css, measured against the reference with ui-pair:+ // the last item's 8px padding, the picker at the item's left edge, the arrow's 8px and the 2px point anchor, the+ // width plus the 1px border, the border, DefaultIndent and the twistie before a folder's contents, only DefaultIndent+ // before a file's (Seti has no folder icons), and the focused row's rounded outline.+ let item = cx.debug_bounds("breadcrumb-item-0").unwrap();+ let label = cx.debug_bounds("breadcrumb-label-0").unwrap();+ let tree = cx.debug_bounds("breadcrumbs-picker-tree").unwrap();+ let contents = cx.debug_bounds("breadcrumbs-picker-row-contents-0").unwrap();+ let file_contents = cx.debug_bounds("breadcrumbs-picker-row-contents-1").unwrap();+ let viewport = cx.update(|window, _| f32::from(window.viewport_size().width)) - 8.;+ let width = viewport.min((viewport / 4.17).max(240.)) + 2.;+ let (scale, outline) = workbench.update_in(cx, |workbench, window, _| (window.scale_factor(), workbench.theme.color("list.focusOutline").or(workbench.theme.color("focusBorder")).unwrap()));+ let radii: Vec<f32> = cx.read_rendered_frame(|scene, _| scene.quads.iter().filter(|quad| quad.border_color == outline.into() && quad.border_widths.top.0 > 0.).map(|quad| quad.corner_radii.top_left.0 / scale).collect());+ let measured = (item.right() - label.right(), tree.left() - item.left(), tree.top() - item.bottom(), f32::from(tree.size.width).round() == width.round(), contents.left() - tree.left(), file_contents.left() - tree.left(), radii.contains(&4.));+ assert_eq!(measured, (gpui::px(8.), gpui::px(0.), gpui::px(10.), true, gpui::px(1. + 8. + 16. + 6.), gpui::px(1. + 8.), true), "{:?} {width} {radii:?}", tree.size.width);+cx.simulate_keystrokes("escape");assert_eq!(rows(cx), None, "Escape closes the picker");let focused = workbench.update_in(cx, |workbench, window, _| workbench.editor_focus.is_focused(window));diff --git a/native/crates/app/src/workbench/editor_view.rs b/native/crates/app/src/workbench/editor_view.rsindex 51d40d50d93..f279819b9c6 100644--- a/native/crates/app/src/workbench/editor_view.rs+++ b/native/crates/app/src/workbench/editor_view.rs@@ -920,7 +920,7 @@ impl Workbench {let is_focused = focused == Some(index);let is_selected = selected == Some(index);// breadcrumbscontrol.css: the focused or selected item's label is underlined.- let segment = div().when(is_focused || is_selected, |label| label.underline()).child(segment);+ let segment = div().debug_selector(move || format!("breadcrumb-label-{index}")).when(is_focused || is_selected, |label| label.underline()).child(segment);let foreground = match (is_focused, is_selected) {(true, true) => selection_foreground,(true, false) => focus_foreground,@@ -947,8 +947,9 @@ impl Workbench {}},)+ // Pinned to the padding box: without an inset, an absolute child starts after the first item's 16px..absolute()- .size_full(),+ .inset_0(),).on_click(cx.listener(move |workbench, event: &gpui::ClickEvent, window, cx| {if workbench.editors.id != group {@@ -969,7 +970,8 @@ impl Workbench {.child(segment).map(|item| match inline {true => item.when(root_folder, |item| item.child(div().text_size(px(13. * 0.9)).child("\u{a0}\u{2022}\u{a0}"))).when(index == last, |item| item.pr(px(4.))),- false => item.when(index < last, |item| item.child(self.breadcrumb_separator(foreground, hoverable.then_some(focus_foreground)))),+ // editortitlecontrol.css: the last item hides its separator and ends in 8px of padding.+ false => item.when(index < last, |item| item.child(self.breadcrumb_separator(foreground, hoverable.then_some(focus_foreground)))).when(index == last, |item| item.pr(px(8.))),})});div()diff --git a/port/fixtures/ui-pair/m8/breadcrumbs-pickers.json b/port/fixtures/ui-pair/m8/breadcrumbs-pickers.jsonindex f4a5e9950de..aaa50394b1a 100644--- a/port/fixtures/ui-pair/m8/breadcrumbs-pickers.json+++ b/port/fixtures/ui-pair/m8/breadcrumbs-pickers.json@@ -1,16 +1,16 @@[{"wait": 8000},- {"hotkey": ["cmd", "shift", "."]},+ {"hotkey": ["cmd", "shift", "."], "foreground": true},{"wait": 1000},{"shot": "outline-picker"},- {"hotkey": ["option", "left"]},+ {"hotkey": ["option", "left"], "foreground": true},{"wait": 1000},{"shot": "file-picker"},- {"hotkey": ["option", "left"]},+ {"hotkey": ["option", "left"], "foreground": true},{"wait": 1000},{"shot": "folder-picker"},- {"key": "escape"},- {"hotkey": ["cmd", "shift", ";"]},+ {"key": "escape", "foreground": true},+ {"hotkey": ["cmd", "shift", ";"], "foreground": true},{"wait": 500},{"shot": "focused"}]diff --git a/port/ledger.md b/port/ledger.mdindex 84a0b0d1b8d..7aa9f1f1218 100644--- a/port/ledger.md+++ b/port/ledger.md@@ -354,7 +354,7 @@ One row per upstream unit, generated by `bun port/tools/gen-ledger.ts`; mileston| workbench/parts/banner | workbench part | M11 | verified | | workbench/banner.rs (bannerPart.ts): one item by priority, icon, message with ellipsis, link actions, Close Banner; Focus Banner, `bannerFocused`, arrow keys through the links and the close button, Enter and Space on them. `cargo test -p app banner`; verified: ui-pair banner.json vs the reference (port/results/windows.md, milestone 11 verification) || workbench/parts/chat | workbench part | | removed | | no sign-in/AI by decision (port/notes.md); not ported || workbench/parts/dialogs | workbench part | M11 | verified | | workbench/dialog_view.rs custom dialog, used for every message box with `window.dialogStyle: custom` (severity codicons, plain detail); cargo test -p app dialogs; verified: ui-pair dialogs.json `custom-modal` vs the reference (port/results/windows.md, milestone 11 verification): size, buttons in macOS order, Close Dialog; its buttons and Close Dialog are accessibility buttons named by their labels (dialog.ts monaco Buttons, the close action's aria-label): port/tools/update-check pre-release presses "Trust Publisher & Install" through them |-| workbench/parts/editor | workbench part | M8 | ported | [3 M] breadcrumbs pickers against ui-pair port/fixtures/ui-pair/m8/breadcrumbs-pickers.json (`FILE=src/main.ts`): in the GUI Alt+Left from a picker hides it where the reference shows the previous item's (the test passes); the picker has no arrow, sits 4 px high, its symbol icons take the symbol colors (the reference's are the foreground) and its focused row is square; the focused last item's outline is 8 px narrower | breadcrumbs click, file and outline pickers, `focusAndSelect`, `selectFocused`, `focusNext/PreviousWithPicker`, `revealFocusedFromTreeAside`, `toggleToOn` and `breadcrumbs.useQuickPick` (breadcrumbsControl.ts, breadcrumbsPicker.ts: cargo test -p app workbench::breadcrumbs), connected tab strip (preview/pinned, close, split and more actions), a dirty tab still open in another group closes without the save prompt (editorGroupView.ts `isOpenedInOtherGroup`: cargo test -p app the_wait_marker_waits_for_the_dirty_file_to_be_saved), breadcrumbs, text editor with gutter, current line, indent guides, word highlight, overview ruler, click, drag and keyboard selection, typing, undo, clipboard, save and dirty tabs (port/notes.md milestone 5): cargo test -p app editor::tests (91), keys_and_typed_text_edit_the_focused_editor_and_reach_the_host; tab context menu (Close, Close Others, Close to the Right, Close Saved, Close All, Keep Open; port/results/contextmenu.md): cargo test -p app editor_menus (8); `_workbench.open` and `vscode.open` (file, untitled with its path, web link, view columns): cargo test -p app workbench_open (3), `_workbench.diff` with the diff editor: cargo test -p app diff_editor; editor groups and splits (split, move, join, focus, tab drag and drop with editorDropTarget.ts split areas): cargo test -p app editor_groups (11), editor_grid (14); locked scrolling (workbench/scroll_locking.rs): cargo test -p app scroll_locking; editorpart.state restored from workspace storage: cargo test -p app the_grid_and_its_editors_come_back_from_workspace_storage; pixel-check file window (port/results/pixels.md milestone 4); all run at the milestone 20 sweep; one group: connected tab strip (preview/pinned, close, split and more actions drawn), breadcrumbs, text editor with gutter, current line, indent guides, word highlight, overview ruler, click, drag and keyboard selection, typing, undo, clipboard, save and dirty tabs (port/notes.md milestone 5); tab context menu with Close, Close Others, Close to the Right, Close Saved, Close All, Keep Open since milestone 9 (port/results/contextmenu.md, cargo test -p app editor_menus); `_workbench.open` and `vscode.open` open a file, an untitled file with its path or a web link (cargo test -p app workbench_open, port/results/api-tests.md M12 `_workbench.open`), every view column in the one group; no `_workbench.diff` (diff editor); editor groups and splits since milestone 11 (split, move, join, focus, tab drag and drop with editorDropTarget.ts split areas; cargo test -p app editor_groups, editor_grid); no scrolling sync; minimap since milestone 8; cargo test -p app (editor::tests, workbench keys_and_typed_text_edit_the_focused_editor_and_reach_the_host); pixel-check file window (port/results/pixels.md milestone 4, unchanged at milestone 5); editorpart.state: the grid and the groups' file editors restored from workspace storage (cargo test -p app the_grid_and_its_editors_come_back_from_workspace_storage); one group: connected tab strip (preview/pinned, close, split and more actions drawn), breadcrumbs, text editor with gutter, current line, indent guides, word highlight, overview ruler, click, drag and keyboard selection, typing, undo, clipboard, save and dirty tabs (port/notes.md milestone 5); tab context menu with Close, Close Others, Close to the Right, Close Saved, Close All, Keep Open since milestone 9 (port/results/contextmenu.md, cargo test -p app editor_menus); `_workbench.open` and `vscode.open` open a file, an untitled file with its path or a web link (cargo test -p app workbench_open, port/results/api-tests.md M12 `_workbench.open`), every view column in the one group; no `_workbench.diff` (diff editor); editor groups and splits since milestone 11 (split, move, join, focus, tab drag and drop with editorDropTarget.ts split areas; cargo test -p app editor_groups, editor_grid); no scrolling sync; minimap since milestone 8; cargo test -p app (editor::tests, workbench keys_and_typed_text_edit_the_focused_editor_and_reach_the_host); pixel-check file window (port/results/pixels.md milestone 4, unchanged at milestone 5); breadcrumbs editor type picker (editor_type_picker.rs, editorTypePicker.ts) for text and diff editors: Text Diff Editor label, `priority.diffEditor` ranks, `workbench.diffEditorAssociations`, Set Default (Diff Only), Open Original/Modified: cargo test -p app editor_type_picker; ui-pair m12/editor-type.json matches, the menus' width included; the editor title's ... menu (MenuId.EditorTitle with Reopen Editor With, the button's `toolbar.activeBackground` while it shows), the empty group context menu (MenuId.EmptyEditorGroupContext) and the watermark shortcuts: ui-pair m11/editor-menus.json and m11/watermark-tips.json (port/results/auxiliary-windows.md), cargo test -p app editor_menus editor_type_picker; the empty group menu's New Terminal; the Text Editor control at a second start, restored from the `memento/customEditors` profile memento as contributedCustomEditors.ts does (cargo test -p app editor_type_picker custom_editors, ui-pair m12/editor-type-second-start.json); terminal editors (terminalEditorService.ts, terminalEditorInput.ts): Create New Terminal in Editor Area, Move Terminal into Editor Area and into the Panel, the terminal tab's context and title menus, `TabInputKind.TerminalEditorInput` tabs (cargo test -p app terminal_editor, ui-pair m12/terminal-editor.json); terminal editors restored after a restart (terminalEditorSerializer.ts); the terminal tab menus' Change Color, Change Icon, Toggle Size to Content Width and Move Terminal into New Window with the color and icon pickers (cargo test -p app terminal_editor icon_select_box, ui-pair m12/terminal-pickers.json and m12/terminal-tab-list-menu.json, m12/editor-type-second-start.json); `workbench.editor.enablePreview` off opens every editor pinned and Toggle Keep Editors pins the preview editor (cargo test -p app previews_off_pins_every_opened_editor); tab labels keep fractional text widths (vendored GPUI elements/text.rs; cargo test -p app tab_labels_keep, ui-pair icons/seti.json); `workbench.editor.showTabs` per part (editorTitleControl.ts): `single` draws singleEditorTabsControl.ts, the active editor's label 35px high, its breadcrumbs inline with `/` while the group is active, else its `workbench.editor.labelFormat` description, the close or unpin action, the actions at half opacity in an inactive group, `none` only the breadcrumbs row, `editorTabsVisible` (workbench/editor_view.rs `single_editor_tab_title`; cargo test -p app show_tabs_picks_the_title_control_and_zen_mode_enforces_its_own; ui-pair `show-tabs.json` with SETTINGS single and none). `workbench.editor.editorActionsLocation` (titlebarPart.ts `editorActionsEnabled`): `titleBar`, or `default` with `showTabs: none`, draws the editor actions in the title bar before the layout controls with their overflow, Customize Layout moves into it (layoutActions.ts `EditorActionsInTitleBar`), the command center names the active file with its dirty dot, `hidden` draws them nowhere, and titlebarActions.ts `ToggleEditorActions` keeps the hidden location in profile storage; the six Show/Hide Editor Tabs commands (layoutActions.ts `AbstractSetShowTabsAction`) and the Editor Actions Position setters with their Tab Bar and Editor Actions Position submenus in View > Appearance and the tab bar's `EditorTabsBarContext` menu (workbench/editor_view.rs `title_bar_has_editor_actions`, workbench/editor_menus.rs `show_tabs_bar_context_menu`; cargo test -p app show_tabs_none_moves_the_editor_actions_into_the_title_bar the_tab_bar_menu_switches_the_tabs_mode the_editor_actions_toggle_restores_the_hidden_location menubar; ui-pair `show-tabs.json` with SETTINGS none: the title bar's split, close, separator, layout controls and `...` and the command center's main.ts match the reference); breadcrumbs focus mode (workbench/breadcrumbs.rs, breadcrumbsControl.ts): Focus Breadcrumbs focuses the last item, Left and Right move the focus, Space and Cmd+Enter reveal the focused file or symbol, Escape focuses the editor, the focused item underlined in `breadcrumb.focusForeground`, `breadcrumbsActive`: cargo test -p app the_keyboard_focuses_moves_through_and_reveals_the_breadcrumbs |+| workbench/parts/editor | workbench part | M8 | verified | | breadcrumbs click, file and outline pickers, `focusAndSelect`, `selectFocused`, `focusNext/PreviousWithPicker`, `revealFocusedFromTreeAside`, `toggleToOn` and `breadcrumbs.useQuickPick` (breadcrumbsControl.ts, breadcrumbsPicker.ts: cargo test -p app workbench::breadcrumbs; verified: ui-pair m8/breadcrumbs-pickers.json with `FILE=src/main.ts`, the picker's place, arrow, rows and icons and the focused last item match the reference), connected tab strip (preview/pinned, close, split and more actions), a dirty tab still open in another group closes without the save prompt (editorGroupView.ts `isOpenedInOtherGroup`: cargo test -p app the_wait_marker_waits_for_the_dirty_file_to_be_saved), breadcrumbs, text editor with gutter, current line, indent guides, word highlight, overview ruler, click, drag and keyboard selection, typing, undo, clipboard, save and dirty tabs (port/notes.md milestone 5): cargo test -p app editor::tests (91), keys_and_typed_text_edit_the_focused_editor_and_reach_the_host; tab context menu (Close, Close Others, Close to the Right, Close Saved, Close All, Keep Open; port/results/contextmenu.md): cargo test -p app editor_menus (8); `_workbench.open` and `vscode.open` (file, untitled with its path, web link, view columns): cargo test -p app workbench_open (3), `_workbench.diff` with the diff editor: cargo test -p app diff_editor; editor groups and splits (split, move, join, focus, tab drag and drop with editorDropTarget.ts split areas): cargo test -p app editor_groups (11), editor_grid (14); locked scrolling (workbench/scroll_locking.rs): cargo test -p app scroll_locking; editorpart.state restored from workspace storage: cargo test -p app the_grid_and_its_editors_come_back_from_workspace_storage; pixel-check file window (port/results/pixels.md milestone 4); all run at the milestone 20 sweep; one group: connected tab strip (preview/pinned, close, split and more actions drawn), breadcrumbs, text editor with gutter, current line, indent guides, word highlight, overview ruler, click, drag and keyboard selection, typing, undo, clipboard, save and dirty tabs (port/notes.md milestone 5); tab context menu with Close, Close Others, Close to the Right, Close Saved, Close All, Keep Open since milestone 9 (port/results/contextmenu.md, cargo test -p app editor_menus); `_workbench.open` and `vscode.open` open a file, an untitled file with its path or a web link (cargo test -p app workbench_open, port/results/api-tests.md M12 `_workbench.open`), every view column in the one group; no `_workbench.diff` (diff editor); editor groups and splits since milestone 11 (split, move, join, focus, tab drag and drop with editorDropTarget.ts split areas; cargo test -p app editor_groups, editor_grid); no scrolling sync; minimap since milestone 8; cargo test -p app (editor::tests, workbench keys_and_typed_text_edit_the_focused_editor_and_reach_the_host); pixel-check file window (port/results/pixels.md milestone 4, unchanged at milestone 5); editorpart.state: the grid and the groups' file editors restored from workspace storage (cargo test -p app the_grid_and_its_editors_come_back_from_workspace_storage); one group: connected tab strip (preview/pinned, close, split and more actions drawn), breadcrumbs, text editor with gutter, current line, indent guides, word highlight, overview ruler, click, drag and keyboard selection, typing, undo, clipboard, save and dirty tabs (port/notes.md milestone 5); tab context menu with Close, Close Others, Close to the Right, Close Saved, Close All, Keep Open since milestone 9 (port/results/contextmenu.md, cargo test -p app editor_menus); `_workbench.open` and `vscode.open` open a file, an untitled file with its path or a web link (cargo test -p app workbench_open, port/results/api-tests.md M12 `_workbench.open`), every view column in the one group; no `_workbench.diff` (diff editor); editor groups and splits since milestone 11 (split, move, join, focus, tab drag and drop with editorDropTarget.ts split areas; cargo test -p app editor_groups, editor_grid); no scrolling sync; minimap since milestone 8; cargo test -p app (editor::tests, workbench keys_and_typed_text_edit_the_focused_editor_and_reach_the_host); pixel-check file window (port/results/pixels.md milestone 4, unchanged at milestone 5); breadcrumbs editor type picker (editor_type_picker.rs, editorTypePicker.ts) for text and diff editors: Text Diff Editor label, `priority.diffEditor` ranks, `workbench.diffEditorAssociations`, Set Default (Diff Only), Open Original/Modified: cargo test -p app editor_type_picker; ui-pair m12/editor-type.json matches, the menus' width included; the editor title's ... menu (MenuId.EditorTitle with Reopen Editor With, the button's `toolbar.activeBackground` while it shows), the empty group context menu (MenuId.EmptyEditorGroupContext) and the watermark shortcuts: ui-pair m11/editor-menus.json and m11/watermark-tips.json (port/results/auxiliary-windows.md), cargo test -p app editor_menus editor_type_picker; the empty group menu's New Terminal; the Text Editor control at a second start, restored from the `memento/customEditors` profile memento as contributedCustomEditors.ts does (cargo test -p app editor_type_picker custom_editors, ui-pair m12/editor-type-second-start.json); terminal editors (terminalEditorService.ts, terminalEditorInput.ts): Create New Terminal in Editor Area, Move Terminal into Editor Area and into the Panel, the terminal tab's context and title menus, `TabInputKind.TerminalEditorInput` tabs (cargo test -p app terminal_editor, ui-pair m12/terminal-editor.json); terminal editors restored after a restart (terminalEditorSerializer.ts); the terminal tab menus' Change Color, Change Icon, Toggle Size to Content Width and Move Terminal into New Window with the color and icon pickers (cargo test -p app terminal_editor icon_select_box, ui-pair m12/terminal-pickers.json and m12/terminal-tab-list-menu.json, m12/editor-type-second-start.json); `workbench.editor.enablePreview` off opens every editor pinned and Toggle Keep Editors pins the preview editor (cargo test -p app previews_off_pins_every_opened_editor); tab labels keep fractional text widths (vendored GPUI elements/text.rs; cargo test -p app tab_labels_keep, ui-pair icons/seti.json); `workbench.editor.showTabs` per part (editorTitleControl.ts): `single` draws singleEditorTabsControl.ts, the active editor's label 35px high, its breadcrumbs inline with `/` while the group is active, else its `workbench.editor.labelFormat` description, the close or unpin action, the actions at half opacity in an inactive group, `none` only the breadcrumbs row, `editorTabsVisible` (workbench/editor_view.rs `single_editor_tab_title`; cargo test -p app show_tabs_picks_the_title_control_and_zen_mode_enforces_its_own; ui-pair `show-tabs.json` with SETTINGS single and none). `workbench.editor.editorActionsLocation` (titlebarPart.ts `editorActionsEnabled`): `titleBar`, or `default` with `showTabs: none`, draws the editor actions in the title bar before the layout controls with their overflow, Customize Layout moves into it (layoutActions.ts `EditorActionsInTitleBar`), the command center names the active file with its dirty dot, `hidden` draws them nowhere, and titlebarActions.ts `ToggleEditorActions` keeps the hidden location in profile storage; the six Show/Hide Editor Tabs commands (layoutActions.ts `AbstractSetShowTabsAction`) and the Editor Actions Position setters with their Tab Bar and Editor Actions Position submenus in View > Appearance and the tab bar's `EditorTabsBarContext` menu (workbench/editor_view.rs `title_bar_has_editor_actions`, workbench/editor_menus.rs `show_tabs_bar_context_menu`; cargo test -p app show_tabs_none_moves_the_editor_actions_into_the_title_bar the_tab_bar_menu_switches_the_tabs_mode the_editor_actions_toggle_restores_the_hidden_location menubar; ui-pair `show-tabs.json` with SETTINGS none: the title bar's split, close, separator, layout controls and `...` and the command center's main.ts match the reference); breadcrumbs focus mode (workbench/breadcrumbs.rs, breadcrumbsControl.ts): Focus Breadcrumbs focuses the last item, Left and Right move the focus, Space and Cmd+Enter reveal the focused file or symbol, Escape focuses the editor, the focused item underlined in `breadcrumb.focusForeground`, `breadcrumbsActive`: cargo test -p app the_keyboard_focuses_moves_through_and_reveals_the_breadcrumbs || workbench/parts/notifications | workbench part | M11 | verified | | workbench/notifications_view.rs: toasts (3 at most, purge 10/12/15s unless sticky, focused or hovered, spam protection), notifications center (Clear All, Do Not Disturb menu with per-source filters, Hide), rows with expand, collapse, clear, More Actions, buttons, links, Copy Text, double-click toggle; status bar bell states and tooltips; notificationsCommands.ts commands and context keys; geometry from the reference DOM (port/tools/ref-dom); cargo test -p app notifications_view; `workbench.notifications.position` (bottom right, bottom left, top right with the title bar bell); no toast animation, no screen reader announcements; verified: ui-pair messages.json `center`, `progress` vs the reference (port/results/windows.md, milestone 11 verification) || 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 |diff --git a/port/notes.md b/port/notes.mdindex c3fd441bf48..9a201a8cb75 100644--- a/port/notes.md+++ b/port/notes.md@@ -529,6 +529,7 @@ Done when (first item): api-tests `vscode API - editors` passes as in the refere- Find options widget (`workbench/find_options_widget.rs`, findOptionsWidget.ts, findInput.ts `highlightFindOptions`): with the find widget hidden, a change of the effective regex, whole word or case option (a toggle command, a toggle in the widget, a multi-cursor session's overrides) or a multi-cursor search over the find options (multicursor.ts `_highlightFindOptions`, each next match not taken from the word under the cursor, and Select All Occurrences) shows the three toggles at the editor's top right, 10px down, for 2 s, kept while hovered; with it shown, the search flashes the find input's options for 100 ms (white at 0.44 in dark themes, yellow at 0.8 in light ones). Test: `cargo test -p app find_options`. Not compared against the reference with ui-pair.- Open from the milestone: find/replace (with the multi-cursor find commands).- Handoff (branch `port-m8c-textfiles`, after smooth scrolling 76aa3a4e036): section 8 rows left, in order. (1) Content hover placement fixed in 12f25cf492d (`_findPositionPreference` had compared the space with the clipped height); ui-pair `/tmp/m8uni` now shows the hover below line 1 as the reference. Left for editor/contrib/hover: the port's widget is 748 px wide where the reference's is 712, and inline code spans lack the reference's padded background. `editor/contrib/unicodeHighlighter` stays ported only for workspace trust (milestone 12); `editor/browser` only for the diff editor (milestone 14). The word wrap pair matched (the 1 device px sliver after `dog, ` is in the reference too). (2) Checks not yet run: api-tests `MOCHA_GREP="vscode API - editors"`, `"vscode API - window"`, `"vscode API - workspace"` for MainThreadDocuments/TextEditors; pixel-check `WINDOWS=folded`; ui-pair of the find options widget (Cmd+D twice on an empty cursor, Alt+Cmd+C with the widget hidden) and of `editor.smoothScrolling` (frames mid-animation). (3) Rows waiting on other milestones: `mainthread/MainThreadEditorTabs`, `mainthread/MainThreadTextEditors` view columns and `workbench/parts/editor` splits (milestone 11); `editor/contrib/stickyScroll` go to definition and `outlineModel`, `editor/contrib/smartSelect` SelectionRangeProvider, `editor/contrib/contextmenu` Refactor..., `workbench/services/textfile` Format on Save, `editor/contrib/editorState` (milestone 13); `editor/contrib/unicodeHighlighter` workspace trust (milestone 12). (4) Open work in milestone 8: `platform/undoRedo` resource elements and undo groups; `workbench/services/workingCopy` working copies and history entries following moves; `workbench/services/textfile` the save conflict Compare editor and `files.autoGuessEncoding`; `workbench/contrib/codeEditor` emptyTextEditorHint, menuPreventer, editorSettingsMigration, inspectKeybindings, dictation (selectionClipboard is Linux only: n/a); `editor/common` stub items; the `editor.renderControlCharacters: false` width of bidi characters. Done since the last handoff: floating menu (26eb26eaacd), find options widget and multicursor verified (fc6bbfa0fed), smooth scrolling (76aa3a4e036).+- Breadcrumbs pickers against ui-pair m8/breadcrumbs-pickers.json: the GUI's Alt+Left "hid the picker" because cua-driver's background hotkey activates the port window and then deactivates it; the picker closes on window blur, as the reference does (ref-dom: `document.hasFocus()` false and no `.monaco-breadcrumbs-picker` after another app activates), so the fixture sends its keys in front. The picker sits 2px below the arrow (contextview.ts point anchor of height 2), its tree is the content width plus the 1px border, rows are rounded 4px (roundedCorners.css), a row's twistie starts after `DefaultIndent` 8px and is shifted 3px (tree.css), and in the file picker a file's twistie collapses with Seti (views.css `align-icons-and-twisties`, set only by `BreadcrumbsFilePicker._createTree`); outline picker icons are uncolored. The first item's anchor covers its 16px padding and the last item ends in 8px (editortitlecontrol.css). cargo test -p app workbench::breadcrumbs.## Milestone 13: language features (in progress)