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] Bug Fix: Fix Table formatting when no TextNodes present #6675

Merged
merged 7 commits into from
Sep 29, 2024

Conversation

KatsiarynaDzibrova
Copy link
Contributor

Description

Don't rely on TextNode when applying formatting for empty ParagraphNode
The initial issue was fixed in #6626, but the scenario with no TextNodes present was missed in the final version of pr

Test plan

2 tests added

Copy link

vercel bot commented Sep 26, 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 Sep 27, 2024 11:03pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 27, 2024 11:03pm

@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 Sep 26, 2024
Copy link

github-actions bot commented Sep 26, 2024

size-limit report 📦

Path Size
lexical - cjs 29.83 KB (0%)
lexical - esm 29.65 KB (0%)
@lexical/rich-text - cjs 38.42 KB (0%)
@lexical/rich-text - esm 31.57 KB (0%)
@lexical/plain-text - cjs 37.01 KB (0%)
@lexical/plain-text - esm 28.86 KB (0%)
@lexical/react - cjs 40.23 KB (0%)
@lexical/react - esm 32.93 KB (0%)

@ivailop7
Copy link
Collaborator

This is still not working for the styles - font size, font color, etc for the empty cells. Also when selecting the whole table and clicking on Bold, doesn't keep the toolbar button active, which if all cells have the applied said style should have active state.

@KatsiarynaDzibrova
Copy link
Contributor Author

Fixed toolbar buttons in #6678

Regarding text styles: ParagraphNode does not have properties to store them right now. We will need to add new properties in ParagraphNode and new create signals in Toolbar to process the action separately for table the same way it's done with formatting now. I'd rather do this in a separate pr as this is not a small change

@ivailop7
Copy link
Collaborator

Fixed toolbar buttons in #6678

Regarding text styles: ParagraphNode does not have properties to store them right now. We will need to add new properties in ParagraphNode and new create signals in Toolbar to process the action separately for table the same way it's done with formatting now. I'd rather do this in a separate pr as this is not a small change

Agreed. This PR is a great step forward.

@ivailop7
Copy link
Collaborator

@etrepum could I get a second pair of eyes, if you don't mind.

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.

LGTM, thank you!

@etrepum etrepum added this pull request to the merge queue Sep 29, 2024
Merged via the queue into facebook:main with commit a5fad08 Sep 29, 2024
44 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.

4 participants