mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-17 15:26:12 +00:00
Merge pull request #8040 from dotCooCoo/feat/help-search-commands-first
Help: Search Commands… is the first Help menu item
This commit is contained in:
@@ -61,6 +61,32 @@ fn file_ends_with_exit() {
|
||||
assert!(matches!(last, Item::Cmd("Exit", "app.quit", _)), "{last:?}");
|
||||
}
|
||||
|
||||
/// Help starts with Search Commands…, the command search's own command, showing its shortcut,
|
||||
/// then a separator; the menus list it once.
|
||||
#[test]
|
||||
fn help_starts_with_search_commands() {
|
||||
let app = VectorcraftApp::new(vectorcraft_engine::Session::new(), crate::Services::default());
|
||||
let tree = menu_tree();
|
||||
let (_, help) = tree.iter().find(|(t, _)| *t == "Help").unwrap();
|
||||
assert!(matches!(help[0], Item::Cmd("Search Commands…", "help.commandPalette", _)), "{:?}", help[0]);
|
||||
assert!(matches!(help[1], Item::Sep), "{:?}", help[1]);
|
||||
let Some(Entry::Item(row)) = entry(&app, &help[0]) else { panic!("Search Commands… is not shown") };
|
||||
assert!(row.enabled);
|
||||
assert_eq!(row.shortcut, shortcut_of("help.commandPalette"));
|
||||
assert!(row.shortcut.is_some(), "the search's shortcut shows next to the item");
|
||||
fn count(items: &[Item]) -> usize {
|
||||
items
|
||||
.iter()
|
||||
.map(|it| match it {
|
||||
Item::Cmd(_, "help.commandPalette", _) => 1,
|
||||
Item::Sub(_, children) => count(children),
|
||||
_ => 0,
|
||||
})
|
||||
.sum()
|
||||
}
|
||||
assert_eq!(tree.iter().map(|(_, items)| count(items)).sum::<usize>(), 1);
|
||||
}
|
||||
|
||||
/// No application menu in the window (as in Illustrator): the bar starts at File.
|
||||
#[test]
|
||||
fn the_bar_starts_at_file() {
|
||||
|
||||
@@ -738,12 +738,13 @@ pub fn menu_tree_named(english_names: bool) -> Vec<(&'static str, Vec<Item>)> {
|
||||
(
|
||||
"Help",
|
||||
vec![
|
||||
c("Search Commands…", "help.commandPalette"),
|
||||
Sep,
|
||||
c("Join Our Discord", "help.discord"),
|
||||
c("ArtCraft Website", "help.website"),
|
||||
c("VectorCraft on getartcraft.com", "help.appPage"),
|
||||
c("VectorCraft on GitHub", "help.github"),
|
||||
Sep,
|
||||
c("Search Commands…", "help.commandPalette"),
|
||||
todos("VectorCraft Help…", "F1"),
|
||||
c("Safe Mode…", "help.safeMode"),
|
||||
c("Copy Troubleshooting Info", "help.copyTroubleshootingInfo"),
|
||||
|
||||
@@ -210,6 +210,19 @@ fn the_window_menu_has_the_system_items() {
|
||||
assert_eq!(Standard::Zoom.label(), "Zoom");
|
||||
}
|
||||
|
||||
/// The Mac Help menu keeps Search Commands… first among VectorCraft's items, with its shortcut,
|
||||
/// then a separator.
|
||||
#[test]
|
||||
fn the_mac_help_menu_starts_with_search_commands() {
|
||||
let bar = bar(&app(true));
|
||||
let help = &bar.menu(MenuRole::Help).unwrap().children;
|
||||
assert_eq!(ids(help)[..2], ["help.commandPalette".to_string(), "---".into()]);
|
||||
let search = find(&bar, "help.commandPalette");
|
||||
assert_eq!(search.label, "Search Commands…");
|
||||
assert_eq!(search.shortcut, menus::shortcut_of("help.commandPalette"));
|
||||
assert!(search.shortcut.is_some());
|
||||
}
|
||||
|
||||
/// A system key a command already has stays the command's: the system item goes without. The
|
||||
/// user's shortcuts show in the menus.
|
||||
#[test]
|
||||
|
||||
@@ -1038,6 +1038,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
- Perspective Distort and Free Distort (`object.distort`) turn each warped object's bounding box as the warp turns the object at its own center, the objects inside groups, compound paths and clip groups and the art of linked opacity masks included, so the next Selection or Free Transform drag uses the tilted box; Object › Transform › Reset Bounding Box squares it again, and corners left where they are add no undo step (VectorCraft's own rule; `bboxrotate::distort_turns_an_upright_box_with_the_warp_at_its_center`, `distort_turns_each_member_and_linked_mask_by_its_own_warp`, `mirrored_and_collapsing_distorts_keep_valid_angles`, `distort_angles_undo_redo_and_reopen_together`, `xform::unchanged_distort_records_no_history`).
|
||||
- The Free Transform widget's Constrain works in Free Distort as well as in Free Transform ([the help page](https://helpx.adobe.com/illustrator/using/tool-techniques/free-transform-tool.html)). With Constrain on, or Shift held, a corner dragged in Free Distort moves only along the line through the opposite corner, in the box's own proportions, and the other three corners stay in place; on a turned box the line runs through the box's own corners. The line is VectorCraft's own rule. Cmd/Ctrl+Alt+Shift on a corner still drags in Perspective Distort, where Constrain stays unavailable (tools `xform::free::tests::free_distort_corner_keeps_to_its_diagonal_with_shift_or_constrain`, `shift_pressed_during_a_free_distort_drag_constrains_it`, `a_turned_box_is_constrained_along_its_own_diagonal`, `along_diagonal_of_a_degenerate_box`; engine `xform::free_transform_constrained_distort_keeps_the_corner_on_its_diagonal`; ui-egui `free_transform::tests::the_widget_sets_the_mode_and_a_corner_drag_then_distorts`).
|
||||
- Native macOS menu bar, vector tool cursors, a command palette (Help › Search Commands…), middle-button panning with any tool. Native menus explicitly end tracking on command selection, outside window presses and Escape; menu updates wait until tracking ends, and a dismissing press never starts a canvas gesture (M14.8).
|
||||
- Help › Search Commands… is the first item of the Help menu in the window, with its shortcut and a separator after it; in the native macOS menu bar it is the first item below the system's search field. This is VectorCraft's own order and does not raise a score (`menus::tests::help_starts_with_search_commands`, `tests::nativemenu::the_mac_help_menu_starts_with_search_commands`).
|
||||
- A Recent Commands button beside the Help › Search Commands field lists the last five commands, tools, panels and effects picked from the palette, most recent first, with a command picked again moved to the top. Choosing a row closes the palette and runs it as a pick of the same result does; with no picks yet the list shows a dimmed No recent commands row, and a command that is not available now, such as a filter of a plug-in that is not loaded, is left out until it comes back. The ids are saved with the UI state. While the list is open, Up and Down move through its rows, wrapping at the ends, and Escape closes the list before the palette. This is VectorCraft's own addition and does not raise a score (#6376; `palette` tests `recent_commands_*`, `a_recent_command_runs_what_its_pick_runs`, `the_keys_wrap_within_recent_commands`, `escape_closes_recent_commands_before_the_palette`).
|
||||
- The Learn panel (Window › Learn, or Explore tutorials beside the search icon on the app bar) has a For you tab with a Get started section and a Quick skill guide card, and a Skills tab that lists VectorCraft's own skills with their progress rings and counts of tutorials finished; a skill lists its tutorials, a tutorial shows its numbered steps, and Back goes up a level; `learn.list`, `learn.tab {tab}`, `learn.skill {skill}`, `learn.show {tutorial}` and `learn.back` script it, and the tab buttons, the rows and Back run them ([the help page](https://helpx.adobe.com/illustrator/desktop/get-started/learn-the-basics/learn-skills-quick-skill-guide.html); `panels::learn::tests`).
|
||||
- A tool's name in a Learn tutorial step is a blue link that shows where the tool is without choosing it (`learn.locateTool {tool}`): its toolbar button is marked, a collapsed group's flyout opens with the tool's row marked, a torn-off strip comes to the front, and a tool no shown toolbar holds is marked in the All Tools drawer. The mark, its 3 seconds and the hidden-toolbar cases are VectorCraft's own rules ([the help page](https://helpx.adobe.com/illustrator/desktop/get-started/learn-the-basics/learn-skills-quick-skill-guide.html); `panels::learn::tests`, the `a_learn_link_*` tests in `toolbar::tests`).
|
||||
|
||||
Reference in New Issue
Block a user