feat: Guided Tours Framework#2299
Draft
camielvs wants to merge 1 commit into
Draft
Conversation
This was referenced May 21, 2026
Collaborator
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
3 tasks
🎩 PreviewA preview build has been created at: |
08e1624 to
90d5b9d
Compare
0f30f2c to
4cc74f0
Compare
90d5b9d to
d89055f
Compare
4cc74f0 to
fd9690e
Compare
a0e7c17 to
a98fb46
Compare
3 tasks
a98fb46 to
9f459c8
Compare
fd9690e to
8c23f4e
Compare
9f459c8 to
e7770ca
Compare
e7770ca to
e26abd3
Compare
8c23f4e to
b781af4
Compare
d95e8da to
6246686
Compare
b781af4 to
12125e7
Compare
4 tasks
ecfc28a to
cecf1a3
Compare
51800ff to
b73fea7
Compare
5c82cee to
07be379
Compare
bd097db to
84f39e0
Compare
3 tasks
84f39e0 to
d6d13ae
Compare
b73fea7 to
faca533
Compare
d6d13ae to
e97b036
Compare
3 tasks
e97b036 to
d308ae7
Compare
faca533 to
879e09d
Compare
d308ae7 to
95b9b2a
Compare
879e09d to
4bd1952
Compare
Introduces the guided tour framework using [Reactour](https://docs.reactour.dev/), exposed as a dedicated `/tour/$tourId` route rather than an imperative provider call. The route owns: - The temp tour pipeline lifecycle (create on mount, delete on unmount, no persisted "save state" — tours always start fresh) - Editor layout snapshot/restore around the tour - URL ↔ reactour step sync (`?step=N` is a stable, shareable deep-link and survives same-tab refresh via the URL itself) - A `TourModeContext` consumed by `EditorMenuBar` and `FileMenu` to show tour-specific UI (badge, Resume/Save-as/Exit buttons when the popover is closed) and hide destructive actions Engine bits live under `src/providers/TourProvider/`: - `TourProvider.tsx` — slim reactour wrapper, app-wide - `tourPopover.tsx` — styles, position fn, FinishButton, clamp bridge - `tourPipelineLifecycle.ts` — create/delete/promote/cleanup helpers - `TourOrphanCleanup.tsx` — sweeps tour pipelines on app load (catches tab-close orphans), skipped while user is on a tour route - `TourModeContext.tsx` — context hook for editor components - `waitForSelector.ts` — DOM utility `EditorV2` accepts an optional `pipelineRef` prop so the tour route can render the same editor against a temp pipeline it resolved itself. Layout snapshot/restore is exposed from `windowPersistence` so the tour doesn't reach into localStorage directly. `registry.ts` ships with `tours: TourDefinition[] = []` — the first tour lands in the stacked PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
The guided-tour engine built on Reactour, exposed as a dedicated
/tour/$tourIdroute so tours are refreshable, shareable, and own their lifecycle cleanly.Supports forward/back controls, interactive activities (
select-task,undock-window,redock-window), dynamic highlighting, and inline-markdown step copy (**bold**,_italic_,`code`, paragraph breaks). Interactive steps include fallback copy when the prompted state is already satisfied.Tours are modal — once started, the user can only exit via the explicit Exit Tour button or the Done button on the final step. ESC, the close (X) button, and clicks on the mask are all disabled, so a tour can't be silently paused or dismissed mid-run.
Registry ships empty (
tours: TourDefinition[] = []); the first tour lands in #2306. Until then every Learn-page card stays "Coming soon" and the framework merge is invisible to users.Architecture
Route (
src/routes/Dashboard/Learn/Tour.tsx)tourIdparam against the registry; falls back to/learn/toursif unknown.__tour__<slug>) and renders the editor against it.<TourModeProvider>+<EditorV2>from the first frame — the editor body shows a small loading skeleton while the temp pipeline resolves, so the menu bar stays mounted and there's no perceptible flicker on entry.?step=Nand reactour'scurrentStepso browser back/forward navigates tour steps.waitForSelector('[data-testid="editor-v2"]')).Reactour wrapper (
src/providers/TourProvider/TourProvider.tsx)showCloseButton={false},onClickMask={() => undefined},disableKeyboardNavigation={["esc"]}— the only exits are explicit.renderNextButtonintourPopover.tsx. On the last step the next-button slot returns a hidden placeholder so the step-dots stay centered.PopoverClampBridgekeeps the popover inside the viewport so the step-number badge isn't clipped near screen edges.Tour completion (
tourPopover.tsx → TourCompletionActions)<TourCompletionActions />component (Done button + space for upstack extensions) gets injected into the last step's content viasetStepsaugmentation inTourReactourBridge. Done closes the popover and routes back to/learn/tours.Tour mode context (
src/providers/TourProvider/TourModeContext.tsx)useTourMode()exposes{ tour, tempPipelineName }to editor components.EditorMenuBarreads this to render a Tour badge next to the pipeline name and the central Exit Tour button. File-menu destructive actions (rename / delete) are hidden in tour mode.EditorV2Contentreads it too: whenpipelineRefis null and we're in tour mode, it showsPipelineEditorSkeletoninstead ofEmptyEditorStateso the loading transition feels coherent.Editor bridge (
src/routes/v2/pages/Editor/components/EditorTourBridge.tsx)interaction: "undock-window" | "redock-window" | "select-task".select-taskdetects clicks on a stable[data-tour-node="task"]ancestor (not a library CSS class) so task selection only counts for true task nodes, not IO ports.Editor integration (
src/routes/v2/pages/Editor/EditorV2.tsx)EditorV2accepts an optionalpipelineRefprop so the tour route can pass in the temp pipeline it resolved itself.pipelineRef ? <PipelineEditor /> : tourMode ? <PipelineEditorSkeleton /> : <EmptyEditorState />.Layout snapshot (
src/routes/v2/shared/windows/windowPersistence.ts)snapshotLayout/restoreLayoutstash the editor's persisted window arrangement so a tour can mutate it freely and roll back on exit.How to add a tour
src/components/Learn/tours/<yourTour>.tour.jsonexporting aTourDefinition.toursarray inregistry.ts.data-*anchors on the UI elements your steps target. The codebase already exposes:data-tour="..."for panels and bars you add as you godata-dock-area,data-dock-window,data-dock-window-content,data-window-idfor the dock/window systemdata-tour-anchor="no-spotlight"to open a step with a centered popover and no highlightRelated Issue and Pull requests
Progresses https://github.com/Shopify/oasis-frontend/issues/583
Type of Change
Checklist
Screenshots
Test Instructions
With the registry empty, the visible behavior is:
/learn/toursand the dashboard Featured Tours tile render every tour card as "Coming soon"/tour/anythingredirects to/learn/toursRegression check: confirm pipelines list, editor menu bar, dockable / floating windows, and task nodes behave identically to master. None of the tour engine should be visible until a tour registers.
Additional Comments
More tours intended to follow the first one (#2306), covering a range of topics.