Skip to content

feat: Guided Tours Framework (First Pipeline)#2347

Draft
camielvs wants to merge 14 commits into
05-22-feat_guided_tour_-_navigating_the_editorfrom
06-02-feat_guided_tours_framework_2
Draft

feat: Guided Tours Framework (First Pipeline)#2347
camielvs wants to merge 14 commits into
05-22-feat_guided_tour_-_navigating_the_editorfrom
06-02-feat_guided_tours_framework_2

Conversation

@camielvs
Copy link
Copy Markdown
Collaborator

@camielvs camielvs commented Jun 2, 2026

Description

The interaction primitives, popover positioning, and CSS utilities needed to power the second guided tour (#2312Build Your First Pipeline). No visible behavior on its own; all testing happens in #2312.

Builds directly on #2299 (which added the first three interactions). This PR introduces the remaining interactions a build-from-scratch tour needs, plus a handful of cross-cutting tour-step features.

What's new

New interaction types (EditorTourBridge.tsx)

Each is declared on a tour step via interaction: "<name>" and auto-advances when its prompted action completes.

  • expand-folder — advances when the named folder in the component library is expanded (matches [data-folder-name=...] [aria-expanded="true"]).
  • library-search — advances when the search box value contains a target substring; debounced so the user finishes typing before the step moves on.
  • add-task — advances when a task whose name matches a target substring is added to the canvas. Baseline counted at step start so pre-existing tasks don't false-trigger.
  • add-input / add-output — generic count-based: advances when spec.inputs.length / spec.outputs.length increases.
  • connect-edge — advances when a specific edge is drawn, matched by (sourceTaskName, sourcePortName, targetTaskName, targetPortName). The target task/port pair is optional — a step that wants any edge from a source port (e.g. dragging out a preview node) can omit them.
  • set-argument — advances when a specific argument on any task has its value set to a non-empty string.

Existing select-task (from #2299) gets a targetTaskName narrowing — only the named task counts, not any task.

Cross-cutting step features

  • ringSelectors — paint per-element rings via the new .tour-ring CSS class. Needed because reactour merges highlightedSelectors into one bounding-box highlight; per-handle rings (e.g. "highlight this specific output port and that specific input port") need a separate mechanism.
  • requiresTaskSelected — auto-rewind to a previous select-task step if the required task is no longer selected. Lets a downstream step depend on "Train XGBoost is still selected" without crashing if the user deselects.
  • ensureWindowRestored — auto-restore a minimized/hidden dock window at step start, so the panel the step targets is actually visible.
  • resetLibrarySearch — clear the component-library search box before the step's selector is queried (so the step doesn't open with stale filter state from an earlier step).
  • libraryDragAllow — block drags of library items that don't match the step's target, so the user can't drag the wrong component when a step is asking for a specific one.

Popover positioning

  • computeDefaultPopoverPosition gets a symmetric left-anchored tall-strip branch. The existing branch (added in feat: Guided Tours Foundation #2348) handled right-anchored panels for [data-dock-area="right"] in feat: Guided Tour - Navigating the Editor #2306; the new branch handles left docks for first-pipeline steps that highlight the component library.
  • POPOVER_STYLES.clickArea set to pointer-events: none so reactour's spotlight click-area doesn't intercept clicks on the interactive elements behind it (the user needs to actually drag library items to the canvas).

Misc

  • TourStep registry types extended with the new interaction fields (targetFolderName, targetSearchTerm, targetTaskName, targetComponentName, targetEdge, targetArgumentName, plus the cross-cutting flags above).
  • .tour-ring CSS utility in editor.css, with a React Flow handle override (position: absolute) so the class doesn't break handle layout when applied to ports.
  • defaultPipelineYamlWithName now JSON.stringifys the name. Unrelated to tours, but pipelines named with YAML-special characters (colons, hashes) were breaking the YAML — first surfaced when a tour pipeline name contained a colon.

Related Issue and Pull requests

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

Builds on #2299. Consumed by #2312 (First Pipeline tour content).

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 — every new utility is unused until #2312 lands. Test in context with #2312 on top. Regression-only checks for this PR in isolation:

  • Navigating the Editor tour (feat: Guided Tour - Navigating the Editor #2306) still works end-to-end. None of the new interactions or cross-cutting features should affect tours that don't use them.
  • select-task without targetTaskName still advances on click of any task (the narrowing is opt-in).
  • Editor opens normally, no console errors from the new CSS utility or popover-style additions.

Additional Comments

Originally bundled into #2312 alongside the tour content; split out so reviewers can read the mechanics and the tour JSON separately.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

🎩 Preview

A preview build has been created at: 06-02-feat_guided_tours_framework_2/ef2132f

@camielvs camielvs added the #gsd:50583 Learning Hub label Jun 2, 2026 — with Graphite App
@camielvs camielvs changed the title feat: Guided Tours Framework 2 feat: Guided Tours Framework (First Pipeline) Jun 2, 2026
@camielvs camielvs changed the title feat: Guided Tours Framework (First Pipeline) feat: Guided Tours Expanded Interactions (First Pipeline) Jun 2, 2026
@camielvs camielvs changed the title feat: Guided Tours Expanded Interactions (First Pipeline) feat: Guided Tours Expanded Framework (First Pipeline) Jun 2, 2026
@camielvs camielvs changed the title feat: Guided Tours Expanded Framework (First Pipeline) feat: Guided Tours Additional Framework (First Pipeline) Jun 2, 2026
@camielvs camielvs force-pushed the 06-02-feat_guided_tours_framework_2 branch 2 times, most recently from f262b2f to 42a8c86 Compare June 2, 2026 23:32
@camielvs camielvs force-pushed the 05-22-feat_guided_tour_-_navigating_the_editor branch from 64f6366 to da1c54e Compare June 2, 2026 23:50
@camielvs camielvs force-pushed the 06-02-feat_guided_tours_framework_2 branch 2 times, most recently from ebfb573 to 3fa9ad5 Compare June 2, 2026 23:54
@camielvs camielvs force-pushed the 05-22-feat_guided_tour_-_navigating_the_editor branch from da1c54e to 019a78f Compare June 2, 2026 23:54
@camielvs camielvs mentioned this pull request Jun 2, 2026
3 tasks
@camielvs camielvs force-pushed the 05-22-feat_guided_tour_-_navigating_the_editor branch from 019a78f to fe394fe Compare June 3, 2026 00:12
@camielvs camielvs force-pushed the 06-02-feat_guided_tours_framework_2 branch from 3fa9ad5 to fd171b1 Compare June 3, 2026 00:12
@camielvs camielvs force-pushed the 06-02-feat_guided_tours_framework_2 branch from 7b2f4da to 34c3158 Compare June 3, 2026 17:41
@camielvs camielvs force-pushed the 06-02-feat_guided_tours_framework_2 branch 2 times, most recently from 925125e to af99fa3 Compare June 3, 2026 19:17
@camielvs camielvs force-pushed the 05-22-feat_guided_tour_-_navigating_the_editor branch from 0a4fa58 to 07eb4a8 Compare June 3, 2026 19:17
@camielvs camielvs force-pushed the 06-02-feat_guided_tours_framework_2 branch from af99fa3 to 5601892 Compare June 3, 2026 19:24
@camielvs camielvs force-pushed the 05-22-feat_guided_tour_-_navigating_the_editor branch from 07eb4a8 to 768eaa3 Compare June 3, 2026 19:24
camielvs added 12 commits June 3, 2026 12:29
Adds the first guided tour. A 14-step walkthrough of the v2 editor
registered against the framework introduced in the parent PR. The tour
covers menu bar, canvas, dockable panels, task interaction, and the
Windows menu.

Interactive steps exercise the framework's three primitives —
`select-task`, `undock-window`, `redock-window` — each with a
non-interactive fallback for when the prompted state is already met.

The tour boots into a fresh temporary pipeline cloned from
`example-pipelines/Intro-Hello World.pipeline.component.yaml`.

DOM anchors added:
- data-tour="editor-top-bar" / -menu-items / -top-bar-actions on the
  menu bar
- data-tour="canvas-undo-redo" on the undo/redo cluster
- data-tour="windows-menu-content" / -submenu-content on the Windows
  dropdown content
- data-window-id / data-dock-window-content on docked + floating windows
- data-task-name on task / IO nodes (via a new `domAttributes` arg on
  createEntityNode)

WindowsMenu now dispatches a `resize` event on open/close so reactour
re-measures the portalled dropdown content during step 14.
@camielvs camielvs force-pushed the 05-22-feat_guided_tour_-_navigating_the_editor branch from 768eaa3 to cf8eb6f Compare June 3, 2026 19:30
@camielvs camielvs force-pushed the 06-02-feat_guided_tours_framework_2 branch from 5601892 to ef2132f Compare June 3, 2026 19:30
@camielvs camielvs force-pushed the 05-22-feat_guided_tour_-_navigating_the_editor branch 6 times, most recently from cdceeda to be25cd4 Compare June 3, 2026 20:11
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