SD-2664 - feature support word style update field interactions for TOC - #3120
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
- tabLeader: 'none' must round-trip via serialize/parse (currently lost
because no \\p is emitted when separator is missing, and the parser has
no way to disambiguate "default = dots" from "explicit none").
- toc.configure({ tabLeader: 'none' }) on a default-leader TOC must not
silently no-op (areTocConfigsEqual reports identical serialized output).
- toc.update mode: 'pageNumbers' must find tocPageNumber marks when the
marked text is nested inside a run wrapper (the rebuild output shape).
All three tests fail on the current branch and lock in the regressions
flagged in code review.
There was a problem hiding this comment.
hey @chittolinag! the \p fix is the right call, but the rebuild path is regressing in a few spots.
pushed bceff5248 - three failing tests for findings 1, 1b, and 2.
left a few inline.
needs work.
…re-support-word-style-update-field-interactions-for # Conflicts: # packages/super-editor/src/editors/v1/components/context-menu/constants.js
issues mentioned by him were fixed and he's OOO - as agreed, I'll dismiss.
|
🎉 This PR is included in superdoc v1.30.0-next.71 The release is available on GitHub release |
|
🎉 This PR is included in @superdoc-dev/mcp v0.3.0-next.74 The release is available on GitHub release |
|
🎉 This PR is included in @superdoc-dev/react v1.2.0-next.116 The release is available on GitHub release |
|
🎉 This PR is included in vscode-ext v2.3.0-next.118 |
|
🎉 This PR is included in superdoc-cli v0.8.0-next.90 The release is available on GitHub release |
|
🎉 This PR is included in superdoc-sdk v1.8.0-next.72 |
superdoc-dev#3120) * chore: save * feat: update TOC entry in context menu * fix: update TOC creating extra spaces and changing fonts * test: created tests around TOC programmatic update * refactor: removed unused code * refactor: code style tweaks * refactor: removed duplicate functions * test(toc): add regression coverage for SD-2664 review findings - tabLeader: 'none' must round-trip via serialize/parse (currently lost because no \\p is emitted when separator is missing, and the parser has no way to disambiguate "default = dots" from "explicit none"). - toc.configure({ tabLeader: 'none' }) on a default-leader TOC must not silently no-op (areTocConfigsEqual reports identical serialized output). - toc.update mode: 'pageNumbers' must find tocPageNumber marks when the marked text is nested inside a run wrapper (the rebuild output shape). All three tests fail on the current branch and lock in the regressions flagged in code review. * fix: toc context menu update * refactor: simplified logic * refactor: removed unnecessary test suite * refactor: simplified tests * chore: small comment tweaks * test: added behavior test for multiple TOCs updates * fix: inline partial selection to produce inline text * fix: toc from empty to non-empty * fix: early return on TOC update --------- Co-authored-by: Gabriel Chittolina <gabrielchittolina1@gmail.com> Co-authored-by: Caio Pizzol <caio@superdoc.dev>
|
🎉 This PR is included in superdoc-sdk v1.10.0 |
|
🎉 This PR is included in @superdoc-dev/mcp v0.6.0 The release is available on GitHub release |
|
🎉 This PR is included in superdoc v1.34.0 The release is available on GitHub release |
|
🎉 This PR is included in @superdoc-dev/react v1.5.0 The release is available on GitHub release |
|
🎉 This PR is included in vscode-ext v2.6.0 |
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