Repository navigation
feat(Tour): Tour moves from Lab to Core with steps as data and an app-owned active step (AST-119) - #12891
feat(Tour): Tour moves from Lab to Core with steps as data and an app-owned active step (AST-119)#12891nynexman4464 wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report
Generated by PR Enrichment workflow | View current CI run |
There was a problem hiding this comment.
Approval waits on engineering-owner spec decisions across this stack, and #12891 also has one blocking fix. The three pull requests below it are unchanged since the last stack review.
#12891 (Tour to Core): waiting on an engineering owner's decision, with one blocking finding. Approval needs an engineering owner to approve or amend, at this head, the Tour contract this pull request carries:
- the new AST-119 record (FR1–FR17, DEC-1–DEC-6);
- the Amended lines that make a backdrop step modal, in
component:TourDEC-1 andspec:AST-116DEC-5; - the new
component:Tourandfamily:overlay-dismissalrows; - the
tour,tour-highlightandtour-overlaytheme targets; - removing the Lab Tour with no codemod.
An engineering owner records it by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner.
TourShowcase.tsxandTourBackdrop.tsxstart their tours on mount, so the Tour docs page, which renders both blocks live, opens two tours on load and the backdrop one dims the page and takes focus; start both atnullso "Take the tour" starts them.
#11117 (usePopover anchorRef): waiting on an engineering owner's decision; no blocking finding. Unchanged: the FR6 sentence about a show() while the ref holds no element still needs approval.
#11121 (shared layer focus return): waiting on an engineering owner's decision; no blocking finding. Unchanged: two points still need approval. One is whether the public useFocusTrap and a removed scrim Drawer run the FR17–FR21 chain. The other is FR20's extra stand-in step.
#11156 (isModal): waiting on an engineering owner's decision; no blocking finding. Unchanged: four points still need approval. They are FR22's new sentences, the family:overlay-dismissal FR3 gap: line, the dropped Firefox evidence line, and PowerSearch closing its filter popover when focus moves into the field.
Whole stack: passes; nothing blocks across the four pull requests. A pull request in this stack lands only when it and every pull request below it are approved.
Claims and files checked
Review mode: full; reason: no-earlier-review
Claims (#12891 description and release note):
- Steps are an array; a step left out does not exist, and the count, Back and Next follow the array: verified (unit tests on the count and on Back and Next).
- When the active step leaves the array, the next surviving step becomes active, or the tour ends as complete: verified (three promotion tests).
- The app owns the active step through
activeId; Back, Next and a skip report throughonActiveIdChange, and every end reports its reason throughonEnd: verified (control tests;Tour.tsx:807-821). - One popover callout moves between anchors, and a step with no anchor shows centered: verified (
Tour.tsx:474-508,932-946; this review's frames). missingAnchorBehaviorcenters, skips in the direction of travel, or ends; each missing anchor is reported once;showActionis awaited; no timer: verified (anchor tests;Tour.tsx:570-662).- An out-of-view anchor scrolls into view, at once under reduced motion, and
hasScrollIntoView={false}turns it off: verified for the call and the option (unit test); the reduced-motion path checked in code. - The ring uses CSS anchor positioning with no script positioning, script reads only the corner radius, and a backdrop dims through the ring's shadow, with no ring without anchor positioning: verified in code (
Tour.tsx:186-228,669-688). - Without a backdrop a step is non-modal and Escape works only from the callout or the anchor; with a backdrop it is modal, a press outside ends it, and Escape works from anywhere: verified (modality and Escape tests).
- Focus moves to the heading from the callout, the previous anchor or the body, and otherwise stays with a polite announcement; it returns to the anchor at the end: verified (focus tests; this review's backdrop frame).
- Back, Next, Done, Skip, close and the count are catalog messages, and three label props reword three of them: verified (
en.json; catalog tests). - The standard element props reach the callout's dialog element: verified (host data-attribute fixture passes).
- Lab
Tour,TourStep,useTourand their types are removed, and the release note maps each renamed prop: verified against the base Lab props. - The CLI ships a showcase and an example block and no longer lists the Lab Tour: verified (official package list, route lock).
- Three theme targets are added and the probe theme is regenerated: targets verified; regeneration not rerun.
- The Tour unit file has 38 tests and the browser spec 13 in two engines: verified, 38 of 38 pass here; the browser count is verified, not run here.
- The record changes listed (path applicability, five gap lines, verification rows, family member, two name-only edits): verified.
- The Lab removal is an owner decision: not verified, no decision is recorded; it rides on the spec approval.
- The five reference pages are byte-identical, and the first-load deltas are +0: reported, not reproduced.
Files (#12891; #11117, #11121 and #11156 carried, their lists are on those pull requests):
packages/cli/assets/templates/blocks/components/Tour/TourShowcase.tsx,TourBackdrop.tsx: blocking (they start on mount)packages/cli/assets/templates/blocks/components/Tour/TourShowcase.doc.mjs,TourBackdrop.doc.mjs: cleardocs/specs/AST-119-tour/spec.md,docs/specs/components/Tour/Tour.spec.md,docs/families/overlay-dismissal.md,docs/specs/AST-116-popover-anchoring/spec.md: wait on the owner decisiondocs/specs/AST-038-layer-text-boundary/spec.md,docs/architecture/react-component-runtime.md: clear (name only)packages/core/src/Tour/Tour.tsx: clear; its contract waits on the owner decisionpackages/core/src/Tour/Tour.doc.mjs,Tour.test.tsx,__tests__/Tour.interaction.browser.spec.ts,index.ts: clearpackages/core/src/index.ts,packages/core/package.json,packages/core/locales/en.json,packages/core/src/__tests__/hostDataAttributes.test.tsx: clearpackages/themes/probe/src/probeTheme.ts,internal/shadcn-registry/routes.lock.json,packages/cli/assets/discover/official-packages.json: clear (generated)apps/storybook/stories/Tour.stories.tsx,apps/storybook/rtl-audit/targets.json,.github/playwright-leg-durations.json: clearpackages/cli/test/swizzle-proof/samples.mjs,packages/cli/foundation/discovery/component-discovery.export-names.test.mjs,scripts/check-cli-official-packages.test.mjs,scripts/score-ledger.test.mjs,apps/docsite/src/__tests__/component-detail-resolve-elements.test.ts: clear.changeset/tour-core.md: clearpackages/lab/src/Tour/*(8 files deleted),packages/lab/src/index.ts: clear
5a62e1f to
ed17a89
Compare
There was a problem hiding this comment.
Approval waits on engineering-owner spec decisions across this stack; the earlier blocking finding on #12891 is fixed. The three pull requests below it are unchanged since the last stack review.
#12891 (Tour to Core): waiting on an engineering owner's decision; no blocking finding. Approval needs an engineering owner to approve or amend, at this head, the Tour contract this pull request carries:
- the new AST-119 record (FR1–FR17, DEC-1–DEC-6);
- the Amended lines that make a backdrop step modal, in
component:TourDEC-1 andspec:AST-116DEC-5; - the new
component:Tourandfamily:overlay-dismissalrows; - the
tour,tour-highlightandtour-overlaytheme targets; - removing the Lab Tour with no codemod.
An engineering owner records it by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. The Tour showcase and backdrop blocks now start idle, so the docs page no longer opens tours on load.
#11117 (usePopover anchorRef): waiting on an engineering owner's decision; no blocking finding. Unchanged: the FR6 sentence about a show() while the ref holds no element still needs approval.
#11121 (shared layer focus return): waiting on an engineering owner's decision; no blocking finding. Unchanged: whether the public useFocusTrap and a removed scrim Drawer run the FR17–FR21 chain, and FR20's extra stand-in step, still need approval.
#11156 (isModal): waiting on an engineering owner's decision; no blocking finding. Unchanged: FR22's new sentences, the family:overlay-dismissal FR3 gap: line, the dropped Firefox evidence line, and PowerSearch closing its filter popover when focus moves into the field still need approval.
Whole stack: passes; nothing blocks across the four pull requests. A pull request in this stack lands only when it and every pull request below it are approved.
Claims and files checked
Review mode: full; reason: history
Claims (#12891 description and release note):
- Steps are an array; a step left out does not exist, and the count, Back and Next follow the array: verified (unit tests on the count and on Back and Next).
- When the active step leaves the array, the next surviving step becomes active, or the tour ends as complete: verified (promotion tests).
- The app owns the active step; Back, Next and a skip report the new step, and every end reports its reason: verified (control tests;
Tour.tsx:807-821). - One popover callout moves between anchors, and a step with no anchor shows centered: verified (
Tour.tsx:474-508,932-946; browser spec; this review's frames). - The missing-anchor option centers, skips in the direction of travel, or ends; each missing anchor is reported once; a step's preparation is awaited; no timer: verified (anchor tests;
Tour.tsx:570-662). - An out-of-view anchor scrolls into view, at once under reduced motion, and the option turns it off: verified for the call and the option (unit test); the reduced-motion path in code and in the browser spec.
- The ring uses CSS anchor positioning with no script positioning, script reads only the corner radius, and a backdrop dims through the ring's shadow, with no ring without anchor positioning: verified in code (
Tour.tsx:186-228,669-688). - Without a backdrop a step is non-modal and Escape works only from the callout or the anchor; with a backdrop it is modal, a press outside ends it, and Escape works from anywhere: verified (modality and Escape tests; this review's frames show Tab staying in a backdrop callout).
- Focus moves to the heading from the callout, the previous anchor or the body, and otherwise stays with a polite announcement; it returns to the anchor at the end: verified (focus tests; this review's frames).
- Back, Next, Done, Skip, close and the count are catalog messages, and three label props reword three of them: verified (
en.json; catalog test). - Standard element props reach the callout's dialog element: verified (host data-attribute fixture passes).
- The Lab Tour, its step component, its hook and their types are removed, and the release note maps each renamed prop: verified against the base Lab props.
- The CLI ships a showcase and an example block and no longer lists the Lab Tour: verified (the official package list and the route lock regenerate identically).
- Three theme targets are added and the probe theme is regenerated: verified (probe-theme check is current).
- The Tour unit file has 38 tests and the browser spec 13 in two engines: 38 of 38 pass here; the browser count is verified, not run here.
- The showcase and the backdrop block start idle: verified (both start at
null; rendered on mount, no callout opens). - The record changes listed (path applicability, five gap lines, verification rows, family member, two name-only edits): verified.
- The Lab removal is an owner decision: not verified, no decision is recorded; it rides on the spec approval.
- The reference pages are unchanged and the first-load deltas are +0: reported, not reproduced.
Files (#12891; #11117, #11121 and #11156 carried, their lists are on those pull requests):
packages/cli/assets/templates/blocks/components/Tour/TourShowcase.tsx,TourBackdrop.tsx, and their docs: clear (the earlier blocking finding is fixed)docs/specs/AST-119-tour/spec.md,docs/specs/components/Tour/Tour.spec.md,docs/families/overlay-dismissal.md,docs/specs/AST-116-popover-anchoring/spec.md: wait on the owner decisiondocs/specs/AST-038-layer-text-boundary/spec.md,docs/architecture/react-component-runtime.md: clear (name only)packages/core/src/Tour/Tour.tsx: clear; its contract waits on the owner decision (one non-blocking comment suggestion)packages/core/src/Tour/Tour.doc.mjs,Tour.test.tsx,__tests__/Tour.interaction.browser.spec.ts,index.ts: clearpackages/core/src/index.ts,packages/core/package.json,packages/core/locales/en.json,packages/core/src/__tests__/hostDataAttributes.test.tsx: clearpackages/themes/probe/src/probeTheme.ts,internal/shadcn-registry/routes.lock.json,packages/cli/assets/discover/official-packages.json: clear (generated)apps/storybook/stories/Tour.stories.tsx,apps/storybook/rtl-audit/targets.json,.github/playwright-leg-durations.json: clearpackages/cli/test/swizzle-proof/samples.mjs,packages/cli/foundation/discovery/component-discovery.export-names.test.mjs,scripts/check-cli-official-packages.test.mjs,scripts/score-ledger.test.mjs,apps/docsite/src/__tests__/component-detail-resolve-elements.test.ts: clear.changeset/tour-core.md: clearpackages/lab/src/Tour/*(8 files deleted),packages/lab/src/index.ts: clear
ed17a89 to
40e8d3a
Compare
There was a problem hiding this comment.
Approval of #12891 waits on an engineering owner's decision on what it adds beyond the now-current AST-119 spec, and the stack needs a rebase onto main. #11117 is approved pending CI.
#12891 (Tour to Core): waiting on an engineering owner's decision, with two blocking findings.
- Regression: since the AST-119 spec landed on
main, this pull request conflicts withmainindocs/specs/AST-119-tour/spec.mdanddocs/families/overlay-dismissal.md, so rebase it, keepmain's AST-119 text plus only this pull request's own edits, and update the description that still calls AST-119 proposed. data-backdrop(Tour.tsxlines 1097–1099 and 1110–1112) is a new public theme attribute that no current record names, asarchitecture:public-component-apiDEC-2 requires, so either an owner approves thecomponent:Tourparagraph that names it or the attribute goes.
An engineering owner still has to approve or amend, at the rebased head, what this pull request changes beyond main: FR6's two new sentences for steps inside dialogs and popovers, the FR9, FR10, FR13 and FR16 gap lines, dropping Firefox from the browser evidence, removing the Lab Tour with no codemod, the component:Tour data-backdrop paragraph with the tour, tour-highlight and tour-overlay theme targets, and the new spec:AST-116 FR12 gap: line. An owner also rules whether the shared useLayer change, where every anchored layer's in-view watch follows a trigger replaced while open, is a fix under spec:AST-059 FR5 or a desktop behaviour change.
#11117 (usePopover anchorRef): approved pending CI. An engineering owner approved its spec at its head, no blocking finding remains, and CI has not run on that head yet.
#11121 (shared layer focus return): waiting on an engineering owner's decision, with one blocking finding.
- Regression: since the AST-119 spec landed on
main, this pull request conflicts withmainindocs/families/overlay-dismissal.md, where itsFR9 gap:line meetsmain's newFR2 gap:line, so rebase it ontomain.
#11156 (isModal): waiting on an engineering owner's decision, with one blocking finding.
- Regression: since the AST-119 spec landed on
main, this pull request conflicts withmainindocs/families/overlay-dismissal.md, where itsFR3 gap:rewrite meetsmain's newFR2 gap:line, so rebase it ontomain.
Whole stack: nothing blocks between the four pull requests. A pull request in this stack lands only when it and every pull request below it are approved, and an engineering owner records each decision by commenting /approve-spec <full head SHA> on that pull request.
Claims and files checked
Review mode: same-head; reason: none
Claims (#11117 description and release note, at its head):
usePopovertakes an optionalanchorRefto any element with a CSS box, and no new type is exported: verified (usePopover.tsxoptions;popoverAnchor.ts).- The anchor gets no ARIA and no handler and is never a trigger, while the trigger keeps its toggle and ARIA: verified ("anchors to a non-button element while the trigger keeps its role").
- A shape or nested svg inside an svg warns once in development, and an outer svg or one in foreignObject does not: verified (
popoverAnchor.ts:214-229; warning test). - The ref is read on open, on each render and on each
show(), and nothing watches the page: verified (the layout Effect after every commit andbindAnchorinshow(); "does not watch the page"). - With light dismiss off, setting the ref and calling
show()moves an open popover without a close or remount: verified (unit test; the browser test is the author's). - With light dismiss on, the press on another control closes the popover first and
show()reopens it: matches the recorded FR9 gap; no test covers it, as the description says. - A
show()while the ref holds no element waits, and opens when a later read finds one: verified (four waiting tests; the FR6 sentence an owner approved). - A composition with an anchor and no trigger opens through
show()and reports dismissals throughonHide: verified (unit test). - An open popover whose anchor is gone shows no surface: verified (
styles.unanchored; two tests). - Without
anchorRefthe trigger anchors exactly as before, andPopoveris unchanged: verified (the trigger path is unchanged when no anchor is passed;Popover.tsxis untouched). - 19 unit tests and 2 browser tests: 19 counted and passing here; the 2 browser tests counted, not run here.
- The first-load growth stays within the allowance for an unused option: reported (menu +271 B, popover +247 B), not reproduced.
Claims (#12891), rechecked at this head:
- It implements the Tour spec "proposed" in another pull request and carries its records: false now, because that spec is on
main, and this pull request's copy conflicts with it. - The other description and release-note claims are unchanged since the last review at this head, and their checks still hold.
Files:
- #11117 (10/10): release note, story,
spec:AST-116,component:Popover,useLayer.tsx,PopoverAnchor.test.tsx, its browser spec,popoverAnchor.ts,usePopover.doc.mjs,usePopover.tsx: clear. - #12891 (44/44): unchanged since the last review at this head.
Tour.tsxhas thedata-backdropfinding;docs/specs/AST-119-tour/spec.mdanddocs/families/overlay-dismissal.mdconflict withmain; the other records wait on the owner decision; the rest are clear. - #11121 and #11156: carried.
docs/families/overlay-dismissal.mdin each conflicts withmain.
| onClick={hasBackdrop ? () => onEnd('backdrop') : undefined} | ||
| {...mergeProps( | ||
| themeProps('tour-overlay', { | ||
| backdrop: hasBackdrop ? 'backdrop' : null, |
There was a problem hiding this comment.
Blocking: this adds data-backdrop="backdrop" to the tour-overlay target (and line 1111 to tour-highlight), which is new public surface: themes can select on it as soon as it ships. architecture:public-component-api DEC-2 needs a current record that names it and says why, and only this pull request's own component:Tour paragraph does. An engineering owner approving that paragraph at this head settles it; otherwise drop the visual prop until a record names it:
themeProps('tour-overlay'),40e8d3a to
b731ef6
Compare
There was a problem hiding this comment.
Approval of #12891 waits on an engineering owner's decision on what it adds beyond the current AST-119 spec, and on one fix. #11117 and #11121 are approved pending CI.
#12891 (Tour to Core): waiting on an engineering owner's decision, with one blocking finding.
data-backdrop(Tour.tsxlines 1097–1099 and 1110–1112) is a new public theme attribute that no current record names, asarchitecture:public-component-apiDEC-2 requires, so either an engineering owner approves thecomponent:Tourparagraph that names it or the attribute goes.
An engineering owner still has to approve or amend, at this head, what this pull request changes beyond main: FR6's two new sentences for steps inside dialogs and popovers, the FR9, FR10, FR13 and FR16 gap lines, dropping Firefox from the browser evidence, removing the Lab Tour with no codemod, the component:Tour data-backdrop paragraph with the tour, tour-highlight and tour-overlay theme targets, and the new spec:AST-116 FR12 gap: line. An owner also rules whether the shared useLayer change, where every anchored layer's in-view watch follows a trigger replaced while open, is a fix under spec:AST-059 FR5 or a desktop behaviour change. The rebase fixed the earlier conflicts with main.
#11121 (shared layer focus return): approved pending CI. An engineering owner approved its spec at its head and no blocking finding remains. CI has not run on that head yet.
#11117 (usePopover anchorRef): approved pending CI. It is unchanged since the last review.
#11156 (isModal): waiting on an engineering owner's decision; no blocking finding. At its new head, an engineering owner has to approve four things: its spec:AST-116 FR22 sentences, the family:overlay-dismissal FR3 gap: line, dropping Firefox from the evidence line, and PowerSearch closing its filter popover when focus moves back into the field.
Whole stack: nothing blocks between the four pull requests, and each merges cleanly into main. A pull request in this stack lands only when it and every pull request below it are approved. An engineering owner records each decision by commenting /approve-spec <full head SHA> on that pull request, and the author may do so as an engineering owner.
Claims and files checked
Review mode: full; reason: rebase
Claims (#11121 description and release note, at its head):
- Popover, DropdownMenu in its popover presentation, and Dialog move focus at close only when the close would strand it: verified (stranded check in the shared focus return; layer focus-return tests).
- Focus that used to fall to the page body follows the stated order: opener, trigger, the control that names the layer, the component's own stand-in, anchor, former place, nearest ancestor, parent layer, then the main region: verified (the chain's candidate order; tests).
- A DropdownMenu no longer focuses its trigger when focus never entered the menu: verified (the menu's own refocus is gone; test).
- The focus-trap hook returns focus the same way, and a Drawer gets the shared return only when removed while open: verified (the public hook is the internal trap; the trap stands down on a modal dialog).
- There is no option to turn focus return off: verified (no option in the types).
- Redirect focus in the open-change or hide callback, or after a Dialog closes: verified (hide-notification test; Dialog doc).
- A closing layer hands its return only to a child that holds focus or is still opening: verified (tests).
- Focus leaves a surface whose anchor left the document: verified (tests).
- One modal-dialog helper serves the focus return, the announcer and the sheet stack: verified.
- No new public API: verified (generated API comparison lists no row for it).
- The listed suites pass: verified (4,882 tests at its head).
- Real-browser runs in Chromium and WebKit: not rerun here.
- First-load growth on the reference pages: reported, not reproduced.
Claims (#12891 description and release note, at this head):
- The Tour spec is current on
main, and the record edits listed are this pull request's own: verified (the record diff againstmainholds exactly those edits). - The edits called owner decisions (Lab removal, FR6 sentences, the AST-116 gap line, the theme attribute): no approval at this head yet.
- Steps, active step, end reasons, missing anchors, step preparation, backdrop modality and catalog words: verified (45 unit tests pass at this head).
- A step inside a dialog or a popover renders in that layer and stays usable: verified (Chromium frames of the Inside Layers story).
- Lab
Tour,TourStepanduseTourare removed, and discovery no longer lists them: verified (Lab index, official package list, route lock).
Files:
- #11117 (10/10): carried from the last review, all clear.
- #11121 (29/29): the same changes as at its last full review, merged with
main; all clear. - #11156 (34/34): the same changes as at its last review, merged with #11121; the overlay-dismissal and AST-116 record edits wait on the owner decision; the rest are clear.
- #12891 (44/44):
Tour.tsxhas thedata-backdropfinding and two comment-style notes; the AST-119, Tour, AST-116 and overlay-dismissal record edits wait on the owner decision; the rest are clear.
There was a problem hiding this comment.
Approval of #12891 waits on an engineering owner's decision on what it adds beyond the current AST-119 spec, and on two fixes. #11117 and #11121 are approved; #11121 is pending CI.
#12891 (Tour to Core): waiting on an engineering owner's decision, with two blocking findings.
- Regression: the browser test "a step after a centered step follows its own anchor in view" (
Tour.interaction.browser.spec.tslines 243–245) expects no inlinejustify-self, but since the merge ofmainthe layer always getsjustify-self: self-startwhile its anchor is in view, so the test fails even though the step sits correctly beside its anchor; assertself-start(or the absence ofunsafe) instead. data-backdrop(Tour.tsxlines 1099–1101 and 1112–1114) is a new public theme attribute that no current record names, asarchitecture:public-component-apiDEC-2 requires, so either an engineering owner approves thecomponent:Tourparagraph that names it or the attribute goes.
An engineering owner still has to approve or amend, at this head, what this pull request changes beyond main: FR6's two new sentences for steps inside dialogs and popovers, the FR9, FR10, FR13 and FR16 gap lines, dropping Firefox from the browser evidence, removing the Lab Tour with no codemod, the component:Tour data-backdrop paragraph with the tour, tour-highlight and tour-overlay theme targets, and the new spec:AST-116 FR12 gap: line. An owner also rules whether the shared useLayer change, where every anchored layer's in-view watch follows a trigger replaced while open, is a fix under spec:AST-059 FR5 or a desktop behaviour change. The new aria-disabled on Back, Next and Done while a step prepares checks out. The docsite's Vercel deployment fails at this head while it completes at #11156's head, so its log is worth a look before this is marked ready.
#11156 (isModal): waiting on an engineering owner's decision; no blocking finding. At its new head, an engineering owner has to approve its spec:AST-116 FR22 sentences, the family:overlay-dismissal FR3 gap: line, dropping Firefox from the evidence line, and PowerSearch closing its filter popover when focus moves back into the field.
#11121 (shared layer focus return): approved pending CI. An engineering owner approved its spec at its new head, the merge of main changed none of its own lines, and its suites pass; CI has not run on that head yet.
#11117 (usePopover anchorRef): approved. Its own review at its current head stands.
Whole stack: nothing blocks between the four pull requests, and each merges cleanly into main. A pull request in this stack lands only when it and every pull request below it are approved. An engineering owner records each decision by commenting /approve-spec <full head SHA> on that pull request, and the author may do so as an engineering owner.
Claims and files checked
Review mode: incremental; reason: none
Claims (#12891 at this head: the new commit, the description's new notes and its release note):
- Back, Next and Done report
aria-disabledwhile a step prepares: verified (Tour.tsxBack and Next/Done props; unit test; a Chromium probe of the Prepared Step story shows Next disabled to assistive technology, still focusable, and clear once the step shows). - This head merges
mainand the three pull requests below it: verified (the merge history; each merge keeps both sides). - One browser test fails since
mainchanged how anchored layers stay on screen: verified from the code (the test expects an empty inlinejustify-self, which the layer now always sets); the step itself sits beside its anchor in a Chromium probe. - The test counts and frames describe the previous head: stated by the description; this review reran the unit suites (2938 tests in 102 files pass) and retook two Chromium frames.
- Tour, its types and its theme targets in Core, the Lab removal, and the catalog messages, as the release note says: unchanged since the last review and still verified.
Files:
- #12891 (44/44):
Tour.tsxhas thedata-backdropfinding and two comment-style notes;Tour.interaction.browser.spec.tshas the stale assertion; the record edits wait on the owner decision; the rest are clear. - #11156 (34/34): unchanged apart from the merge; its record edits wait on the owner decision; the rest are clear.
- #11121 (29/29): unchanged apart from the merge; all clear.
- #11117 (10/10): reviewed at this head on its own; all clear.
2d74065 to
93096fe
Compare
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the record changes this pull request makes beyond main, and on one blocking finding.
data-backdrop="backdrop"on thetour-overlayandtour-highlighttheme targets (Tour.tsxlines 1109–1111 and 1127–1129) is new public theme surface that no current record names, asarchitecture:public-component-apiDEC-2 requires, so either an engineering owner approves thecomponent:Tourparagraph that names it or the visual prop goes.
An engineering owner needs to approve or amend, at this head, what the pull request changes in current records: FR6's two sentences for steps inside dialogs and popovers, the FR9, FR10, FR13, FR14 and FR16 gap lines, the browser-evidence line without Firefox, removing the Lab Tour with no codemod, the component:Tour data-backdrop paragraph with the tour, tour-highlight and tour-overlay targets and a stable Backdrop concept, and the two new sentences in spec:AST-116's FR12 gap line. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. CI has not run on this draft head, and the docsite's Vercel deployment reports a failure here; its log is worth a look before this is marked ready.
Claims and files checked
Review mode: full; reason: rebase
Claims:
- Release note:
Touris a Core component with astepsarray, an app-owned active step, a ring and an optional backdrop: verified (Tour.tsx; 46 unit tests pass). - Release note: a step left out does not exist, an anchorless step is centered,
missingAnchorBehaviorhandles a missing anchor andshowActioncan open a panel first: verified (step-list, missing-anchor and preparation tests). - Release note: without a backdrop the page stays usable; with one each step is modal: verified (unit tests; a browser probe shows
aria-modalonly with the backdrop and focus left where the person put it without it). - Release note: it replaces the Lab Tour, with each renamed prop listed: verified against the removed Lab source.
- Release note: the CLI ships a showcase and an example block and no longer lists the Lab Tour: verified (template blocks, package list, route lock).
- Description: 46 unit tests: verified (46 pass).
- Description: 23 browser tests pass in Chromium and WebKit: 23 cases counted in the spec; the runs were not reproduced.
- Description: the new
useLayertest fails onmain: verified (fails on the base, passes on the head). - Description:
usePopover's public return is unchanged and the internal return gains a focus-scope check: verified (usePopover.tsx). - Description:
ref,className,styleanddata-*land on the dialog surface: verified (host data-attribute test, unit test). - Description: a press on the backdrop does not reach handlers around Tour: verified (layer click boundary; unit test).
- Description: six catalog messages, three theme targets and
data-backdropon two of them: verified (en.json; the built API surface; a browser probe). - Description: a step whose anchor is in a dialog renders inside it and stays usable: verified (browser probe of the Inside Layers story).
- Description: generated and listed files follow the move, and the motion-audit snapshot is left as it is: verified.
- Description: first-load size deltas on the reference pages: reported, not reproduced.
Files:
packages/core/src/Tour/Tour.tsx: thedata-backdropfinding, plus two non-blocking comment-style notes.- The six record files: their edits wait on the engineering-owner decision.
- The other 40 files (Tour tests, doc, stories, template blocks, shared layer, popover and focus-region code, Lab removal, lists, locks, goldens, samples, probe theme, audit targets, release note): clear.
93096fe to
4719f8f
Compare
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the record changes this pull request makes beyond main, and on one blocking finding.
data-backdrop="backdrop"on thetour-overlayandtour-highlighttheme targets (Tour.tsxlines 1109–1111 and 1127–1129) is new public theme surface that no current record names, asarchitecture:public-component-apiDEC-2 requires, so either an engineering owner approves thecomponent:Tourparagraph that names it or the visual prop goes.
An engineering owner needs to approve or amend, at this head, what the pull request changes in current records: FR6's two sentences for steps inside dialogs and popovers, the FR9, FR10, FR13, FR14 and FR16 gap lines, the browser-evidence line without Firefox, removing the Lab Tour with no codemod, the component:Tour data-backdrop paragraph with the tour, tour-highlight and tour-overlay targets and a stable Backdrop concept, and the two new sentences in spec:AST-116's FR12 gap line. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. For the Firefox line: the browser spec passes 23 of 23 in Chromium, and 21 of 23 in Firefox, where a callout stays painted while a scrolling panel clips its anchor.
Claims and files checked
Review mode: full; reason: history
Claims:
- Release note:
Touris a Core component with astepsarray, an app-owned active step, a ring and an optional backdrop: verified (Tour.tsx; 46 unit tests pass). - Release note: a step left out does not exist, an anchorless step is centered,
missingAnchorBehaviorhandles a missing anchor andshowActioncan open a panel first: verified (step-list, missing-anchor and preparation tests). - Release note: without a backdrop the page stays usable; with one each step is modal: verified (unit and browser tests).
- Release note: it replaces the Lab Tour, with each renamed prop listed: verified against the removed Lab source.
- Release note: the CLI ships a showcase and an example block and no longer lists the Lab Tour: verified (template blocks, package list, route lock check).
- Description: 46 unit tests: verified (46 pass).
- Description: 23 browser tests pass in Chromium and WebKit: Chromium verified (23 of 23); WebKit not reproduced.
- Description: the new
useLayertest fails onmain: verified (fails on the base, passes on the head). - Description:
usePopover's public return is unchanged and the internal return gains a focus-scope check: verified (usePopover.tsx). - Description:
ref,className,styleanddata-*land on the dialog surface: verified (unit and host data-attribute tests). - Description: a press on the backdrop does not reach handlers around Tour: verified (unit test).
- Description: six catalog messages, three theme targets with
data-backdropon two, and a regenerated probe theme: verified (en.json, the generated API delta,probeTheme.ts). - Description: a step whose anchor is in a dialog or popover renders above that layer and stays usable: verified (browser tests and a probe).
- Description: listed and generated files follow the move, and the motion-audit snapshot is left as it is: verified (route-manifest, route-lock, official-package and resolution checks pass).
- Description: no other component's public API changes: verified (the generated API delta lists only Tour rows).
- Description: first-load size deltas and the axe audit result: reported, not reproduced.
- Description: the first "Changes since the last review" bullet: partly stale; most of what it lists was already in the previous push, which only added the two Sandbox routes and two comment rewrites.
Files:
packages/core/src/Tour/Tour.tsx: thedata-backdropfinding and one non-blocking comment-style suggestion.packages/core/src/Tour/Tour.doc.mjs: itsbackdropvisual props go with thedata-backdropfinding.- The six record files: their edits wait on the engineering-owner decision.
- The other 40 files (Tour tests, browser spec, stories and index; the four template block files; the shared layer, popover and focus-trap code and the layer test; the Core index, package exports, English catalog and host data-attribute test; the nine Lab removal files; the route, package and audit lists, goldens and probe theme; five renamed fixtures; the release note): clear.
4719f8f to
f8ea56f
Compare
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the record changes this pull request makes beyond main, and on one blocking finding.
data-backdrop="backdrop"on thetour-overlayandtour-highlighttargets (Tour.tsx:1109-1111,:1127-1129) is new public theme surface that no current record names (architecture:public-component-apiDEC-2): an engineering owner's approval of thecomponent:Tourparagraph that names it settles this, and otherwise thebackdropvisual prop should come off both targets andTour.doc.mjs:212and:214.
The changes to current records need an engineering owner to record the decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner: FR6's two new sentences in spec:AST-119, its FR9, FR10, FR13, FR14 and FR16 gap lines, the Platform support lines without Firefox evidence, the Lab Tour removal with no codemod, component:Tour's data-backdrop paragraph, theme targets and stable Backdrop concept, and the two sentences added to spec:AST-116's FR12 gap: line. The new Platform support sentence matches what Firefox does: 21 of 23 browser cases pass there, and the two where a scrolling panel clips the anchor keep the callout painted. The comment-style suggestion on hostAround is applied, and CI has not run on this draft head.
Claims and files checked
Review mode: full; reason: history
Claims:
- Steps are data; a step left out does not exist, and the count, Back and Next follow the array; an active step that leaves moves to the next one or ends as complete: verified (
Tour.tsx:506-543, unit tests). - The app owns the active step through
activeId, and moves and ends report throughonActiveIdChangeandonEndwith five reasons: verified (Tour.tsx:1008-1025,:1044,:1071,:991,:1122). - One popover callout mounts again for each step; a step with no anchor shows centered: verified (
Tour.tsx:595-623,:1103,:1141-1145; browser tests). - A step whose anchor is in an open modal dialog or shown popover renders in that layer; an anchorless step renders in an open modal Dialog, Drawer or BottomSheet, and on the page under other layers: verified (
Tour.tsx:412-424,:762-766; the modal outlet registry has only those three components; browser and unit tests). - Missing anchors follow
missingAnchorBehavior, are reported once, and a step waits forshowActionwhile the previous callout is unpainted, busy and ignores Back, Next and Done; Tour sets no timer: verified (Tour.tsx:712-760,:800-824,:1007-1025; tests). - Scroll into view, instant under reduced motion, off with
hasScrollIntoView={false}: verified (Tour.tsx:912-934; tests). - The ring uses CSS anchor positioning and script reads only the anchor's corner radius; without anchor positioning there is no ring and a backdrop dims the whole page: verified (
Tour.tsx:208-251,:445-454). - Without a backdrop Tab passes through and Escape ends the tour only from the callout or the anchor; with one the step is modal and a press outside ends it as backdrop: verified (
Tour.tsx:616,:989-996,:1121-1123; Chromium and Firefox browser tests). - Focus moves to the heading only from the previous callout, anchor or body, otherwise the step is announced; at the end focus goes to a focusable anchor or the shared return: verified (
Tour.tsx:697-709,:778-784,:939-986; tests). - Six catalog messages, and three label props: verified (
locales/en.json,Tour.tsx:1042-1090). - New Core exports and the
./Tourentry point, with standard element props on the dialog: verified (API surface comparison; host data-attribute test). - The CLI ships a showcase and an example block, and the changeset names both packages: verified.
- The Lab Tour, TourStep and useTour are removed, and the changeset's renames match the Lab props: verified (base Lab
Tour.tsxandTourStep.tsx). - Three theme targets with
data-backdropon two, and a regenerated probe theme: verified (API surface comparison;probeTheme.ts). - The generated and listed files follow the move, and the older motion audit snapshot is left as it is: verified.
- The shared popover, layer and focus-region edits behave as described, and the replaced-trigger test fails on main: verified (red-first run of
useLayer.test.tsx). - No other component's public API changes: verified (API surface comparison: 14 rows, all Tour).
- 46 unit tests and 23 browser tests: verified (counted; Chromium 23 of 23 in this review).
- Firefox passes 21 of 23, failing only the two clipped-anchor cases: verified (this review's Firefox run).
- WebKit 23 of 23, the axe audit, the contrast figures and the first-load size deltas: stated, not reproduced in this review.
- Since the last review only the Platform support sentence and one comment changed: verified.
Files:
.changeset/tour-core.md: clear.github/a11y-audit-axe.json: clear.github/playwright-leg-durations.json: clearapps/docsite/src/__tests__/component-detail-resolve-elements.test.ts: clearapps/sandbox/scripts/next-export-routes.json: clearapps/storybook/rtl-audit/targets.json: clearapps/storybook/stories/Tour.stories.tsx: cleardocs/architecture/react-component-runtime.md: held with the Lab removal (one clause dropped)docs/families/overlay-dismissal.md: held with the Lab removal (member, row, FR2 gap line)docs/specs/AST-038-layer-text-boundary/spec.md: held with the Lab removal (Tour named in the table)docs/specs/AST-116-popover-anchoring/spec.md: held for an engineering owner (two FR12 gap-line sentences)docs/specs/AST-119-tour/spec.md: held for an engineering owner (FR6 sentences, gap lines, Platform support, Lab removal, DEC-5)docs/specs/components/Tour/Tour.spec.md: held for an engineering owner (data-backdrop paragraph, theme targets, concept rows)internal/shadcn-registry/routes.lock.json: clearpackages/cli/assets/discover/official-packages.json: clearpackages/cli/assets/templates/blocks/components/Tour/TourBackdrop.doc.mjs: clearpackages/cli/assets/templates/blocks/components/Tour/TourBackdrop.tsx: clearpackages/cli/assets/templates/blocks/components/Tour/TourShowcase.doc.mjs: clearpackages/cli/assets/templates/blocks/components/Tour/TourShowcase.tsx: clearpackages/cli/foundation/discovery/component-discovery.export-names.test.mjs: clearpackages/cli/test/__golden__/no-icon-set/search-icon-set.json: clearpackages/cli/test/__golden__/no-icon-set/search-icon-set.txt: clearpackages/cli/test/swizzle-proof/samples.mjs: clearpackages/core/locales/en.json: clearpackages/core/package.json: clearpackages/core/src/Layer/useLayer.test.tsx: clearpackages/core/src/Layer/useLayer.tsx: clearpackages/core/src/Popover/usePopover.tsx: clearpackages/core/src/Tour/Tour.doc.mjs: follows the blocking finding:visualProps: ['backdrop']at lines 212 and 214packages/core/src/Tour/Tour.test.tsx: clearpackages/core/src/Tour/Tour.tsx: blocking:data-backdropwith no current record (lines 1109-1111, 1127-1129)packages/core/src/Tour/__tests__/Tour.interaction.browser.spec.ts: clearpackages/core/src/Tour/index.ts: clearpackages/core/src/__tests__/hostDataAttributes.test.tsx: clearpackages/core/src/hooks/useFocusTrap.ts: clearpackages/core/src/index.ts: clearpackages/lab/src/Tour/Tour.doc.mjs: clearpackages/lab/src/Tour/Tour.test.tsx: clearpackages/lab/src/Tour/Tour.tsx: clearpackages/lab/src/Tour/TourContext.ts: clearpackages/lab/src/Tour/TourStep.tsx: clearpackages/lab/src/Tour/__tests__/TourCardTarget.interaction.browser.spec.ts: clearpackages/lab/src/Tour/index.ts: clearpackages/lab/src/Tour/useTour.ts: clearpackages/lab/src/index.ts: clearpackages/themes/probe/src/probeTheme.ts: clearscripts/check-cli-official-packages.test.mjs: clearscripts/score-ledger.test.mjs: clear
f8ea56f to
4b8f70b
Compare
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the record changes this pull request makes beyond main, and on one blocking finding.
data-backdrop="backdrop"on thetour-overlayandtour-highlighttargets (Tour.tsx:1109-1111,:1127-1129) is new public theme surface that no current record names (architecture:public-component-apiDEC-2): an engineering owner's approval of thecomponent:Tourparagraph that names it settles this, and otherwise thebackdropvisual prop should come off both targets andTour.doc.mjs:212and:214.
The changes to current records need an engineering owner to record the decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner: FR6's two new sentences in spec:AST-119, its FR9, FR10, FR13, FR14 and FR16 gap lines, the Platform support lines without Firefox evidence, the Lab Tour removal with no codemod, component:Tour's data-backdrop paragraph, theme targets and stable Backdrop concept, and the two sentences added to spec:AST-116's FR12 gap: line. The Platform support sentence matches what Firefox does: 21 of 23 browser cases pass there, and the two where a scrolling panel clips the anchor keep the callout painted. One optional suggestion: the step announcement reads the heading's textContent, so aria-hidden text in a title is spoken (Tour.tsx:983-985).
Claims and files checked
Review mode: full; reason: rebase
Claims:
- Steps are data; a step left out does not exist, and the count, Back and Next follow the array; an active step that leaves moves to the next one or ends as complete: verified (
Tour.tsx:506-543, unit tests). - The app owns the active step through
activeId, and moves and ends report throughonActiveIdChangeandonEndwith five reasons: verified (Tour.tsx:1008-1025,:1044,:1071,:991,:1122). - One popover callout mounts again for each step; a step with no anchor shows centered: verified (
Tour.tsx:595-623,:1103,:1141-1145; browser tests). - A step whose anchor is in an open modal dialog or shown popover renders in that layer; an anchorless step renders in an open modal Dialog, Drawer or BottomSheet, and on the page under other layers: verified (
Tour.tsx:412-424,:762-766; browser and unit tests). - Missing anchors follow
missingAnchorBehavior, are reported once, and a step waits forshowActionwhile the previous callout is unpainted, busy and ignores Back, Next and Done; Tour sets no timer: verified (Tour.tsx:712-760,:800-824,:1007-1025; tests). - Scroll into view, instant under reduced motion, off with
hasScrollIntoView={false}: verified (Tour.tsx:912-934; tests). - The ring uses CSS anchor positioning and script reads only the anchor's corner radius; without anchor positioning there is no ring and a backdrop dims the whole page: verified (
Tour.tsx:208-251,:445-454). - Without a backdrop Tab passes through and Escape ends the tour only from the callout or the anchor; with one the step is modal and a press outside ends it as backdrop: verified (
Tour.tsx:616,:989-996,:1121-1123; Chromium and Firefox browser tests). - Focus moves to the heading only from the previous callout, anchor or body, otherwise the step is announced; at the end focus goes to a focusable anchor or the shared return: verified (
Tour.tsx:697-709,:778-784,:939-986; tests). - Six catalog messages, and three label props: verified (
locales/en.json,Tour.tsx:1042-1090). - New Core exports and the
./Tourentry point, with standard element props on the dialog: verified (API surface comparison; host data-attribute test). - The CLI ships a showcase and an example block, the changeset names both packages, and the CLI's derived package list no longer names the Lab Tour: verified (the list generator lists Lab Tour and TourStep on the base and neither on the head).
- The Lab Tour, TourStep and useTour are removed, and the changeset's renames match the Lab props: verified (base Lab
Tour.tsxandTourStep.tsx). - Three theme targets with
data-backdropon two, and a regenerated probe theme: verified (API surface comparison;probeTheme.ts). - The generated and listed files follow the move, and the older motion audit snapshot is left as it is: verified (docsite route-lock step and Sandbox route test).
- The shared popover, layer and focus-region edits behave as described, and the replaced-trigger test fails on main: verified (shared suites; the red-first run on the identical code).
- No other component's public API changes: verified (API surface comparison: 14 rows, all Tour).
- 46 unit tests and 23 browser tests: verified (counted; Chromium 23 of 23 in this review).
- Firefox passes 21 of 23, failing only the two clipped-anchor cases: verified (this review's Firefox run).
- WebKit 23 of 23, the axe audit, the contrast figures and the first-load size deltas: stated, not reproduced in this review.
- This head is a rebase onto main that drops the edit to the package list main no longer commits: verified (the rest of the patch is unchanged).
Files:
.changeset/tour-core.md: clear.github/a11y-audit-axe.json: clear.github/playwright-leg-durations.json: clearapps/docsite/src/__tests__/component-detail-resolve-elements.test.ts: clearapps/sandbox/scripts/next-export-routes.json: clearapps/storybook/rtl-audit/targets.json: clearapps/storybook/stories/Tour.stories.tsx: cleardocs/architecture/react-component-runtime.md: held with the Lab removal (one clause dropped)docs/families/overlay-dismissal.md: held with the Lab removal (member, row, FR2 gap line)docs/specs/AST-038-layer-text-boundary/spec.md: held with the Lab removal (Tour named in the table)docs/specs/AST-116-popover-anchoring/spec.md: held for an engineering owner (two FR12 gap-line sentences)docs/specs/AST-119-tour/spec.md: held for an engineering owner (FR6 sentences, gap lines, Platform support, Lab removal, DEC-5)docs/specs/components/Tour/Tour.spec.md: held for an engineering owner (data-backdrop paragraph, theme targets, concept rows)internal/shadcn-registry/routes.lock.json: clearpackages/cli/assets/templates/blocks/components/Tour/TourBackdrop.doc.mjs: clearpackages/cli/assets/templates/blocks/components/Tour/TourBackdrop.tsx: clearpackages/cli/assets/templates/blocks/components/Tour/TourShowcase.doc.mjs: clearpackages/cli/assets/templates/blocks/components/Tour/TourShowcase.tsx: clearpackages/cli/foundation/discovery/component-discovery.export-names.test.mjs: clearpackages/cli/scripts/generate-official-packages.test.mjs: clearpackages/cli/test/__golden__/no-icon-set/search-icon-set.json: clearpackages/cli/test/__golden__/no-icon-set/search-icon-set.txt: clearpackages/cli/test/swizzle-proof/samples.mjs: clearpackages/core/locales/en.json: clearpackages/core/package.json: clearpackages/core/src/Layer/useLayer.test.tsx: clearpackages/core/src/Layer/useLayer.tsx: clearpackages/core/src/Popover/usePopover.tsx: clearpackages/core/src/Tour/Tour.doc.mjs: follows the blocking finding:visualProps: ['backdrop']at lines 212 and 214packages/core/src/Tour/Tour.test.tsx: clearpackages/core/src/Tour/Tour.tsx: blocking:data-backdropwith no current record (lines 1109-1111, 1127-1129); non-blocking: the step announcement speaksaria-hiddentitle text (lines 983-985)packages/core/src/Tour/__tests__/Tour.interaction.browser.spec.ts: clearpackages/core/src/Tour/index.ts: clearpackages/core/src/__tests__/hostDataAttributes.test.tsx: clearpackages/core/src/hooks/useFocusTrap.ts: clearpackages/core/src/index.ts: clearpackages/lab/src/Tour/Tour.doc.mjs: clearpackages/lab/src/Tour/Tour.test.tsx: clearpackages/lab/src/Tour/Tour.tsx: clearpackages/lab/src/Tour/TourContext.ts: clearpackages/lab/src/Tour/TourStep.tsx: clearpackages/lab/src/Tour/__tests__/TourCardTarget.interaction.browser.spec.ts: clearpackages/lab/src/Tour/index.ts: clearpackages/lab/src/Tour/useTour.ts: clearpackages/lab/src/index.ts: clearpackages/themes/probe/src/probeTheme.ts: clearscripts/score-ledger.test.mjs: clear
4b8f70b to
7a65ef4
Compare
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the record changes this pull request makes beyond main, and on one blocking finding.
data-backdrop="backdrop"on thetour-overlayandtour-highlighttargets (Tour.tsx:1113-1115,:1131-1133) is new public theme surface that no current record names (architecture:public-component-apiDEC-2): an engineering owner's approval of thecomponent:Tourparagraph that names it settles this, and otherwise thebackdropvisual prop should come off both targets andTour.doc.mjs:212and:214.
The changes to current records need an engineering owner to record the decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner: FR6's two new sentences in spec:AST-119, its FR9, FR10, FR13, FR14 and FR16 gap lines, the Platform support lines without Firefox evidence, the Lab Tour removal with no codemod, component:Tour's data-backdrop paragraph, theme targets and stable Backdrop concept, and the two sentences added to spec:AST-116's FR12 gap: line. The Platform support sentence matches what Firefox does: 21 of 23 browser cases pass there, and the two where a scrolling panel clips the anchor keep the callout painted. The step announcement now leaves aria-hidden title text out, which settles the earlier suggestion.
Claims and files checked
Review mode: full; reason: history
Claims:
- Steps are data: a step left out of the array does not exist, the count, Back and Next follow the array, and an active step that leaves moves to the next one or ends as complete: verified (
Tour.tsx:507-543; unit tests). - The app owns the active step through
activeId, and moves and ends report throughonActiveIdChangeandonEndwith five reasons: verified (Tour.tsx:1012-1029,:1048,:1075,:995,:1126). - One popover callout mounts again for each step, and a step with no anchor shows centered: verified (
Tour.tsx:596-624,:1107,:1145-1149; browser tests). - A step whose anchor is in an open modal dialog or shown popover renders in that layer, and an anchorless step renders in an open modal Dialog, Drawer or BottomSheet and on the page under other layers: verified (
Tour.tsx:413-425,:765-767; browser and unit tests). - Missing anchors follow
missingAnchorBehaviorand are reported once, and a step waits forshowActionwhile the previous callout is unpainted, busy and ignores Back, Next and Done; Tour sets no timer: verified (Tour.tsx:713-761,:802-825,:1012-1029; tests). - An anchor out of view scrolls into view, at once under reduced motion, and not with
hasScrollIntoView={false}: verified (Tour.tsx:913-935; tests). - The ring uses CSS anchor positioning and script reads only the anchor's corner radius; without anchor positioning there is no ring and a backdrop dims the whole page: verified (
Tour.tsx:209-252,:446-455). - Without a backdrop Tab passes through and Escape ends the tour only from the callout or the anchor; with one the step is modal and a press outside ends it as backdrop: verified (
Tour.tsx:617,:993-1000,:1125-1127; Chromium and Firefox browser tests). - Focus moves to the heading only from the previous callout, anchor or page body, otherwise the step is announced; at the end focus goes to a focusable anchor or the shared return: verified (
Tour.tsx:698-710,:779-785,:940-990; tests). - New at this head, the step announcement leaves out
aria-hiddentext in a title, and its unit test has such a title: verified (Tour.tsx:986-989;Tour.test.tsx:872-903). - Six catalog messages, and three label props that reword Next, Done and Skip: verified (
locales/en.json;Tour.tsx:1046-1094). - New Core exports and the
./Tourentry point, with the standard element props on the dialog: verified (API surface comparison; host data-attribute test). - The CLI ships a showcase and an example block, the release note names both packages, and the CLI's derived package list no longer names the Lab Tour: verified (template files; the list generator names Lab Tour and TourStep on the base and neither on the head).
- The Lab Tour, TourStep and useTour are removed, and the release note's renames match the Lab props: verified (base Lab
Tour.tsxandTourStep.tsx). - Three theme targets with
data-backdropon two, and a regenerated probe theme: verified (API surface comparison;probeTheme.ts). - The generated and listed files follow the move, and the older motion audit snapshot is left as it is: verified (Sandbox route test; route lock unchanged since the last run of its check;
motionAudit.tsuntouched). - The shared popover, layer and focus-region edits behave as described, and the replaced-trigger test fails on
main: verified (shared suites at this head; the red-first run was done earlier on identical code). - No other component's public API changes: verified (API surface comparison: 14 rows, all Tour).
- 46 unit tests and 23 browser tests: verified (counted; Chromium 23 of 23 at this head).
- Firefox passes 21 of 23, failing only the two clipped-anchor cases: verified (this review's Firefox run).
- WebKit 23 of 23, the axe audit, the contrast figures, the first-load size deltas, and the 2,568-test unit run, lint and typecheck reported for this head: stated, not reproduced in this review (this review ran its own unit set: 1,261 passed).
Files:
.changeset/tour-core.md: clear.github/a11y-audit-axe.json: clear.github/playwright-leg-durations.json: clearapps/docsite/src/__tests__/component-detail-resolve-elements.test.ts: clearapps/sandbox/scripts/next-export-routes.json: clearapps/storybook/rtl-audit/targets.json: clearapps/storybook/stories/Tour.stories.tsx: cleardocs/architecture/react-component-runtime.md: waits on the Lab removal decision (one clause dropped)docs/families/overlay-dismissal.md: waits on the Lab removal decision (member, row, FR2 gap line)docs/specs/AST-038-layer-text-boundary/spec.md: waits on the Lab removal decision (Tour named in the table)docs/specs/AST-116-popover-anchoring/spec.md: waits on an engineering owner (two FR12 gap-line sentences)docs/specs/AST-119-tour/spec.md: waits on an engineering owner (FR6 sentences, gap lines, Platform support, Lab removal, DEC-5)docs/specs/components/Tour/Tour.spec.md: waits on an engineering owner (data-backdrop paragraph, theme targets, concept rows)internal/shadcn-registry/routes.lock.json: clearpackages/cli/assets/templates/blocks/components/Tour/TourBackdrop.doc.mjs: clearpackages/cli/assets/templates/blocks/components/Tour/TourBackdrop.tsx: clearpackages/cli/assets/templates/blocks/components/Tour/TourShowcase.doc.mjs: clearpackages/cli/assets/templates/blocks/components/Tour/TourShowcase.tsx: clearpackages/cli/foundation/discovery/component-discovery.export-names.test.mjs: clearpackages/cli/scripts/generate-official-packages.test.mjs: clearpackages/cli/test/__golden__/no-icon-set/search-icon-set.json: clearpackages/cli/test/__golden__/no-icon-set/search-icon-set.txt: clearpackages/cli/test/swizzle-proof/samples.mjs: clearpackages/core/locales/en.json: clearpackages/core/package.json: clearpackages/core/src/Layer/useLayer.test.tsx: clearpackages/core/src/Layer/useLayer.tsx: clearpackages/core/src/Popover/usePopover.tsx: clearpackages/core/src/Tour/Tour.doc.mjs: follows the blocking finding:visualProps: ['backdrop']at lines 212 and 214packages/core/src/Tour/Tour.test.tsx: clearpackages/core/src/Tour/Tour.tsx: blocking:data-backdropwith no current record (lines 1113-1115, 1131-1133)packages/core/src/Tour/__tests__/Tour.interaction.browser.spec.ts: clearpackages/core/src/Tour/index.ts: clearpackages/core/src/__tests__/hostDataAttributes.test.tsx: clearpackages/core/src/hooks/useFocusTrap.ts: clearpackages/core/src/index.ts: clearpackages/lab/src/Tour/Tour.doc.mjs: clearpackages/lab/src/Tour/Tour.test.tsx: clearpackages/lab/src/Tour/Tour.tsx: clearpackages/lab/src/Tour/TourContext.ts: clearpackages/lab/src/Tour/TourStep.tsx: clearpackages/lab/src/Tour/__tests__/TourCardTarget.interaction.browser.spec.ts: clearpackages/lab/src/Tour/index.ts: clearpackages/lab/src/Tour/useTour.ts: clearpackages/lab/src/index.ts: clearpackages/themes/probe/src/probeTheme.ts: clearscripts/score-ledger.test.mjs: clear
7a65ef4 to
732caa5
Compare
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the record changes this pull request makes beyond main, and on two blocking findings.
data-backdrop="backdrop"on thetour-overlayandtour-highlighttargets (Tour.tsx:1113-1115,:1131-1133) is new public theme surface that no current record names (architecture:public-component-apiDEC-2): an engineering owner's approval of thecomponent:Tourparagraph that names it settles this, and otherwise thebackdropvisual prop should come off both targets andTour.doc.mjs:212and:214.- Miss: the step announcement reads the heading and calls
announcein Tour's own layout effect (Tour.tsx:986-989), whilearchitecture:react-component-runtimeINV10 puts every own-content announcement in the shareduseAnnounceRenderedText; decide at step start whether the step announces, pass that as the hook'sisShownwith the step id as its occasion, remove the local branch, and add Tour to the hook's adopters test.
The changes to current records need an engineering owner to record the decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner: FR6's two new sentences in spec:AST-119, its FR9, FR10, FR13, FR14 and FR16 gap lines, the Platform support lines without Firefox evidence, the Lab Tour removal with no codemod, component:Tour's data-backdrop paragraph, theme targets and stable Backdrop concept, and the two sentences added to spec:AST-116's FR12 gap: line. The announcement finding is independent of that decision.
Claims and files checked
Review mode: full; reason: rebase
Claims:
- Steps are data: a step left out of the array does not exist, the count, Back and Next follow the array, and an active step that leaves moves to the next one or ends as complete: verified (
Tour.tsx:507-543; unit tests). - The app owns the active step through
activeId, and moves and ends report throughonActiveIdChangeandonEndwith five reasons: verified (Tour.tsx:1012-1029,:995,:1048,:1075,:1126). - One popover callout mounts again for each step, and a step with no anchor shows centered: verified (
Tour.tsx:596-624,:1107,:1145-1149; Centered Step probe). - A step whose anchor is in an open modal dialog or shown popover renders in that layer, and an anchorless step renders in an open modal Dialog, Drawer or BottomSheet and on the page under other layers: verified (
Tour.tsx:413-425,:765-767; unit tests; Inside Layers probe). - Missing anchors follow
missingAnchorBehaviorand are reported once, and a step waits forshowActionwhile the previous callout is unpainted, busy and ignores Back, Next and Done; Tour sets no timer: verified (Tour.tsx:713-761,:802-825,:1012-1029; unit tests). - An anchor out of view scrolls into view, at once under reduced motion, and not with
hasScrollIntoView={false}: verified (Tour.tsx:913-935; unit test). - The ring uses CSS anchor positioning and script reads only the anchor's corner radius; without anchor positioning there is no ring and a backdrop dims the whole page: verified (
Tour.tsx:209-252,:446-455). - Without a backdrop Tab passes through and Escape ends the tour only from the callout or the anchor; with one the step is modal and a press outside ends it as backdrop: verified (
Tour.tsx:617,:993-1000,:1125-1127; unit tests). - Focus moves to the heading only from the previous callout, anchor or page body, otherwise the step is announced; at the end focus goes to a focusable anchor or the shared return: verified (
Tour.tsx:698-710,:779-785,:940-990; unit tests), with the announcement path as the second finding above. - The step announcement leaves out
aria-hiddentext in a title, with a unit test: verified (Tour.tsx:986;Tour.test.tsx:872-903). - Six catalog messages, and three label props that reword Next, Done and Skip: verified (
locales/en.json;Tour.tsx:1074,:1090-1094). - New Core exports and the
./Tourentry point, with the standard element props on the dialog: verified (API surface comparison; host data-attribute test). - The CLI ships a showcase and an example block, and the release note names both packages: verified (template files;
.changeset/tour-core.md). - The Lab Tour, TourStep and useTour are removed, and the release note's renames match the Lab props: verified (base Lab
Tour.tsxandTourStep.tsx). - Three theme targets with
data-backdropon two, and a regenerated probe theme: verified (API surface comparison;probeTheme.ts). - The generated and listed files follow the move, the icon-set search golden counts one more match, and the older motion audit snapshot is left as it is: verified (route-manifest and golden tests pass;
motionAudit.tsuntouched). - The shared popover, layer and focus-region edits behave as described, and the replaced-trigger test fails on
main: verified (shared suites pass;useLayer.tsxonmainis unchanged since the red-first run). - No other component's public API changes: verified (API surface comparison: 14 rows, all Tour).
- 46 unit tests and 23 browser tests: verified by count.
- Chromium, WebKit and Firefox browser results, the axe audit, the contrast figures, the first-load size deltas and the 5,805-test run: stated, not reproduced (this review ran 1,033 unit tests at this head).
Files:
.changeset/tour-core.md: clear.github/a11y-audit-axe.json: clear.github/playwright-leg-durations.json: clearapps/docsite/src/__tests__/component-detail-resolve-elements.test.ts: clearapps/sandbox/scripts/next-export-routes.json: clearapps/storybook/rtl-audit/targets.json: clearapps/storybook/stories/Tour.stories.tsx: cleardocs/architecture/react-component-runtime.md: waits on the Lab removal decision (one clause dropped)docs/families/overlay-dismissal.md: waits on the Lab removal decision (member, row, FR2 gap line)docs/specs/AST-038-layer-text-boundary/spec.md: waits on the Lab removal decision (Tour named in the table)docs/specs/AST-116-popover-anchoring/spec.md: waits on an engineering owner (two FR12 gap-line sentences)docs/specs/AST-119-tour/spec.md: waits on an engineering owner (FR6 sentences, gap lines, Platform support, Lab removal, DEC-5)docs/specs/components/Tour/Tour.spec.md: waits on an engineering owner (data-backdrop paragraph, theme targets, concept rows)internal/shadcn-registry/routes.lock.json: clearpackages/cli/assets/templates/blocks/components/Tour/TourBackdrop.doc.mjs: clearpackages/cli/assets/templates/blocks/components/Tour/TourBackdrop.tsx: clearpackages/cli/assets/templates/blocks/components/Tour/TourShowcase.doc.mjs: clearpackages/cli/assets/templates/blocks/components/Tour/TourShowcase.tsx: clearpackages/cli/foundation/discovery/component-discovery.export-names.test.mjs: clearpackages/cli/scripts/generate-official-packages.test.mjs: clearpackages/cli/test/__golden__/no-icon-set/search-icon-set.json: clearpackages/cli/test/__golden__/no-icon-set/search-icon-set.txt: clearpackages/cli/test/swizzle-proof/samples.mjs: clearpackages/core/locales/en.json: clearpackages/core/package.json: clearpackages/core/src/Layer/useLayer.test.tsx: clearpackages/core/src/Layer/useLayer.tsx: clearpackages/core/src/Popover/usePopover.tsx: clearpackages/core/src/Tour/Tour.doc.mjs: follows the first blocking finding:visualProps: ['backdrop']at lines 212 and 214packages/core/src/Tour/Tour.test.tsx: clearpackages/core/src/Tour/Tour.tsx: blocking:data-backdropwith no current record (lines 1113-1115, 1131-1133); blocking: own announcement path (lines 986-989)packages/core/src/Tour/__tests__/Tour.interaction.browser.spec.ts: clearpackages/core/src/Tour/index.ts: clearpackages/core/src/__tests__/hostDataAttributes.test.tsx: clearpackages/core/src/hooks/useFocusTrap.ts: clearpackages/core/src/index.ts: clearpackages/lab/src/Tour/Tour.doc.mjs: clearpackages/lab/src/Tour/Tour.test.tsx: clearpackages/lab/src/Tour/Tour.tsx: clearpackages/lab/src/Tour/TourContext.ts: clearpackages/lab/src/Tour/TourStep.tsx: clearpackages/lab/src/Tour/__tests__/TourCardTarget.interaction.browser.spec.ts: clearpackages/lab/src/Tour/index.ts: clearpackages/lab/src/Tour/useTour.ts: clearpackages/lab/src/index.ts: clearpackages/themes/probe/src/probeTheme.ts: clearscripts/score-ledger.test.mjs: clear
…-owned active step
732caa5 to
7774db3
Compare
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the record changes this pull request makes beyond main, and on one blocking finding. The step announcement now goes through the shared own-content announcer, which fixes the earlier blocking finding.
data-backdrop="backdrop"on thetour-overlayandtour-highlighttargets (Tour.tsx:1116-1118,:1134-1136) is new public theme surface that no current record names (architecture:public-component-apiDEC-2): an engineering owner's approval of thecomponent:Tourparagraph that names it settles this, and otherwise thebackdropvisual prop should come off both targets andTour.doc.mjs:212and:214.
The changes to current records need an engineering owner to record the decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner: FR6's two new sentences in spec:AST-119, its FR9, FR10, FR13, FR14 and FR16 gap lines, the Platform support lines without Firefox evidence, the Lab Tour removal with no codemod, component:Tour's data-backdrop paragraph, theme targets and stable concept rows, and the two sentences added to spec:AST-116's FR12 gap: line.
Claims and files checked
Review mode: full; reason: history
Claims:
- Steps are data: a step left out of the array does not exist, the count, Back and Next follow the array, and an active step that leaves moves to the next one or ends as complete: verified (
Tour.tsx:513-550,:669-679; unit tests). - The app owns the active step through
activeId, and moves and ends report throughonActiveIdChangeandonEndwith five reasons: verified (Tour.tsx:1015-1032,:998,:1051,:1078,:1129). - One popover callout mounts again for each step, and a step with no anchor shows centered: verified (
Tour.tsx:577-630,:1110,:1148-1152; Centered Step probe). - A step whose anchor is in an open modal dialog or shown popover renders in that layer, and an anchorless step renders in an open modal Dialog, Drawer or BottomSheet and on the page under other layers: verified (
Tour.tsx:420-432,:769-773; unit tests; Inside Layers probe). - Missing anchors follow
missingAnchorBehaviorand are reported once, and a step waits forshowActionwhile the previous callout is unpainted, busy and ignores Back, Next and Done; Tour sets no timer: verified (Tour.tsx:719-767,:806-830,:1015-1032; unit tests). - An anchor out of view scrolls into view, at once under reduced motion, and not with
hasScrollIntoView={false}: verified (Tour.tsx:918-940; unit test). - The ring uses CSS anchor positioning and script reads only the anchor's corner radius; without anchor positioning there is no ring and a backdrop dims the whole page: verified (
Tour.tsx:214-251,:453-462). - Without a backdrop Tab passes through and Escape ends the tour only from the callout or the anchor; with one the step is modal and a press outside ends it as backdrop: verified (
Tour.tsx:623,:996-1003,:1128-1130; unit tests). - Focus moves to the heading only from the previous callout, anchor or page body, otherwise the step is announced politely; at the end focus goes to a focusable anchor or the shared return: verified (
Tour.tsx:704-716,:785-789,:945-993; unit tests; Default and Centered Step probes). - New at this head: the announcement goes through the shared own-content announcer, a restart at the same step is announced again, and Tour is in the announcer's adopters test: verified (
Tour.tsx:988-993,:368-370;Tour.test.tsx"announces a step again when the tour starts again at it";useAnnounceRenderedText.adopters.test.tsx). - The announcement leaves out
aria-hiddentext in a title: verified (the shared hook dropsaria-hiddenandhiddencontent; unit test). - Six catalog messages, and three label props that reword Next, Done and Skip: verified (
locales/en.json;Tour.tsx:1077,:1093-1097). - New Core exports and the
./Tourentry point, with the standard element props on the dialog: verified (API surface comparison; host data-attribute test). - The CLI ships a showcase and an example block, and the release note names both packages: verified (template files;
.changeset/tour-core.md). - The Lab Tour, TourStep and useTour are removed, and the release note's renames match the Lab props: verified (base Lab
Tour.tsxandTourStep.tsx). - Three theme targets with
data-backdropon two, and a regenerated probe theme: verified (API surface comparison; the probe generator rewritesprobeTheme.tsidentically). - The generated and listed files follow the move, the icon-set search golden counts one more match, and the older motion audit snapshot is left as it is: verified (route-manifest and golden tests pass;
motionAudit.tsuntouched). - The shared popover, layer and focus-region edits behave as described, and the replaced-trigger test fails on
main: verified (shared suites pass; the test fails on the base, whereuseLayer.tsxmatchesmain). - No other component's public API changes: verified (API surface comparison: 14 rows, all Tour).
- 47 unit tests and 24 browser tests: verified by count.
- Chromium, WebKit and Firefox browser results, the axe audit, the contrast figures, the first-load size deltas, the preview build and the 5,807-test run: stated, not reproduced (this review ran 892 unit and 154 Node tests at this head).
Files:
.changeset/tour-core.md: clear.github/a11y-audit-axe.json: clear.github/playwright-leg-durations.json: clearapps/docsite/src/__tests__/component-detail-resolve-elements.test.ts: clearapps/sandbox/scripts/next-export-routes.json: clearapps/storybook/rtl-audit/targets.json: clearapps/storybook/stories/Tour.stories.tsx: cleardocs/architecture/react-component-runtime.md: waits on the Lab removal decision (one clause dropped)docs/families/overlay-dismissal.md: waits on the Lab removal decision (member, row, FR2 gap line)docs/specs/AST-038-layer-text-boundary/spec.md: waits on the Lab removal decision (Tour named in the table)docs/specs/AST-116-popover-anchoring/spec.md: waits on an engineering owner (two FR12 gap-line sentences)docs/specs/AST-119-tour/spec.md: waits on an engineering owner (FR6 sentences, gap lines, Platform support, Lab removal, DEC-5)docs/specs/components/Tour/Tour.spec.md: waits on an engineering owner (data-backdrop paragraph, theme targets, concept stability)internal/shadcn-registry/routes.lock.json: clearpackages/cli/assets/templates/blocks/components/Tour/TourBackdrop.doc.mjs: clearpackages/cli/assets/templates/blocks/components/Tour/TourBackdrop.tsx: clearpackages/cli/assets/templates/blocks/components/Tour/TourShowcase.doc.mjs: clearpackages/cli/assets/templates/blocks/components/Tour/TourShowcase.tsx: clearpackages/cli/foundation/discovery/component-discovery.export-names.test.mjs: clearpackages/cli/scripts/generate-official-packages.test.mjs: clearpackages/cli/test/__golden__/no-icon-set/search-icon-set.json: clearpackages/cli/test/__golden__/no-icon-set/search-icon-set.txt: clearpackages/cli/test/swizzle-proof/samples.mjs: clearpackages/core/locales/en.json: clearpackages/core/package.json: clearpackages/core/src/Layer/useLayer.test.tsx: clearpackages/core/src/Layer/useLayer.tsx: clearpackages/core/src/Popover/usePopover.tsx: clearpackages/core/src/Tour/Tour.doc.mjs: follows the blocking finding:visualProps: ['backdrop']at lines 212 and 214packages/core/src/Tour/Tour.test.tsx: clearpackages/core/src/Tour/Tour.tsx: blocking:data-backdropwith no current record (lines 1116-1118, 1134-1136); the announcement now uses the shared hook (lines 988-993)packages/core/src/Tour/__tests__/Tour.interaction.browser.spec.ts: clearpackages/core/src/Tour/index.ts: clearpackages/core/src/__tests__/hostDataAttributes.test.tsx: clearpackages/core/src/hooks/useAnnounceRenderedText.adopters.test.tsx: clearpackages/core/src/hooks/useFocusTrap.ts: clearpackages/core/src/index.ts: clearpackages/lab/src/Tour/Tour.doc.mjs: clearpackages/lab/src/Tour/Tour.test.tsx: clearpackages/lab/src/Tour/Tour.tsx: clearpackages/lab/src/Tour/TourContext.ts: clearpackages/lab/src/Tour/TourStep.tsx: clearpackages/lab/src/Tour/__tests__/TourCardTarget.interaction.browser.spec.ts: clearpackages/lab/src/Tour/index.ts: clearpackages/lab/src/Tour/useTour.ts: clearpackages/lab/src/index.ts: clearpackages/themes/probe/src/probeTheme.ts: clearscripts/score-ledger.test.mjs: clear
User need
A product tour introduces a feature one step at a time. The Lab
Tourcould not make a step conditional, could not be driven by the app, showed nothing useful when a step's control was missing, and had English-only controls. Apps that hide a control behind a flag, resume a tour, or continue it on another page had no way to say so.Problem and solution fit
Tourmoves from Lab to Core with the contract ofspec:AST-119:stepsis an array of{id, title, body, anchorRef, placement, alignment, showAction}. A step left out of the array does not exist: the count, Back and Next follow the array. When the active step leaves the array, the step after it becomes active, or the tour ends as'complete'.activeIdnames it andnullstops the tour. Back, Next and a skipped step report throughonActiveIdChange; every end reports its reason throughonEnd:'complete','skip','close','escape'or'backdrop'.usePopoversurface that stays open for the whole tour and takes each step'sanchorRef(spec:AST-116FR3). Each step mounts its element again, so the callout enters the top layer after everything that opened before the step, and its controls take their place in the Tab order after that step's anchor. A step with no anchor shows in the center of the viewport.<dialog>it renders on the page. A modal that opens during a step whose anchor is on the page leaves the callout where it is. A step'sshowActioncan open the layer first.missingAnchorBehavioris'center'(default),'skipStep'(in the direction of travel) or'endTour'. Each step that starts without its anchor is reported once throughonMissingAnchor. A step'sshowActionruns first, and the step waits for its promise. Until it settles, the callout of the step before it is not painted, reportsaria-busy, keeps the focus it has, and ignores Back, Next and Done; its close control, Skip and Escape still end the tour (FR9 gap:). Tour sets no timer.hasScrollIntoView={false}leaves it to the app.hasBackdropthe ring's shadow dims the rest of the page. In a browser without CSS anchor positioning there is no ring, and a backdrop dims the whole page (FR13 gap:).usePopoverpopover withtabBehavior: 'pageOrder': Tab leaves the callout in page order, the anchor stays usable, and Escape ends the tour only while focus is in the callout or on or inside the anchor. The callout's controls come after the step's anchor in the Tab order when the anchor takes focus. A tooltip on the anchor does not disturb that order. Two cases do (spec:AST-116FR12 gap:): in WebKit the first Tab after a pointer press on the anchor skips the callout's controls, and after a layer that the anchor itself opens has closed (a menu, a hover card), Tab from the anchor skips them. WithhasBackdropa step is modal: Tab stays in the callout, Escape ends the tour from anywhere, and a press on the dimmed page ends it as'backdrop'.showActionopens takes focus as it opens; focus that was on the tour before then goes on to the step's heading inside the dialog. A step with a backdrop always takes focus. When the tour ends with focus in the callout or on the body, focus goes to the step's anchor when the anchor takes focus, else through the shared return ofspec:AST-116.nextLabel,doneLabelandskipLabelreword three of them for one tour.Current specification
spec:AST-119, current onmain. Record changes this PR makes to it and to the records beside it:spec:AST-119's Current-state impact said the LabTourkeeps<TourStep>children. A component's record allows one owning package, and the Component Lifecycle makes graduation a move, so the line now says the Lab Tour is removed andstepsreplaces<TourStep>children.spec:AST-119: path applicability ispackages/core/src/Tour/**. The gap lines that described the Lab Tour are gone. Four gap lines state what Core does not meet:FR9 gap:(while a step prepares, the callout before it is not painted but stays in the accessibility tree with focus, and can still end the tour),FR10 gap:(an anchor that leaves with no render, and a host layer removed with no event),FR13 gap:(no ring without CSS anchor positioning, and no ring or dimming while a panel clips a backdrop step's anchor) andFR16 gap:(focus on the body at the end, with an anchor that cannot take focus). Platform support names Chromium and WebKit as the browser evidence, which is what exists. DEC-5 no longer says the Lab Tour nameshasBackdrop.spec:AST-119FR6. A step whose anchor is inside an open modal dialog or a shown popover shows its callout above that layer, where it can be used; a step with no anchor that starts while a modal Dialog, Drawer or BottomSheet is open shows above it.spec:AST-116'sFR12 gap:line. They say that a'pageOrder'popover that moves to another anchor while open keeps its place in the focus order after the anchor it opened on, and that in WebKit the first Tab after a pointer press on the anchor moves on in DOM order. The browser sets a popover's place in the order when it shows. Tour mounts its callout again for each step, so the first sentence does not apply across steps; its browser tests show the order for two steps. It does apply to a step that starts with no anchor and takes its anchor at a later render (FR14 gap:). Both sentences were measured on this head in Chromium and WebKit: the second in the Default story, the first with a temporary story that is not in this PR.data-backdrop="backdrop"while the tour has a backdrop, andcomponent:Tournames it (architecture:public-component-apiDEC-2), with the three theme targets.FR14 gap:line inspec:AST-119. The callout's controls do not follow the anchor in the Tab order in the cases thatspec:AST-116'sFR12 gap:names. After a layer that the anchor opens has closed, they stay out of the order until the next step shows. A step that starts with no anchor on the page, and takes its anchor at a later render, keeps its place in DOM order. The last case was measured on this head in Chromium and WebKit with a script, not in the suite./approve-specat this head: the Lab Tour removed with no codemod; FR6's two sentences; theFR9,FR10,FR13,FR14andFR16gap lines inspec:AST-119; Chromium and WebKit, without Firefox, as its browser evidence, and the Platform support sentence for Firefox and a clipped anchor; the two sentences added tospec:AST-116'sFR12 gap:line; incomponent:Tour, thedata-backdropattribute, the theme targetstour,tour-highlightandtour-overlay, and the concept rows: the new Steps, Active step, Anchor and Missing anchor rows, and the Backdrop row, whose stability changes fromexperimentaltostable.component:Tour: verified by the Core tests; Compatibility and Ownership lines nameactiveId,onActiveIdChange,onEndand FR6–FR17; Public concepts gains Steps, Active step, Anchor and Missing anchor; AR1 points to FR14; the verification rows name the Core tests.family:overlay-dismissal: the member iscomponent:Tour, its row replaces the Lab TourStep row, and itsFR2 gap:line for the Lab Tour's Escape is removed.architecture:react-component-runtimeandspec:AST-038each named the Lab Tour once; the first drops the clause and the second names Tour.Public delta and caller burden
@astryxdesign/core, also as the entry point@astryxdesign/core/Tour:Tour, and the typesTourProps,TourStep,TourEndReason,TourMissingAnchorBehavior.TourPropstakes the standard element props (ref,xstyle,className,style,data-*).@astryxdesign/cliships a showcase and one example block for Tour; the changeset names both packages.@astryxdesign/lab(canary-only, no stability promise):Tour,TourStep,useTourand their types.Tour.doc.mjscarries a before/after example and the changeset names each renamed prop. There is no codemod:<TourStep>children become objects, andisActivebecomes an id the app must choose.hasBackdropis set before the tour starts; a change while a step shows is not supported, asusePopover'stabBehavioris not.astryx-tour(the callout surface, besideastryx-popover),astryx-tour-highlightandastryx-tour-overlay; the last two carrydata-backdrop="backdrop"with a backdrop. The probe theme is regenerated for them.ref,className,xstyle,styleanddata-*all land on thedialog.@astryx.tour.back,.next,.done,.skip,.closeand.stepCount, inlocales/en.json. Other locales fall back to English until they are translated.score-ledger.test.mjs.motionAudit.tsis an older generated snapshot and is left as it is. The CLI's official-package list is derived from the repository, so it drops the Lab Tour with no edit.usePopoverInternaltakessurfacePropsandsurfaceRef, so a component can make the popover surface its own root, and reads the anchor for the popover's place in the focus order from the caller's ref when the layer element shows.useLayer's in-view observer follows a trigger or anchor that is replaced while the layer is open; before, it stayed on the detached element, so the layer was held or released for an element nobody sees (spec:AST-059FR5,spec:AST-116FR3).useLayer.test.tsxhas a case for it that fails onmain.usePopoverInternal's return gainsisFocusInScope, which the publicusePopoverdoes not return. A focus region's entry in the shared registry now follows a container that mounts again while the region is active, andfocusRegionAroundnames the region around an element (Dialog, BottomSheet, Lightbox, MobileNav and the focus trap use the registry).Design and alternatives
usePopoverinstance for the tour, not one per step: modality, Escape, focus return and the anchor read are one code path, and a step change is a new anchor and ashow(). The callout's element mounts again for each step because the browser sets a popover's top-layer order and its place in the focus order only when it shows.onEndand the app stays in control.architecture:layer-runtimeINV21); a timed wait for a missing anchor (spec:AST-119DEC-3).Evidence
Tour.test.tsx, 47 tests (jsdom):activeIdand a duplicate id, each with its warning;'skipStep'after Next, after Back, on a step the app sets and on a promoted step, at the last step and past the first;'endTour';showAction(no step shows, the dialog is busy, no focus moves, a second Next moves no step, and focus the person moved meanwhile stays), Done pressed while an earlier step prepares after Back (it ends no tour), and a rejectedshowAction;aria-modaland press; a press on the overlay without a backdrop;aria-hiddentext; a step is announced again when the tour starts again at it; a backdrop always takes focus;scrollIntoViewcalled for each step, and not withhasScrollIntoView={false};aria-hiddenoverlay;ref,className,styleand adata-*attribute on the dialog surface;data-backdropon the overlay and the ring;Tour.interaction.browser.spec.ts, 24 tests, Chromium and WebKit:showAction: the callout is painted over the layer, sits beside the control in it, and its own controls work; for the step in the dialog, focus that Next held is on the new step's heading. Without a backdrop the control in the dialog still works, Tab from the control in each layer enters the callout, and Tab from the callout's last control goes to the layer's own next control (the dialog's close control; the popover's control). With a backdrop, Tab stays in the callout inside the dialog;OpenandScoped Themestories, which start on a step: no violation..github/a11y-audit-axe.jsonnames theOpenstory for Tour.data-*conformance test gains a Tour fixture (the attribute lands on the callout's dialog element); the docsite's element-resolution test and one name inscore-ledger.test.mjsuse another component in place of the LabTourStep.Tour.interaction.browser.spec.tsrun by hand on this branch with Playwright's Firefox passes 22 of 24. The two that fail are the clipped-anchor tests: Firefox keeps painting a callout whose anchor a scrolling panel clips.spec:AST-119's Platform support says so.spec:AST-116FR12 gap:; each was measured with a script or a temporary story, not in the suite); a browser without CSS anchor positioning (FR13 gap:). A touch pointer is driven by the capture script (taps start the tour and move a step at a 320-pixel viewport), not by the test suite.Screenshots
42 frames from the built Storybook at
b731ef604d, in the evidence folder: Neutral and Stone in light and dark at 900 by 520 (first, middle and last step, keyboard focus, backdrop, centered, long text); a custom theme; right-to-left; steps inside a dialog and a popover; a 320-pixel viewport with a coarse pointer in light and dark; and forced colors.receipts.jsonholds one receipt for each frame: the build, the story, the theme and color mode the page reports, direction, viewport, pointer, the dialog's name and modal state, the callout and ring boxes, font and animation state, and capture errors. Every receipt passes.capture.mjsis the script.Accessibility checklist
Pattern: Dialog (Modal) for a step with a backdrop; the same dialog without
aria-modaland without a focus trap for a step without one.dialognamed by its title and described by its body, and by its count withhasStepCount. Back, Next, Done, Skip and the close control have names.role="dialog", witharia-modal="true"only with a backdrop.aria-busy, and Back, Next and Done reportaria-disabled.spec:AST-116FR12 gap:names the exceptions: WebKit after a pointer press on the anchor, and a layer that the anchor opens). Escape ends a modal step's tour from anywhere, and a step's tour without a backdrop only while focus is in the callout or on or inside the anchor. No arrow keys.usePopover's trap. Focus returns to the anchor or through the shared chain at the end. Focus stays in the callout while a step prepares (FR9 gap:).FR16 gap:names the one case that can leave focus on the body. The focus ring on the heading and the controls is the shared one; screenshots show it in two themes.useAnnounceRenderedText,architecture:react-component-runtimeINV10). It reads the title as rendered and leaves outaria-hiddenandhiddentext.prefers-reduced-motion. The ring has no animation. The callout's entrance is the layer's own.Highlight; the callout surface has the popover's border.Scope
Components: Tour (Core, new), Tour and TourStep (Lab, removed)
Testing
pnpm exec vitest run --project ui packages/laband, inpackages/core/src,Tour Popover Layer hooks Tooltip Dialog DropdownMenu utils __tests__/hostDataAttributes.test.tsx: 5,807 tests; 5,805 passed. Two, inpackages/lab/src/MediaPlayer(MediaPlayer.test.tsxandMediaMarkerPopover.test.tsx, files this PR does not change), failed in that parallel run and pass when the two files run alone (53 passed)pnpm exec vitest run --project node --changed=<merge base> --no-file-parallelism(the Node tests the change reaches): 162 passed in 15 files. The CLI search goldens andresolution-compat.test.mjs: 82 passedtsc --noEmit(Core and Storybook), strict ESLint on the changed files,pnpm check:knowledge,pnpm check:changesets: cleanpnpm test:interaction Tour.interaction.browser.spec.ts: Chromium 24 passed; WebKit 24 passed (Playwright's container image). The popover and layer interaction specs beside it (PopoverTabBehavior,PopoverAnchor,LayerFocusReturn,PopoverFocusReturn,LayerSamePress): 27 passed in Chromium; 26 passed and one skipped by the spec in WebKitnode .github/scripts/accessibility-audit.js --stories core-tour--open,core-tour--scoped-theme --ready-selector '[role="dialog"]': 0 violationsChanges since the last review
useAnnounceRenderedText(architecture:react-component-runtimeINV10), and Tour no longer reads the title or announces in an Effect of its own. Each step start is one occasion, so a step is announced again when the tour starts again at it (a new unit test, which fails when the occasion is the step id). Tour is in the module's adopters test. A new browser test asserts the announcement in Chromium and WebKit.mainagain, and the CLI's search golden foricon setis regenerated onmain's new count (one more match thanmain, the Tour doc).aria-hiddentext in a title, as the callout's accessible name does. The announcement's unit test has such a title.main, where the CLI's official-package list is no longer a committed file; this PR's edits to that file and to its test are gone with them.spec:AST-119's Platform support says what Firefox does while a scrolling panel clips a step's anchor, and one comment inTour.tsxis shorter.spec:AST-119gains anFR14 gap:line; the doc states the two Tab-order limits, what a late anchor does, and that a prepared step hides the callout before it;useLayer.test.tsxgains the replaced-trigger case; two Effects inTour.tsxname what they synchronize; a branch that never ran is gone from one browser test; and the Sandbox's static route list names the two new template routes, without which the preview deployment's Sandbox build failed its route check. The bullets below the next three are from earlier heads.main. A step without a backdrop is ausePopoverpopover withtabBehavior: 'pageOrder'; the earlier head setisModal: falsefor that. The browser test that failed on the earlier head, "a step after a centered step follows its own anchor in view", passes.step, which changed whatastryx component stepresolves to (tworesolution-compatcases). The CLI's search golden foricon setcounts one more match, the Tour doc.spec:AST-119FR6 says so, and itsFR6 gap:line is gone.aria-busyand ignores Back, Next and Done.FR9 gap:is narrower and says what remains.showActionopened.dialog, soref,className,xstyle,styleanddata-*land on one element. The inner wrapper is gone.spec:AST-119FR6, two sentences inspec:AST-116'sFR12 gap:line, andcomponent:Tournames thedata-backdroptheme attribute.Writing rubric results
The record changes are: in
spec:AST-119, path applicability, two sentences in FR6, the Platform support evidence line, DEC-5's text, gap lines, verification rows and Current-state impact bullets; incomponent:Tour, concept rows, Compatibility lines, AR1, the Ownership boundary, thedata-backdropparagraph and verification rows; inspec:AST-116, two sentences in a gap line; infamily:overlay-dismissal, the member, its row and a removed gap line; and one sentence each inarchitecture:react-component-runtimeandspec:AST-038.First-load size (INV10)
pnpm size:pages --page popover=Popover,Button,Text, this PR's change in gzip bytes againstmain:Every page pays, because the code is always-on in three shared modules that this PR changes:
Layer/useLayer.tsx,Popover/usePopover.tsxandhooks/useFocusTrap.ts. This is the shared-module growth INV10 asks to report; each page is under its limit. A page that rendersTour,ButtonandTextloads 78,976 B gzip.