Skip to content

feat: Guided Tours Framework (Subgraphs)#2365

Open
camielvs wants to merge 1 commit into
05-26-feat_guided_tour_-_first_pipelinefrom
06-03-feat_guided_tours_framework_subgraphs_
Open

feat: Guided Tours Framework (Subgraphs)#2365
camielvs wants to merge 1 commit into
05-26-feat_guided_tour_-_first_pipelinefrom
06-03-feat_guided_tours_framework_subgraphs_

Conversation

@camielvs

@camielvs camielvs commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator

Description

The subgraph-specific interaction mechanics for the guided-tour framework, layered on the framework stack (#2348 / #2299 / #2347 / #2340). Foundation for the Subgraphs tour (#2366) — this PR adds the interaction types and the bridge logic that detects them; the tour content lands in #2366.

Five new tour interactions cover navigating and authoring subgraphs, plus a canvas re-measurement fix so spotlights track the viewport when navigation changes the view.

What changed

Interaction vocabulary (src/components/Learn/tours/registry.ts)

Five new TourStep.interaction values, plus a targetMinCount field:

  • navigate-into-subgraph — descends a level (optionally gated to a specific targetTaskName)
  • navigate-to-root — returns to the top level
  • unpack-subgraph — the active spec's subgraph-task count drops (a subgraph was flattened)
  • multi-select-tasks — ≥ targetMinCount (default 2) task nodes are selected
  • create-subgraph — the subgraph-task count rises (a subgraph was created)

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

Each interaction is detected by observing the existing MobX stores — navigation.navigationDepth / navigationPath for level changes, navigation.activeSpec.tasks (counting subgraphSpec) for unpack/create, and editor.multiSelection for multi-select. Following the model from #2299, a detected interaction marks the step complete in the shared tour-progress state (it does not advance the tour itself); already-satisfied-on-entry states are marked complete immediately. Gated "Next" / auto-advance (#2340) handle progression.

Contextual checklist labels

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

  • navigate-into-subgraph → "Open the {targetTaskName} subgraph"
  • multi-select-tasks → "Select {targetMinCount} tasks"
  • navigate-to-root → "Return to the top level"
  • unpack-subgraph → "Unpack the subgraph"
  • create-subgraph → "Create a subgraph from the selected tasks"

Spotlight re-measurement while navigating

  • Dispatches a resize event (via requestAnimationFrame) whenever the xyflow viewport pans/zooms during an open tour, so reactour re-positions the highlight/popover after navigating into a subgraph shifts the canvas.
  • ensureWindowRestored now waits for the target DOM to actually appear — the step's own selector, else the dock window — polling up to 1.5s before forcing a re-measure, instead of measuring against a not-yet-rendered target.

Related Issue and Pull requests

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

Builds on the framework stack (#2348 / #2299 / #2347 / #2340); consumed by the Subgraphs tour in #2366.

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

The registry is otherwise inert in this PR — the interactions are exercised end-to-end by the Subgraphs tour in #2366. To verify in isolation:

  • No regressions in the existing tours ("Find your way around the editor", "Build your first pipeline"): interaction completion, ensureWindowRestored steps, and the dock/window highlight steps still work.
  • Re-measurement — in any canvas-anchored tour step, pan/zoom the viewport; the spotlight/popover should re-position to follow rather than freeze.

Additional Comments

Selector/anchor additions and the seed pipeline for the subgraph tour live in #2366, following the convention that tour-specific DOM anchors ship alongside the tour that needs them.

@camielvs camielvs added the #gsd:50583 Learning Hub label Jun 3, 2026 — with Graphite App
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

🎩 Preview

A preview build has been created at: 06-03-feat_guided_tours_framework_subgraphs_/aabac7b

camielvs commented Jun 3, 2026

Copy link
Copy Markdown
Collaborator Author

@camielvs camielvs force-pushed the 06-03-feat_guided_tours_framework_subgraphs_ branch from 49656f5 to a182d2f Compare June 3, 2026 18:32
@camielvs camielvs force-pushed the 05-26-feat_guided_tour_-_first_pipeline branch from 57b8cdd to afb2772 Compare June 3, 2026 18:32
@camielvs camielvs force-pushed the 06-03-feat_guided_tours_framework_subgraphs_ branch from a182d2f to 5adf525 Compare June 3, 2026 18:48
@camielvs camielvs force-pushed the 05-26-feat_guided_tour_-_first_pipeline branch 2 times, most recently from 113a417 to 78cc132 Compare June 3, 2026 19:17
@camielvs camielvs force-pushed the 06-03-feat_guided_tours_framework_subgraphs_ branch from 5adf525 to 514c488 Compare June 3, 2026 19:17
@camielvs camielvs force-pushed the 05-26-feat_guided_tour_-_first_pipeline branch from 78cc132 to 7767801 Compare June 3, 2026 19:24
@camielvs camielvs force-pushed the 06-03-feat_guided_tours_framework_subgraphs_ branch from 514c488 to 05098d2 Compare June 3, 2026 19:24
@camielvs camielvs force-pushed the 05-26-feat_guided_tour_-_first_pipeline branch from 7767801 to ee03e31 Compare June 3, 2026 19:30
@camielvs camielvs force-pushed the 06-03-feat_guided_tours_framework_subgraphs_ branch from 05098d2 to b571f54 Compare June 3, 2026 19:30
@camielvs camielvs force-pushed the 05-26-feat_guided_tour_-_first_pipeline branch from ee03e31 to 8dd2a4e Compare June 3, 2026 22:40
@camielvs camielvs force-pushed the 06-03-feat_guided_tours_framework_subgraphs_ branch from b571f54 to 0124745 Compare June 3, 2026 22:40
@camielvs camielvs force-pushed the 05-26-feat_guided_tour_-_first_pipeline branch from 8dd2a4e to d60f1d2 Compare June 4, 2026 18:58
@camielvs camielvs force-pushed the 06-03-feat_guided_tours_framework_subgraphs_ branch from 0124745 to 75ab404 Compare June 4, 2026 18:58
@camielvs camielvs force-pushed the 05-26-feat_guided_tour_-_first_pipeline branch from d60f1d2 to 721f5de Compare June 4, 2026 21:02
@camielvs camielvs force-pushed the 06-03-feat_guided_tours_framework_subgraphs_ branch 3 times, most recently from 677a1a3 to 601b598 Compare June 4, 2026 23:42
@camielvs camielvs force-pushed the 05-26-feat_guided_tour_-_first_pipeline branch 2 times, most recently from 4ee52d2 to 65b41d0 Compare June 5, 2026 22:43
@camielvs camielvs force-pushed the 06-03-feat_guided_tours_framework_subgraphs_ branch 2 times, most recently from 0bf07b8 to ccceaaf Compare June 9, 2026 16:52
@camielvs camielvs force-pushed the 05-26-feat_guided_tour_-_first_pipeline branch from 108348f to f153d01 Compare June 9, 2026 17:37
@camielvs camielvs force-pushed the 06-03-feat_guided_tours_framework_subgraphs_ branch from ccceaaf to d97d028 Compare June 9, 2026 17:37
@camielvs camielvs force-pushed the 05-26-feat_guided_tour_-_first_pipeline branch from 354c787 to a87f286 Compare June 15, 2026 22:36
@camielvs camielvs force-pushed the 06-03-feat_guided_tours_framework_subgraphs_ branch from 3f6cba6 to 90ca438 Compare June 15, 2026 22:36
@camielvs camielvs force-pushed the 05-26-feat_guided_tour_-_first_pipeline branch from a87f286 to e2e270d Compare June 15, 2026 22:55
@camielvs camielvs force-pushed the 06-03-feat_guided_tours_framework_subgraphs_ branch 2 times, most recently from 490aab5 to a823d2b Compare June 16, 2026 00:38
@camielvs camielvs force-pushed the 05-26-feat_guided_tour_-_first_pipeline branch 2 times, most recently from 024fa81 to 5b3c86f Compare June 16, 2026 00:58
@camielvs camielvs force-pushed the 06-03-feat_guided_tours_framework_subgraphs_ branch from a823d2b to 084077f Compare June 16, 2026 00:58
@camielvs camielvs force-pushed the 05-26-feat_guided_tour_-_first_pipeline branch from 5b3c86f to 53954e7 Compare June 16, 2026 01:15
@camielvs camielvs force-pushed the 06-03-feat_guided_tours_framework_subgraphs_ branch 2 times, most recently from 24c1b06 to b29b14d Compare June 16, 2026 01:26
@camielvs camielvs marked this pull request as ready for review June 16, 2026 19:33
@camielvs camielvs requested a review from a team as a code owner June 16, 2026 19:33
@camielvs camielvs force-pushed the 05-26-feat_guided_tour_-_first_pipeline branch from 53954e7 to 7309ada Compare June 17, 2026 17:24
@camielvs camielvs force-pushed the 06-03-feat_guided_tours_framework_subgraphs_ branch from b29b14d to 5e3cb0e Compare June 17, 2026 17:24
@camielvs camielvs force-pushed the 05-26-feat_guided_tour_-_first_pipeline branch from 7309ada to 8f77f57 Compare June 19, 2026 02:25
@camielvs camielvs force-pushed the 06-03-feat_guided_tours_framework_subgraphs_ branch from 5e3cb0e to 3327563 Compare June 19, 2026 02:25
@camielvs camielvs force-pushed the 05-26-feat_guided_tour_-_first_pipeline branch from 8f77f57 to 90e6c78 Compare June 19, 2026 18:49
@camielvs camielvs force-pushed the 06-03-feat_guided_tours_framework_subgraphs_ branch from 3327563 to 892742c Compare June 19, 2026 18:49
@camielvs camielvs force-pushed the 05-26-feat_guided_tour_-_first_pipeline branch from 90e6c78 to 421444d Compare June 19, 2026 21:48
@camielvs camielvs force-pushed the 06-03-feat_guided_tours_framework_subgraphs_ branch from 892742c to 3598673 Compare June 19, 2026 21:48
@camielvs camielvs force-pushed the 05-26-feat_guided_tour_-_first_pipeline branch from 421444d to e5c0b36 Compare June 26, 2026 00:20
@camielvs camielvs force-pushed the 06-03-feat_guided_tours_framework_subgraphs_ branch from 3598673 to 36905f7 Compare June 26, 2026 00:20
@camielvs camielvs force-pushed the 05-26-feat_guided_tour_-_first_pipeline branch from e5c0b36 to 419ef51 Compare June 26, 2026 00:53
};
}

if (interaction === "navigate-into-subgraph") {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 This is an AI-generated code review comment.

This PR adds five more interaction branches directly inside EditorTourBridge, raising the file from 526 to 676 lines, cyclomatic complexity from 118 to 142, and FTA from 76.27 to 81.86. The file was already high, but this diff materially worsens the central orchestrator and duplicates local helpers like countSubgraphTasks, making future tour interactions harder to reason about and test.

Suggestion: Extract the subgraph-specific interaction tracking into co-located pure helpers or small handler functions, and share the countSubgraphTasks helper between create/unpack paths. Keep EditorTourBridge as the orchestration layer that delegates each interaction family.

Rule: static-analysis skill thresholds; tangle-ui-review Readability & Component Size; .cursorrules Code Quality prefers reducing nesting and extracting duplicated logic

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.

2 participants