Skip to content

SD-2663 - feature: support table of contents hovering#3333

Merged
harbournick merged 6 commits into
mainfrom
gabriel/sd-2663-feature-support-table-of-contents-interactions
Jun 9, 2026
Merged

SD-2663 - feature: support table of contents hovering#3333
harbournick merged 6 commits into
mainfrom
gabriel/sd-2663-feature-support-table-of-contents-interactions

Conversation

@chittolinag

Copy link
Copy Markdown
Contributor

Introducing a new hover state for TOCs. Like MS Word does, when you hover in a TOC, we provide a visual feedback to the user with a grey background.

@linear-code

linear-code Bot commented May 15, 2026

Copy link
Copy Markdown

SD-2663

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@chittolinag chittolinag marked this pull request as ready for review May 15, 2026 23:15
@chittolinag chittolinag requested a review from a team as a code owner May 15, 2026 23:15

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4544d0019d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread packages/super-editor/src/editors/v1/core/layout-adapter/sdt/toc.ts
Comment thread packages/layout-engine/painters/dom/src/renderer.ts Outdated

@luccas-harbour luccas-harbour 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.

hey @chittolinag!
codex flagged this issue below which I had noticed while testing this manually: https://www.loom.com/share/8047b874a3894628bbc6d13936ee8f43

you can see as I move the mouse around the TOC, the background flashes.

  • [P2] Preserve TOC hover while crossing entry gaps — packages/super-editor/src/editors/v1/core/presentation-editor/PresentationEditor.ts:6773-6781
    When the cursor moves from one TOC entry into the paragraph-spacing gap, relatedTarget is the underlying page/container rather than another .superdoc-toc-entry (the gap filler is a pseudo-element, not a DOM entry), so this immediately clears toc-group-hover. That makes the intended continuous grey hover block disappear/flicker in the exact spacing gap that --toc-gap-below is trying to cover; keep the group active while the pointer is inside the measured gap or otherwise make the gap participate in the hover target.

claude found some other things that I thought were relevant. I added them as inline comments, hopefully they should be easy fixes!

thanks!

@cubic-dev-ai cubic-dev-ai Bot 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.

1 issue found across 14 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread packages/layout-engine/pm-adapter/src/sdt/document-part-object.ts Outdated
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
@harbournick harbournick merged commit 1c57958 into main Jun 9, 2026
69 checks passed
@harbournick harbournick deleted the gabriel/sd-2663-feature-support-table-of-contents-interactions branch June 9, 2026 17:21
@superdoc-bot

superdoc-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in superdoc-cli v0.17.0

The release is available on GitHub release

@superdoc-bot

superdoc-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in superdoc-sdk v1.16.0

@superdoc-bot

superdoc-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in @superdoc-dev/mcp v0.12.0

The release is available on GitHub release

@superdoc-bot

superdoc-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in superdoc v1.40.0

The release is available on GitHub release

@superdoc-bot

superdoc-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in @superdoc-dev/react v1.11.0

The release is available on GitHub release

@superdoc-bot

superdoc-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in vscode-ext v2.12.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants