Skip to content
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

#4618 combine list if next sibling is list node #5803

Merged
merged 3 commits into from
Apr 3, 2024

Conversation

potatowagon
Copy link
Contributor

@potatowagon potatowagon commented Apr 2, 2024

Fix for issue 4618
Before
see #4618

After

Screen.Recording.2024-04-02.at.2.08.44.PM.mov

^list of same types merged

Screenshot 2024-04-02 at 2 28 40 PM

^ lists of different types not merged

Copy link

vercel bot commented Apr 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lexical ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 2, 2024 9:34am
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 2, 2024 9:34am

@facebook-github-bot facebook-github-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 2, 2024
@potatowagon potatowagon linked an issue Apr 2, 2024 that may be closed by this pull request
@acywatson
Copy link
Contributor

acywatson commented Apr 3, 2024

Wow, I really thought we were already doing this somewhere.

I guess we only did it on insertion before:

https://github.com/facebook/lexical/pull/4386/files#diff-1468d7969b0009bad1b71c705004bb333f3ac0c41ca26f76527f5d32e61c9f86R220

I wonder if we can remove that code now, and handle it all here.

@potatowagon
Copy link
Contributor Author

oh cool thanks @acywatson for the code pointer

Wow, I really thought we were already doing this somewhere.

I guess we only did it on insertion before:

https://github.com/facebook/lexical/pull/4386/files#diff-1468d7969b0009bad1b71c705004bb333f3ac0c41ca26f76527f5d32e61c9f86R220

I wonder if we can remove that code now, and handle it all here.

by here do u mean handling the list merging in this part:

// Attempt to merge if the list is of the same type.

or do it as per this PR and remove the merging logic at the above code pointer (inside LexicalListItemNode)?

@potatowagon
Copy link
Contributor Author

ill merge this PR first and delete the duplicate list merge logic in another PR so its easier to test for any regressions

@potatowagon potatowagon merged commit 1db26b5 into facebook:main Apr 3, 2024
45 checks passed
@potatowagon
Copy link
Contributor Author

potatowagon commented Apr 3, 2024

addressed in #5810 5810

@acywatson
Copy link
Contributor

oh cool thanks @acywatson for the code pointer

Wow, I really thought we were already doing this somewhere.
I guess we only did it on insertion before:
https://github.com/facebook/lexical/pull/4386/files#diff-1468d7969b0009bad1b71c705004bb333f3ac0c41ca26f76527f5d32e61c9f86R220
I wonder if we can remove that code now, and handle it all here.

by here do u mean handling the list merging in this part:

// Attempt to merge if the list is of the same type.

or do it as per this PR and remove the merging logic at the above code pointer (inside LexicalListItemNode)?

Yes, you correctly interpreted my intent. Thank you!

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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Lists are not always combined when possible
5 participants