Repository navigation
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
etrepum
added a commit
that referenced
this pull request
Oct 5, 2026
… selection tests ## Description The macOS Chromium first-node table selection test failed all three attempts because its leading paragraph survived setup Backspace. The later shift-selection assertion then saw the trailing paragraph at child index 2 instead of 1. Check native and Lexical caret positions before deleting adjacent paragraphs and before shift-selection in the related first-node, last-node, and surrounding-content variants. Verify the remaining paragraph count after setup deletion. Preserve all existing table-selection expectations and platform exclusions. ## Test plan ### Before macOS Chromium on e8c17b8: https://github.com/facebook/lexical/actions/runs/37251396589 ``` Selection > shift+arrowup into a table, when the table is the first node, selects the whole table - Expected + Received Array [ - 1, + 2, ] Retry #1 Retry #2 1 failed ``` ### After Linux WebKit, all eight adjacent-table selection cases repeated three times, four workers, retries disabled: ``` rich-text: expected=18, skipped=6, unexpected=0, flaky=0 rich-text-with-collab: expected=18, skipped=6, unexpected=0, flaky=0 ``` ```sh E2E_EDITOR_MODE=rich-text node node_modules/playwright/cli.js test --project=webkit --workers=4 --retries=0 e2e/Selection.spec.mjs --grep 'into a table' --repeat-each=3 --reporter=json E2E_EDITOR_MODE=rich-text-with-collab node node_modules/playwright/cli.js test --project=webkit --workers=4 --retries=0 e2e/Selection.spec.mjs --grep 'into a table' --repeat-each=3 --reporter=json ``` ESLint, Prettier, and git diff --check passed. macOS Chromium is unavailable locally and is validated in CI.
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
This PR consolidates the
dev-node-state-styleexample into the mainexamples/node-state-styleexample and refactors it to use the new Extension-based architecture instead of the legacy Plugin-based approach.Changes:
dev-examples/dev-node-state-styledirectory, which was a development-only exampleexamples/node-state-styleto useLexicalExtensionComposerinstead ofLexicalComposerLexicalComposer,RichTextPlugin,HistoryPlugin,AutoFocusPlugin) to Extension-based setup (RichTextExtension,HistoryExtension,AutoFocusExtension,defineExtension)package.jsonto use@lexical/extensionand@lexical/historyinstead of@lexical/clipboardstyleState.tsto remove legacy DOM mutation listener code and use the newDOMRenderExtensionAPI for style applicationThe core functionality remains the same—demonstrating how NodeState can be used with a DOMRenderExtension to override create and export behavior of nodes—but now uses the modern Extension architecture.
Closes #
Test plan
The example application should continue to function identically:
Existing tests for the style state functionality pass with the refactored code.
https://claude.ai/code/session_01RuqYZ3WU4vdtmWAHurST9w