feat: Learning Hub Tour 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
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.
6246686 to
3adc6cd
Compare
12125e7 to
77a5131
Compare
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
Adds the foundational groundwork for guided tours in the UI, using Reactour. Tours live at their own URL (
/tour/$tourId) so they're refreshable, shareable, and own their lifecycle cleanly.Supports forward/back controls, interactive activities ("click here", "drag this" etc) and dynamic highlighting of relevant UI elements. Interactive steps include fallback options if the interaction has already been completed or is otherwise unavailable.
Tours run inside a fresh ephemeral pipeline (
__tour__<slug>). When the user leaves the tour route the pipeline is deleted — tours have no save state, every visit starts fresh. If the user wants to keep the work, "Save as new pipeline" in the editor's tour-mode action bar promotes the temp pipeline into a regular one.Architecture
Route (
/tour/$tourId,src/routes/Tour.tsx)__tour__<slug>on mount, deletes it on unmount unless promoted?step=Nand reactour's internalcurrentStepso browser back/forward navigates tour stepswaitForSelector('[data-testid="editor-v2"]')) — step selectors target editor DOM/learn/toursiftourIddoesn't match a registered tourTour mode context (
src/providers/TourProvider/TourModeContext.tsx)useTourMode()to editor components:{ tour, tempPipelineName, markPipelinePromoted }Reactour wrapper (
src/providers/TourProvider/TourProvider.tsx)<TourProvider>from reactour with custom Prev / Next / Finish buttons and styling/learn/tours; X / ESC dismiss the popover but stay on the route so the user can poke around or resumeEditor bridge (
src/routes/v2/pages/Editor/components/EditorTourBridge.tsx)interaction: "undock-window" | "redock-window" | "select-task"fallbackContent) when the prompted state is already satisfiedOrphan cleanup (
src/providers/TourProvider/TourOrphanCleanup.tsx)__tour__*pipelines on app load to catch tab-close / crash orphans. Route unmount handles every normal exit path; this covers what the browser kills before we can run.Learn page wiring —
FeaturedToursandToursLibrarylink directly to/tour/$tourIdfor registered tours; unregistered IDs render as "Coming soon"Registry is intentionally empty
src/components/Learn/tours/registry.tsships withconst tours: TourDefinition[] = []. Until the first tour is registered (see #2306), every tile on the Learn page renders as "Coming soon". This keeps the framework merge-safe on its own.How to add a tour
src/components/Learn/tours/<yourTour>.tour.tsexporting aTourDefinitiontoursarray inregistry.tsdata-tour="..."/data-window-id/ etc. anchors on the UI elements the steps targetdata-task-nameattribute (already exposed viacreateEntityNode'sdomAttributes)Related Issue and Pull requests
Progresses https://github.com/Shopify/oasis-frontend/issues/583
Type of Change
Checklist
Screenshots (if applicable)
Test Instructions
With the registry empty, the visible behavior is:
/learn/toursand the dashboard Featured Tours tile render every tour 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 are intended to follow the first one, covering a range of topics.