Skip to content

Prevent duplicate workshop-page view transitions during hash navigation - #2386

Merged
pelikhan merged 2 commits into
mainfrom
copilot/workshop-playwright-qa-fix-navigation-error
Jul 30, 2026
Merged

Prevent duplicate workshop-page view transitions during hash navigation#2386
pelikhan merged 2 commits into
mainfrom
copilot/workshop-playwright-qa-fix-navigation-error

Conversation

Copilot AI commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Hash-based navigation could open nested <details> before switching the active workshop page, briefly creating an invalid transition state with duplicate view-transition-name: workshop-page. This triggered aborted View Transitions and console errors across workshop pages.

  • Runtime navigation ordering

    • Reordered hash-navigation flow in scripts/lib/page-template.js so page switching (showWorkshopPage) happens before expanding nested details (openDetailsAncestors) for non-page anchors.
    • Applied the same ordering to both hashchange handling and in-page hash-link click handling.
  • Regression coverage

    • Updated the focused docs runtime test in scripts/build-docs.test.js to assert the new call order in generated output for both navigation paths.
  • Illustrative change

    // before: openDetailsAncestors(target); showWorkshopPage(...)
    showWorkshopPage(target, scrollPage && isPageTarget);
    if (!isPageTarget) {
      openDetailsAncestors(target);
    }

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix navigation JS error on workshop pages Prevent duplicate workshop-page view transitions during hash navigation Jul 30, 2026
Copilot AI requested a review from pelikhan July 30, 2026 20:45
@pelikhan
pelikhan marked this pull request as ready for review July 30, 2026 20:56
@pelikhan
pelikhan merged commit 00fcc6a into main Jul 30, 2026
@pelikhan
pelikhan deleted the copilot/workshop-playwright-qa-fix-navigation-error branch July 30, 2026 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[workshop-playwright-qa] __root__: 1 QA finding(s) — navigation

2 participants