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

[lexical-list] Bug Fix: Ensure new paragraph node retains selection styling when exiting list #6917

Merged

Conversation

aleksandr-lapushkin
Copy link
Contributor

@aleksandr-lapushkin aleksandr-lapushkin commented Dec 6, 2024

Description

  • Currently, when exiting a list by pressing enter multiple times, the selection style is lost
  • This PR aims to ensure that the current style is retained

Test plan

Before

  • Go to Playground
  • Insert a new list
  • Change text style, i.e. font, color or formatting
  • Write a few bullet points
  • Press enter twice to exit list
  • Write more text - this will no longer have the correct styles applied
Screen.Recording.2024-12-06.at.17.41.54.mov

After

  • Go to Playground
  • Insert a new list
  • Change text style, i.e. font, color or formatting
  • Write a few bullet points
  • Press enter twice to exit list
  • Write more text - this will be styled correctly
Screen.Recording.2024-12-06.at.17.41.15.mov

Copy link

vercel bot commented Dec 6, 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 Dec 10, 2024 5:12pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 10, 2024 5:12pm

@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 Dec 6, 2024
@aleksandr-lapushkin
Copy link
Contributor Author

Honestly not sure if there's a better way to do this, but seemed reasonable enough 🤷🏻

Copy link

github-actions bot commented Dec 6, 2024

size-limit report 📦

Path Size
lexical - cjs 31.18 KB (0%)
lexical - esm 31 KB (0%)
@lexical/rich-text - cjs 40.15 KB (0%)
@lexical/rich-text - esm 32.83 KB (0%)
@lexical/plain-text - cjs 38.79 KB (0%)
@lexical/plain-text - esm 30.15 KB (0%)
@lexical/react - cjs 42 KB (0%)
@lexical/react - esm 34.23 KB (0%)

Copy link
Collaborator

@etrepum etrepum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great if there was a unit and/or e2e test to show that this has the expected result

@etrepum etrepum added the extended-tests Run extended e2e tests on a PR label Dec 6, 2024
@aleksandr-lapushkin
Copy link
Contributor Author

aleksandr-lapushkin commented Dec 9, 2024

It would be great if there was a unit and/or e2e test to show that this has the expected result

Sure thing! Added an e2e test. Verified that test fails without these changes.

@etrepum etrepum added this pull request to the merge queue Dec 10, 2024
Merged via the queue into facebook:main with commit 3ba0705 Dec 10, 2024
38 of 40 checks passed
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. extended-tests Run extended e2e tests on a PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants