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-table] Bug Fix: colWidths not imported from DOM for TableNode #6731

Merged
merged 5 commits into from
Oct 16, 2024

Conversation

cwstra
Copy link
Contributor

@cwstra cwstra commented Oct 14, 2024

Description

Currently, lexical-table serializes column widths to the DOM, but doesn't read them. This should remedy that situation.

Closes #6685

Test plan

The playground does not have a convenient way to demonstrate this, though I did update the relevant unit test to incorporate reading the column width.

Copy link

vercel bot commented Oct 14, 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 Oct 15, 2024 3:06pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 15, 2024 3:06pm

@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 Oct 14, 2024
Copy link

github-actions bot commented Oct 14, 2024

size-limit report 📦

Path Size
lexical - cjs 29.94 KB (0%)
lexical - esm 29.81 KB (0%)
@lexical/rich-text - cjs 38.54 KB (0%)
@lexical/rich-text - esm 31.61 KB (0%)
@lexical/plain-text - cjs 37.15 KB (0%)
@lexical/plain-text - esm 28.99 KB (0%)
@lexical/react - cjs 40.34 KB (0%)
@lexical/react - esm 33.08 KB (0%)

}
columns.push(parseFloat(width));
}
if (columns) {tableNode.setColWidths(columns);}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think this will pass the prettier check, you can npm run prettier:fix to fix it and npm run ci-check to verify that the syntax/type/link checks pass locally

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, along with patching up an e2e test that was (positively) affected by this change. Getting type errors inside of lexical-code when running the ci-check locally. 🤔

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.

Looks good!

@etrepum etrepum added this pull request to the merge queue Oct 16, 2024
Merged via the queue into facebook:main with commit 2c9b03c Oct 16, 2024
43 of 44 checks passed
@cwstra cwstra deleted the read-colgroup branch October 16, 2024 14:09
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.

Bug: сolWidths property is not serialized from html
3 participants