T07b navigation places: nav item and group, navigation menu, back and forward history, table of contents with anchors, go to line; measuring canvases pinned to their parent
This commit is contained in:
21 files changed
+1548
-56
No files matched your search
@@ -1,4 +1,5 @@
|
||||
mod paths;
|
||||
mod places;
|
||||
mod tabs;
|
||||
|
||||
use gpui::{AnyElement, App, IntoElement, ParentElement, Window, div};
|
||||
@@ -10,7 +11,7 @@ pub const PAGE: Page = Page {
|
||||
number: 7,
|
||||
slug: "navigation",
|
||||
title: "Navigation",
|
||||
summary: "Tabs, paths, pages and steps: where you are, and the ways out.",
|
||||
summary: "Tabs, paths, places and palettes: where you are, and the ways out.",
|
||||
render,
|
||||
script: SCRIPT,
|
||||
};
|
||||
@@ -44,6 +45,39 @@ const SCRIPT: &[Step] = &[
|
||||
Step::UpAt("wizard", 531.0, 173.0),
|
||||
Step::Wait(500),
|
||||
Step::Shot("wizard"),
|
||||
Step::DownAt("nav-sidebar", 60.0, 58.0),
|
||||
Step::UpAt("nav-sidebar", 60.0, 58.0),
|
||||
Step::DownAt("nav-sidebar", 266.0, 26.0),
|
||||
Step::UpAt("nav-sidebar", 266.0, 26.0),
|
||||
Step::Wait(500),
|
||||
Step::Shot("nav-folded"),
|
||||
Step::DownAt("nav-sidebar", 28.0, 26.0),
|
||||
Step::UpAt("nav-sidebar", 28.0, 26.0),
|
||||
Step::DownAt("nav-menu", 42.0, 14.0),
|
||||
Step::UpAt("nav-menu", 42.0, 14.0),
|
||||
Step::Wait(300),
|
||||
Step::Shot("nav-menu-open"),
|
||||
Step::Key("right"),
|
||||
Step::Key("down"),
|
||||
Step::Wait(300),
|
||||
Step::Shot("nav-menu-docs"),
|
||||
Step::Key("escape"),
|
||||
Step::DownAt("history", 63.0, 12.0),
|
||||
Step::UpAt("history", 63.0, 12.0),
|
||||
Step::Wait(300),
|
||||
Step::Shot("history-list"),
|
||||
Step::Key("escape"),
|
||||
Step::DownAt("toc", 60.0, 90.0),
|
||||
Step::UpAt("toc", 60.0, 90.0),
|
||||
Step::Wait(500),
|
||||
Step::Shot("toc"),
|
||||
Step::DownAt("goto", 100.0, 14.0),
|
||||
Step::UpAt("goto", 100.0, 14.0),
|
||||
Step::Key("secondary-a"),
|
||||
Step::Type("120:8"),
|
||||
Step::Wait(200),
|
||||
Step::Shot("goto"),
|
||||
Step::Key("enter"),
|
||||
Step::Rest,
|
||||
];
|
||||
|
||||
@@ -54,5 +88,10 @@ fn render(window: &mut Window, cx: &mut App) -> AnyElement {
|
||||
.child(paths::breadcrumb(window, cx))
|
||||
.child(paths::pagination(window, cx))
|
||||
.child(paths::steps(window, cx))
|
||||
.child(places::sidebar(window, cx))
|
||||
.child(places::menu(window, cx))
|
||||
.child(places::history(window, cx))
|
||||
.child(places::contents(window, cx))
|
||||
.child(places::go_to_line(window, cx))
|
||||
.into_any_element()
|
||||
}
|
||||
Reference in new issue
Block a user