Skip to content

fix(free-layout): emit content changes for global variable edits - #1148

Open
Gujiassh wants to merge 1 commit into
bytedance:mainfrom
Gujiassh:fix/global-variable-oncontentchange-986
Open

fix(free-layout): emit content changes for global variable edits#1148
Gujiassh wants to merge 1 commit into
bytedance:mainfrom
Gujiassh:fix/global-variable-oncontentchange-986

Conversation

@Gujiassh

Copy link
Copy Markdown
Contributor

Summary

Fixes #986.

Global variable edits in free-layout were changing variable state without triggering the preset onContentChange callback, so autosave and other content listeners could miss updates from the variable panel.

Changes

  • bridge GlobalScope list/value updates into the preset onContentChange callback when the variable engine is enabled
  • add a preset-level regression test that updates the global variable schema and asserts onContentChange fires

Checklist

  • added focused regression coverage
  • kept the change scoped to free-layout-editor only
  • verified the package locally

Release Impact

Free-layout editors that enable the variable engine now receive onContentChange callbacks when global variables are edited from the variable panel.

Validation

  • cd packages/client/free-layout-editor && npm test
  • cd packages/client/free-layout-editor && npm run ts-check
  • cd packages/client/free-layout-editor && npm run build
  • git diff --check

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.

[Bug] Adding a variable to the variable panel did not trigger the Editor's onContentChange event.

1 participant