fix: eliminate popover flash and stage cutout jump during anchorless step transitions - #619
Open
saikat709 wants to merge 2 commits into
Open
fix: eliminate popover flash and stage cutout jump during anchorless step transitions#619saikat709 wants to merge 2 commits into
saikat709 wants to merge 2 commits into
Conversation
… steps - Prevent unpositioned popover flash in popover.ts by hiding wrapper during position recalculation - Ensure smooth delayed popover transitions in highlight.ts for consecutive anchorless steps - Animate stage cutout collapse and expansion in-place at element centers in overlay.ts - Omit SVG cutout path for zero-size dummy element stages in stage.ts - Update unit tests in highlight.test.ts, overlay.test.ts, and stage.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #549
Summary of Changes
When navigating between consecutive tour steps without an attached element (anchorless/modal steps), a white square (
.driver-popover) flashed at the CSS default position (top: 0, right: 0), and the overlay stage cutout box briefly jumped/slid towards(0, 0).This PR fixes the issue across four key areas:
Popover Visibility Guard (
packages/driver/src/popover.ts):visibility: hiddenonpopoverWrapperprior to resetting position attributes (left,top,right,bottom) inrenderPopover, restoringvisibility: ""only afterrepositionPopover()completes positioning. This eliminates unpositioned popover flashes.Step Transition State (
packages/driver/src/highlight.ts):isFirstHighlightcalculation:!fromStep || !fromElement || (fromElement === toElement && !isToDummyElement).#driver-dummy-elementsteps preservehasDelayedPopover = true, enabling smooth popover content reuse without unnecessary teardown gaps.In-Place Stage Animation (
packages/driver/src/overlay.ts):transitionStage()using acenterOf()helper:Zero-Cutout SVG Path Guard (
packages/driver/src/stage.ts):isDummycheck ingenerateStageSvgPathString()so dummy element stages render a full-screen viewport path without cutout subpaths.Verification & Testing
highlight.test.ts,overlay.test.ts, andstage.test.ts.pnpm --dir packages/driver test:run).pnpm dev) across both fast (150ms), default (400ms), and slow (1500ms) anchorless step transitions.