Skip to content

Fix Twoslash popup stacking - #1946

Open
David Pine (IEvangelist) wants to merge 1 commit into
mainfrom
ievangelist-fix-code-tooltip-opacity
Open

David Pine (IEvangelist) wants to merge 1 commit into
mainfrom
ievangelist-fix-code-tooltip-opacity

Conversation

@IEvangelist

Copy link
Copy Markdown
Member

Summary

Fix Twoslash hover popups being visually covered by content following a code block.

  • Raise only the active Expressive Code block while its popup is open.
  • Reset the stacking level after the popup closes.
  • Add browser coverage for the Ollama withReference reproduction in light and dark themes.

Third-party links and affiliations

None

Validation

  • Passed: pnpm --dir .\src\frontend exec playwright test tests/e2e/twoslash-navigation.spec.ts --project=desktop-chromium --workers=1 --grep "paints popups"
  • Passed: pnpm --dir .\src\frontend exec vitest run --config vitest.config.ts tests/unit/twoslash-hover-runtime.vitest.test.ts
  • Passed: pnpm --dir .\src\frontend exec eslint src/scripts/twoslash-hover.ts tests/e2e/twoslash-navigation.spec.ts --max-warnings 0
  • Passed: git diff --check

Raise the active code block while a Twoslash popup is open so following page content cannot paint over it. Add browser coverage for the Ollama reproduction in both themes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 23, 2026 20:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused lifecycle change handles overlapping popups correctly, with regression coverage and no identified blocking issues.

No open issues 🎉

What changed in this PR

Fixes Twoslash hover popups appearing behind following content on the documentation site.

Changes:

  • Raises the active Expressive Code block while a popup is open and resets stacking after its last popup closes.
  • Adds hover-initialization synchronization and browser coverage for the Ollama withReference reproduction in light and dark themes.
File Description
src/​frontend/​tests/​e2e/​twoslash-navigation.spec.ts Adds initialization waits and popup stacking checks in both themes.
src/​frontend/​src/​scripts/​twoslash-hover.ts Manages code-block stacking through the popup lifecycle.

Review effort: Balanced

@aspire-repo-bot

Copy link
Copy Markdown
Contributor

Frontend HTML artifact ready

The latest frontend build uploaded the frontend-dist artifact for PR #1946. Use the VS Code button below to open this PR with GitHub Artifacts Explorer and browse the built HTML locally.

VS Code: Open PR #1946 artifacts

This comment updates automatically when a new frontend build artifact is uploaded.

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.

2 participants