-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[lexical][@lexical/selection] Feature: add a generic classes
property to all nodes for easier customization
#6929
Open
GermanJablo
wants to merge
24
commits into
facebook:main
Choose a base branch
from
GermanJablo:classes
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+259
−32
Open
Changes from 12 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
6323262
add __classes, getClasses and mutateClasses
GermanJablo 7bb7820
amend
GermanJablo bede9a9
fix errors
GermanJablo 264b87b
fix $canSimpleTextNodesBeMerged and exportDOM
GermanJablo f290e0c
add test
GermanJablo b9fa298
rename $mutateSelectedTextNodes to $forEachSelectedTextNode
GermanJablo 0ff2383
add docs
GermanJablo 10454ee
add tests for exportJSON
GermanJablo 5c554d2
test name
GermanJablo b6e7525
spread classes
GermanJablo 38764d4
fix updateDOM
GermanJablo a367219
comment typo
GermanJablo df4f570
remove comment
GermanJablo ae2c32a
replace mutateClasses with setClass
GermanJablo 727d47d
update docs
GermanJablo 00c711e
revert getClasses, allow empty object classes, move clone logic to af…
GermanJablo 3da33aa
fix afterCloneFrom
GermanJablo 110e591
Update packages/lexical/src/LexicalNode.ts
GermanJablo b96a12e
Update packages/lexical/src/LexicalNode.ts
GermanJablo a2fb1df
Update packages/lexical/src/LexicalEditorState.ts
GermanJablo 66d0679
revert doc url name changed
GermanJablo 2908b29
node.__classes check is actually needed as long as the property is op…
GermanJablo b8e09bb
|| {} is actually needed as long as the property is optional
GermanJablo 0372f9e
revert || {} is actually needed as long as the property is optional. …
GermanJablo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
40 changes: 38 additions & 2 deletions
40
...website/docs/concepts/node-replacement.md → ...bsite/docs/concepts/node-customization.md
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes in this file are only a rename to avoid collisions and can be ignored.
I have also wondered what would happen if a user has extended a node by adding the classes property to it. Perhaps we could reserve a prefix and use something like
$classes
instead?