-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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-list] Bullet item color matches text color #7024
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
7080a79
Bullet color to follow text color
ivailop7 af615a0
Using Listeners
ivailop7 6b7f32c
Implement suggestions
ivailop7 5869d83
Check selection is collapsed
ivailop7 5622672
Fix test
ivailop7 f9f3cc2
nodetransform
ivailop7 e8c3774
Change ListItemNode style based on transforms and selection
etrepum 6c1f557
Merge remote-tracking branch 'origin/main' into bullet_colors
etrepum 60657d4
Merge remote-tracking branch 'origin/main' into bullet_colors
etrepum 616de7e
Use textFormat and textStyle for elements
etrepum 0ad4984
use $is functions for narrowing (fortunately $isRangeSelection accept…
etrepum 9d2d03c
ci-check
etrepum cce2d48
Collab workaround
etrepum 3040dea
more cleanup? still expecting a failure in firefox collab - want to s…
etrepum c6174c2
tag table merge test as flaky
etrepum bfffccb
Add firefox workaround
etrepum b5613d9
Merge branch 'main' into bullet_colors
etrepum 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -512,6 +512,11 @@ test.describe('Collaboration', () => { | |
.frameLocator('iframe[name="right"]') | ||
.locator('[data-lexical-editor="true"]') | ||
.focus(); | ||
// TODO this is a workaround for Firefox so that the | ||
// selection picks up the text format | ||
if (browserName === 'firefox') { | ||
await page.keyboard.press('ArrowLeft', {delay: 50}); | ||
} | ||
Comment on lines
+515
to
+519
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This requires further investigation but I don't think it should block this feature |
||
await page.keyboard.press('ArrowDown', {delay: 50}); | ||
await page.keyboard.type(' text'); | ||
|
||
|
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.
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.
I see, could you explain to me the general rule here. Why are we avoiding returning 'true' in updateDOM with something like (this.style != prevNode.style), but we are always ok on doing the comparison and changing this in here and returning false. Does updateDOM returning true, trigger a waterfall of updates that is unnecessary?
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 check here is for performance and to avoid having style=“” show up in the DOM, it could be unconditionally set.
returning true should be avoided whenever possible, it creates a lot more work on the browser and can lose state if there’s anything ephemeral in the DOM. Same reason why react does DOM diffing instead of rendering everything from scratch, just more manual here.