Skip to content

feat: Guided Tours Framework (Navigating the Editor)#2299

Draft
camielvs wants to merge 1 commit into
05-28-feat_save_and_resume_paused_toursfrom
05-20-feat_learning_hub_tour_framework_and_first_tour
Draft

feat: Guided Tours Framework (Navigating the Editor)#2299
camielvs wants to merge 1 commit into
05-28-feat_save_and_resume_paused_toursfrom
05-20-feat_learning_hub_tour_framework_and_first_tour

Conversation

@camielvs

@camielvs camielvs commented May 21, 2026

Copy link
Copy Markdown
Collaborator

Description

The editor-side tour bridge and the interaction vocabulary it implements. A single component detects tour-step interactions in the editor and reports their completion to the shared tour-progress state; step advancement is gated by the custom navigation (gated "Next" / auto-advance live in #2340). Sufficient to power the first tour, Navigating the Editor (#2306).

The framework foundation (route, provider, popover, hub UI) lives in #2348. This PR replaces the empty EditorTourBridge stub with its implementation and moves the interaction vocabulary onto TourStep.

Interaction vocabulary (registry.ts)

TourStep declares the interaction union and its target fields here (moved down from the foundation so the types live alongside the bridge that implements them):

  • interaction: "select-task" | "undock-window" | "redock-window"
  • targetWindowId — which dock window an undock/redock step targets
  • targetWindowName — friendly window name used in the checklist label
  • fallbackContent

Architecture

EditorTourBridge (src/routes/v2/pages/Editor/components/EditorTourBridge.tsx)

Reads the current step from useTour(). When the step declares an interaction, the bridge wires a listener that — instead of advancing the tour itself — marks the step complete in the shared TourProgressContext. The popover's gated "Next" then enables and the framework auto-advances after a short beat (#2340). Three interactions:

  • select-task — completes when the user clicks an element under [data-tour-node="task"] (a stable selector, not React Flow's CSS class).
  • undock-window — completes when a docked panel matching targetWindowId is dragged out of its dock area.
  • redock-window — completes when a floating window matching targetWindowId is dropped back into a dock.

Helpers

  • followWindowPosition — keeps the spotlight tracking a floating panel as the user drags it (throttled to one resize-event dispatch per animation frame).
  • trackDockStateTransition — baselines window dockState at step start and fires when a baselined window crosses the undock/redock transition.

Already-satisfied on entry

If the prompted state already holds when the step lands (e.g. the target window is already floating), the step is marked complete immediately — its checklist row shows pre-checked and "Next" is enabled — rather than forcing the user to perform an action they've effectively already done.

Checklist labels

Adds the checklist copy for these interactions (the contextual bold-target support comes from #2340):

  • select-task → "Select the highlighted task"
  • undock-window → "Drag the {targetWindowName} panel out of its dock"
  • redock-window → "Dock the {targetWindowName} panel back into place"

Each falls back to a generic phrasing when the target field isn't set.

Related Issue and Pull requests

Progresses https://github.com/Shopify/oasis-frontend/issues/583

Builds on #2348 (foundation) and #2340 (custom navigation + gating). First consumer is #2306. #2347 adds more interaction types on top.

Type of Change

  • New feature

Checklist

  • I have tested this does not break current pipelines / runs functionality
  • I have tested the changes on staging

Test Instructions

No visible behavior on its own — test with #2306 on top, walking the Navigating the Editor tour:

  • Interactive steps show a checklist row + a disabled "Next". Completing the action ticks the row and the tour auto-advances after a short delay (or click "Next" to go immediately).
  • select-task (step 7) — clicking the Greet task body completes it; clicking its IO ports does not.
  • undock-window / redock-window (steps 9–10) — dragging Task Properties out / back completes the step; the checklist reads "Drag the Task Properties panel out of its dock".
  • Already-satisfied — enter the undock step with Task Properties already floating → the step opens pre-completed ("Next" enabled) instead of requiring a drag.
  • Walking back via Prev to a completed step leaves it complete (no re-gating).

camielvs commented May 21, 2026

Copy link
Copy Markdown
Collaborator Author

@camielvs camielvs mentioned this pull request May 21, 2026
3 tasks
@github-actions

github-actions Bot commented May 21, 2026

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: 05-20-feat_learning_hub_tour_framework_and_first_tour/0e49b76

@camielvs camielvs added the #gsd:50583 Learning Hub label May 21, 2026 — with Graphite App
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_tour_framework_and_first_tour branch 3 times, most recently from 08e1624 to 90d5b9d Compare May 21, 2026 22:07
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_guided_tours branch from 0f30f2c to 4cc74f0 Compare May 21, 2026 22:07
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_tour_framework_and_first_tour branch from 90d5b9d to d89055f Compare May 21, 2026 22:36
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_guided_tours branch from 4cc74f0 to fd9690e Compare May 21, 2026 22:37
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_tour_framework_and_first_tour branch 4 times, most recently from a0e7c17 to a98fb46 Compare May 22, 2026 18:40
@camielvs camielvs changed the title feat: Learning Hub Tour Framework and First Tour feat: Learning Hub Tour Framework May 22, 2026
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_tour_framework_and_first_tour branch from a98fb46 to 9f459c8 Compare May 22, 2026 19:29
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_guided_tours branch from fd9690e to 8c23f4e Compare May 22, 2026 21:53
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_tour_framework_and_first_tour branch from 9f459c8 to e7770ca Compare May 22, 2026 21:53
@camielvs camielvs mentioned this pull request May 22, 2026
8 tasks
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_tour_framework_and_first_tour branch from e7770ca to e26abd3 Compare May 23, 2026 00:09
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_guided_tours branch from 8c23f4e to b781af4 Compare May 23, 2026 00:12
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_tour_framework_and_first_tour branch 2 times, most recently from d95e8da to 6246686 Compare May 23, 2026 00:21
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_guided_tours branch from b781af4 to 12125e7 Compare May 23, 2026 00:21
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_tour_framework_and_first_tour branch 9 times, most recently from bd097db to 84f39e0 Compare May 29, 2026 18:33
@camielvs camielvs changed the title feat: Learning Hub Tour Framework feat: Guided TOurs Framework May 29, 2026
@camielvs camielvs changed the title feat: Guided TOurs Framework feat: Guided Tours Framework May 29, 2026
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_tour_framework_and_first_tour branch from 84f39e0 to d6d13ae Compare May 29, 2026 19:24
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_guided_tours branch from b73fea7 to faca533 Compare May 29, 2026 21:22
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_tour_framework_and_first_tour branch from d6d13ae to e97b036 Compare May 29, 2026 21:22
@camielvs camielvs mentioned this pull request May 29, 2026
3 tasks
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_tour_framework_and_first_tour branch from e97b036 to d308ae7 Compare May 29, 2026 21:29
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_guided_tours branch from faca533 to 879e09d Compare May 29, 2026 21:29
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_tour_framework_and_first_tour branch from d308ae7 to 95b9b2a Compare May 29, 2026 22:33
@camielvs camielvs force-pushed the 05-20-feat_learning_hub_guided_tours branch from 879e09d to 4bd1952 Compare May 29, 2026 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

#gsd:50583 Learning Hub

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant