Skip to content

[examples] Chore: Merge dev-node-state-style into examples/node-state-style - #8403

Merged
etrepum merged 5 commits into
meta:mainfrom
etrepum:claude/merge-node-state-style-8ILRo
Apr 28, 2026
Merged

etrepum merged 5 commits into
meta:mainfrom
etrepum:claude/merge-node-state-style-8ILRo

Conversation

@etrepum

@etrepum etrepum commented Apr 28, 2026 •

Copy link
Copy Markdown
Collaborator

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 getStyleObjectFromCSS and setDOMStyleObject from #8372

Test plan

Integration tests will ensure that the example still builds

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
@vercel

vercel Bot commented Apr 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lexical Ready Ready Preview, Comment Apr 28, 2026 5:26am
lexical-playground Ready Ready Preview, Comment Apr 28, 2026 5:26am

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 28, 2026
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
etrepum added this pull request to the merge queue Apr 28, 2026
Merged via the queue into meta:main with commit 9510714 Apr 28, 2026
39 checks passed
@etrepum
etrepum deleted the claude/merge-node-state-style-8ILRo branch May 19, 2026 17:55
@etrepum etrepum mentioned this pull request May 28, 2026

This branch was successfully deployed

2 active deployments
Preview – lexical — 494472b4 Deployed Apr 28, 2026 by vercel[bot]
Preview – lexical-playground — 494472b4 Deployed Apr 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. extended-tests Run extended e2e tests on a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants