Onboarding · Flows and highlights: wizard, hotspot, highlight, setup checklist
OnboardingWizard runs a first run on navigation::Wizard without its numbered steps: "Step 2 of 4" over a bar in as many parts, the step's title, line and content, Back and Next once ready, Finish last, and Skip for now. Hotspot pulses on a dot that opens a tip on a press or Enter, with Got it. FeatureHighlight names something new under a New badge, with Try it and Not now, and rises in. SetupChecklist counts first things to do in words and a bar, offers Start on each left, eases a check in as one gets done, and offers Hide once all are. navigation::Wizard now keys its buttons, steps and motion by its own id and takes on_step and on_finish at render, failing loud without them.
This commit is contained in:
1 parent
c68e3229bb
commit
eea99b8e41
16 files changed
+1288
-27
No files matched your search
@@ -6,6 +6,7 @@ mod files;
|
||||
mod generative;
|
||||
mod media;
|
||||
mod messaging;
|
||||
mod onboarding;
|
||||
mod palette;
|
||||
mod project;
|
||||
mod tokens;
|
||||
@@ -23,6 +24,7 @@ pub use files::FileSizes;
|
||||
pub use generative::GenerativeSizes;
|
||||
pub use media::MediaSizes;
|
||||
pub use messaging::MessagingSizes;
|
||||
pub use onboarding::OnboardingSizes;
|
||||
pub use palette::{HUE_NAMES, Mix, Palette, Syntax};
|
||||
pub use project::ProjectSizes;
|
||||
pub use tokens::{
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
use gpui::Rems;
|
||||
|
||||
use super::{Theme, tokens::px_to_rems};
|
||||
|
||||
/// Onboarding's measures.
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub struct OnboardingSizes {
|
||||
/// A hotspot's dot, wide; its rings reach twice that.
|
||||
pub hotspot: Rems,
|
||||
}
|
||||
|
||||
impl Theme {
|
||||
pub fn onboarding(&self) -> OnboardingSizes {
|
||||
OnboardingSizes {
|
||||
hotspot: px_to_rems(10.0),
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user