Repository navigation
[examples] Chore: Merge dev-node-state-style into examples/node-state-style - #8403
Merged
Merged
Conversation
Now that 0.44.0 is released and ships DOMRenderExtension, replace the mutation-listener based node-state-style example with the extension-based implementation from dev-examples/dev-node-state-style. Drop the dev-only copy. The dev-examples directory and integration test infrastructure remain so future examples built on unreleased APIs can use them. https://claude.ai/code/session_01RuqYZ3WU4vdtmWAHurST9w
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Use lexical's getStyleObjectFromCSS instead of pulling in inline-style-parser as a separate dependency. https://claude.ai/code/session_01RuqYZ3WU4vdtmWAHurST9w
Replace the local applyStyle helper with setDOMStyleObject from lexical, which already handles !important and null/undefined removal correctly. https://claude.ai/code/session_01RuqYZ3WU4vdtmWAHurST9w
The PREV_STYLE_STATE cache was overwritten with the new style object before the diff was computed, so getPreviousStyleObject always saw the incoming object and the diff was always empty. As a result, no style was applied to the DOM when state changed. Read the previous cache before overwriting. https://claude.ai/code/session_01RuqYZ3WU4vdtmWAHurST9w
etrepum
marked this pull request as ready for review
April 28, 2026 05:25
etrepum
requested review from
acywatson,
fantactuka,
ivailop7,
potatowagon,
takuyakanbr and
zurfyx
as code owners
April 28, 2026 05:25
potatowagon
approved these changes
Apr 28, 2026
Merged
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Now that 0.44.0 is released and ships DOMRenderExtension, replace the mutation-listener based node-state-style example with the extension-based implementation from dev-examples/dev-node-state-style. Drop the dev-only copy. The dev-examples directory and integration test infrastructure remain so future examples built on unreleased APIs can use them.
Also simplified some of the code with the new
getStyleObjectFromCSSandsetDOMStyleObjectfrom #8372Test plan
Integration tests will ensure that the example still builds