Skip to content

SD-2664 - feature support word style update field interactions for TOC#3120

Open
chittolinag wants to merge 8 commits intomainfrom
gabriel/sd-2664-feature-support-word-style-update-field-interactions-for
Open

SD-2664 - feature support word style update field interactions for TOC#3120
chittolinag wants to merge 8 commits intomainfrom
gabriel/sd-2664-feature-support-word-style-update-field-interactions-for

Conversation

@chittolinag
Copy link
Copy Markdown
Contributor

@chittolinag chittolinag commented May 4, 2026

Issue

Word-style "Update Field" interactions (context menu + F9) aren't wired up in SuperDoc. The document API already exposes editor.doc.toc.update(), but no user-facing action calls it. Scope of this PR is Table of Contents only — other field types are deferred.

Proposed solution

  • Right-click → "Update table of contents" when the cursor is inside a TOC.
  • F9 rebuilds every TOC in the document.
  • Fixed a handful of issues in the rebuild path that surfaced once the action was actually exercised end-to-end (font/style preservation, dot leader, spacing, pasted-heading detection).
  • Added unit tests for the context-menu item, the F9 command, and the rebuild helpers, plus a behavior test that loads a TOC docx, presses F9, and verifies the rebuilt entries match the document's headings.

@linear
Copy link
Copy Markdown

linear Bot commented May 4, 2026

@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 4, 2026 20:25
@chittolinag chittolinag requested a review from a team as a code owner May 4, 2026 20:25
@chittolinag chittolinag changed the title SD-2664 - feature support word style update field interactions for SD-2664 - feature support word style update field interactions for TOC May 4, 2026
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.

3 participants