Skip to content

Beacons, checklists & tour lists

Not all guidance should take over the screen. A beacon marks something worth a look and, pressed, opens a hint, starts a tour or runs your code; a checklist shows a new user what is left to do; a tour list lets anyone find a tour again, on purpose. All three render on the page itself, use the same engine, store and theme as the tours, and need nothing more than the BonboardingRoot already in the layout.

Beacons

A beacon is a small pulsing dot on an element. Press one: the dot on Import opens a hint, the one on the usage panel under the product starts a tour, and the one on the account button runs a handler of the page's own.

Live
Active projects
12
Usage this month
68%
Team members
7

Usage this month

68% of the plan's allowance. Resets on the 1st.

Each beacon follows its element as the page scrolls or the layout changes, positioned in the browser with no call into .NET per frame. It hides while its element is missing, hidden or scrolled out of sight, and while any other tour runs (HideWhileTourRuns, on by default). Pressed, a beacon does one of three things:

  • The one on Import opens a hint: one step on its element, with no overlay and no focus trap. It has an Id, so the hint is remembered like a one-step tour: once read, the beacon is gone for good, even after a reload.
  • The one on the usage panel starts a tour, and goes once that tour is completed or dismissed (KeepAfterClosed keeps it). Press Hide the usage tile and the beacon goes with the panel it sits on.
  • The one on the account button runs a handler of yours (OnClick). It has no Id, so it always shows. Pick its Position above: a corner, an edge or the centre of its element, with Start and End mirrored in a right-to-left page; OffsetX and OffsetY nudge it.

A beacon is a real button with a 24-pixel touch target, named by its Label (then its Title), that says when its hint or tour is open. Bring the beacons back forgets the hint's and the tour's records.

@* A hint: one non-modal step on its element. With an Id, it goes for good once read. *@
<BonboardingBeacon Id="import-hint"
                   Anchor="import"
                   Title="Import is here"
                   Description="Bring projects in from a CSV file." />

@* A tour: it goes once the tour is completed or dismissed, unless KeepAfterClosed="true". *@
<BonboardingBeacon Anchor="usage-detail"
                   Position="BonboardingBeaconPosition.TopStart"
                   Tour="UsageTour"
                   Label="Take the usage tour" />

@* Anything else. Without an Id it always shows. *@
<BonboardingBeacon Anchor="account"
                   Position="BonboardingBeaconPosition.TopEnd"
                   OffsetX="0" OffsetY="0"
                   Label="What's new"
                   OnClick="OpenChangelog" />

await BonboardingService.ResetAsync("import-hint");   // brings a read hint back

An onboarding checklist

A checklist shows a new user the handful of things worth doing, and ticks each one off as it gets done. An item is done when any of its sources says so: the first when its tour is completed (pressing it starts the tour), the second when the application raises a signal (type in the box), the third while a condition holds. Progress is stored next to the tours' records, so it survives a reload - and follows in another tab.

  • Tick Show the administrator's task and a fourth item appears: its When lists it only for administrators. It has a Route, so pressing it goes to the settings page - and that page ticks it off with SetChecklistItemAsync, which works from anywhere, checklist on screen or not.
  • Tick the search task off and Untick it call SetChecklistItemAsync directly, the way your own code would.
  • When the last task is done, OnCompleted runs; with Hide when complete on, the checklist goes away at that moment. The close button (Dismissible) hides it for good, until it is reset.
new BonboardingChecklistDefinition
{
    Id = "demo-getting-started",
    Title = "Get started",
    Items =
    {
        // Done once its tour is completed; pressing the item starts the tour.
        new() { Id = "tour", Title = "Take the project tour", Tour = ProjectTour },
        // Done, for good, when the application raises the signal while the checklist is on screen.
        new() { Id = "search", Title = "Search for a project", CompleteOnSignal = "searched" },
        // Done while a condition holds - call RefreshAsync() when what it reads changes.
        new() { Id = "notifications", Title = "Turn on notifications", IsComplete = _ => ValueTask.FromResult(settings.Notify) },
        // Listed only for administrators; pressing it goes somewhere.
        new() { Id = "api-keys", Title = "Review your API keys", Route = "workspace/settings", When = _ => ValueTask.FromResult(user.IsAdmin) },
    },
}

<BonboardingChecklist Checklist="GettingStarted" Dismissible="true" HideWhenComplete="false" OnCompleted="Celebrate" />

// Anywhere in the application, checklist on screen or not:
await BonboardingService.SetChecklistItemAsync("demo-getting-started", "api-keys");          // done
await BonboardingService.SetChecklistItemAsync("demo-getting-started", "search", false);     // not done after all
await BonboardingService.SignalAsync("searched");
await BonboardingService.ResetChecklistAsync("demo-getting-started");                        // ticks and dismissal

Tasks that wait for others, and optional ones

Inviting the team only makes sense once there is a project to invite them to, so that task DependsOn the first: until it is done it is locked - no button, a dashed ring, and a line saying what to do first. Picking a theme is Optional: tagged as such, and left out of the progress, so the checklist is complete without it.

Dismissing a checklist takes away the button that had focus, and only the application knows where focus belongs next. Here OnDismissed moves it to the button that brings the checklist back.

Items =
{
    new() { Id = "project", Title = "Create a project", CompleteOnSignal = "project-created" },
    // Locked until "project" is done: no button, and "Do first: Create a project" under it.
    new() { Id = "invite", Title = "Invite your team", DependsOn = ["project"], OnClick = InviteAsync },
    // Tagged "Optional", and left out of the progress.
    new() { Id = "theme", Title = "Pick a theme", Optional = true, OnClick = PickThemeAsync },
}

<BonboardingChecklist Checklist="Tasks" Dismissible="true" OnDismissed="() => restoreButton.FocusAsync()" />

// In a unit test: duplicate ids, unknown prerequisites, circles.
Assert.IsEmpty(Tasks.Validate());

A list of tours

The entry point of a help menu or resource centre: the tours, where the user stands with each - new, in progress or completed - and a button to Start, Resume or Replay it. A replay starts from the first step; anything else resumes. The list follows the tours' progress as it changes, a reset included; a button is disabled while its tour runs, and each one's accessible name includes the tour's title, so a screen reader hears "Start Reading your usage" rather than "Start" three times.

Given no Tours, it lists every registered tour. A tour declared in markup is registered only while its page is on screen, so register the ones a help menu should always offer with IBonboardingService.Register. The multi-page tour listed here is the one on the workspace page - leave it part way and this list offers to resume it.

<BonboardingTourList Title="Guided tours" />                       @* every registered tour, by title *@

<BonboardingTourList Tours="[UsageTour, ProjectTour, WorkspaceTour.Create()]"
                     Title="Guided tours"
                     HideCompleted="true">
    <EmptyContent>You have taken every tour.</EmptyContent>
</BonboardingTourList>

@* ItemTemplate replaces each row; item.Tour, item.Progress (New, InProgress, Completed),
   item.IsRunning and item.StartAsync are what the default row is made of. *@

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.

An unhandled error has occurred. Reload 🗙