You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as rationale goes, the ListItemNode is basically supposed to support everything that a ParagraphNode does. Unlike a TableCellNode, it is not a shadow root that is expected to have children that are ParagraphNode, so to support all of the things that ParagraphNode supports then it should either be a ParagraphNode or separately implement all of the things that ParagraphNode implements, but the problem is that you can't just copy and paste that because the extensibility is not present in selections and the reconciler to make that work, there are $isParagraphNode special cases that can't be extended outside of the lexical package.
If we really don't want nodes like this to subclass ParagraphNode then we should move the features that ParagraphNode has into some new common base class, e.g. LexicalNode -> ElementNode -> BlockNode -> (ParagraphNode | ListItemNode) so that this sort of behavior can be inherited and baked into the lower levels without introducing dependencies from lexical to @lexical/list or elsewhere.
If we really don't want nodes like this to subclass ParagraphNode then we should move the features that ParagraphNode has into some new common base class, e.g. LexicalNode -> ElementNode -> BlockNode -> (ParagraphNode | ListItemNode) so that this sort of behavior can be inherited and baked into the lower levels without introducing dependencies from lexical to @lexical/list or elsewhere.
this might work better to prevent breaking changes from $isParagraphNode(...)
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
CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
4 participants
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.
Receiving reports about unexpected empty bullet lines appearing in the preview of the workplace editor
the sync diff containing this PR got reverted to mitigate the issue. Reverting this PR because: