Skip to content

SD-3092 - fix: toolbar serialization for stable rendering - #3248

Merged
harbournick merged 1 commit into
mainfrom
gabriel/sd-3092-bug-template-builder-remounts-when-toolbar-prop-is-an-object
May 14, 2026
Merged

SD-3092 - fix: toolbar serialization for stable rendering#3248
harbournick merged 1 commit into
mainfrom
gabriel/sd-3092-bug-template-builder-remounts-when-toolbar-prop-is-an-object

Conversation

@chittolinag

@chittolinag chittolinag commented May 12, 2026

Copy link
Copy Markdown
Contributor

Issue

Passing an inline object to the toolbar prop caused SuperDocTemplateBuilder to rebuild SuperDoc on every parent re-render, looping infinitely. The reason for that is that useMemo compared the object dep by reference (Object.is), so every time the parent re-renders, this would look like the toolbar also changed.

Proposed solution

Use JSON.stringify(toolbar) as the dep (same pattern as stableTelemetry in the same file).

@chittolinag
chittolinag requested a review from a team as a code owner May 12, 2026 15:56
@linear

linear Bot commented May 12, 2026

Copy link
Copy Markdown

SD-3092

@harbournick harbournick left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@harbournick
harbournick merged commit f14f6eb into main May 14, 2026
14 checks passed
@harbournick
harbournick deleted the gabriel/sd-3092-bug-template-builder-remounts-when-toolbar-prop-is-an-object branch May 14, 2026 22:48
@superdoc-bot

superdoc-bot Bot commented May 14, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in template-builder v1.7.0-next.5

The release is available on GitHub release

msviderok pushed a commit to msviderok/superdoc that referenced this pull request May 16, 2026
Co-authored-by: Gabriel Chittolina <gabrielchittolina1@gmail.com>
superdoc-bot Bot pushed a commit that referenced this pull request May 19, 2026
### Changes

- Merge remote-tracking branch 'origin/main' into merge/main-into-stable-2026-05-19

### Chores

- merge stable into main
- merge stable into main (#3205)

### CI

- suppress per-PR success comments on prereleases (#3337)

### Bug Fixes

- toolbar serialization for stable rendering (#3248)
@superdoc-bot

superdoc-bot Bot commented May 19, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in template-builder v1.11.1

The release is available on GitHub release

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.

4 participants