Skip to content

components/onboarding/scenarios#

orderedScenarios()#

function orderedScenarios(selected, teaching): Scenario[];

Orders chosen outcomes first without removing the others.

Parameters#

Parameter Type
selected string[]
teaching boolean

Returns#

Scenario[]


scenarioPins()#

function scenarioPins(
   selected, 
   teaching, 
   limit?, 
   available?): PageOptions[];

The pages to pin in the modern top bar for someone who said what they do. Each outcome's pages are merged by priority (every outcome's first, then every second, and so on), duplicates dropped, cut at limit and shown in work-loop order. Every other page stays one menu away.

Parameters#

Parameter Type Description
selected string[] The chosen scenario ids, in the order chosen.
teaching boolean Whether teaching features are on; teaching outcomes are ignored when off.
limit? number The most pages to pin.
available? (page) => boolean Whether a page exists in this build; defaults to all pages.

Returns#

PageOptions[]

The pages to pin; the default set when no known outcome is chosen.


DEFAULT_ONBOARDING_PINS#

const DEFAULT_ONBOARDING_PINS: PageOptions[];

What is pinned when no known outcome is chosen.


ONBOARDING_PIN_CAP#

const ONBOARDING_PIN_CAP: 5 = 5;

The most pages onboarding pins in the top bar.


SCENARIOS#

const SCENARIOS: Scenario[];

GuidedTask#

Properties#

id#

id: GuidedAction;

page#

page: PageOptions;

Scenario#

Properties#

id#

id: ScenarioId;

pages#

pages: PageOptions[];

pins#

pins: PageOptions[];

The pages that matter most to this outcome, most important first; what the top bar pins.

tasks#

tasks: GuidedTask[];

teaching?#

optional teaching?: boolean;

GuidedAction#

type GuidedAction = 
  | "describeSample"
  | "connect"
  | "start"
  | "load"
  | "phase"
  | "quantify"
  | "solve"
  | "schedule"
  | "runSchedule"
  | "inspectJobs"
  | "saveReport"
  | "requestReview"
  | "inspectReviews"
  | "openLearn";

ScenarioId#

type ScenarioId = 
  | "acquire"
  | "spectrum"
  | "quantify"
  | "automate"
  | "structure"
  | "review"
  | "teach"
  | "relax";