-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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] Fix: Delete table row in merge cells #6922
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
size-limit report 📦
|
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.
Almost as important as the fix itself is writing at least one test to show that this works as expected, and the test will ensure that it continues to work as the code evolves
I don't think this fix is sufficient Take for example this PR playground url, if you delete the row from the cell marked 'x' then it will deform the table delete-row-bug.mov |
@etrepum I have handled the above case and also added two tests for the row deletion previous-merged-cell.mp4 |
Description
Describe the changes in this pull request
When deleting the table row for the merged cells the calculation of the actual row span for the cells was incorrect due to which extra columns were being created. Fixed the rowSpan calculation for the merged cells by taking the minimum value of the
anchorCell.__rowSpan
and the difference of overflow of top rows and current cellrowSpan
.Closes #5854
Test plan
Before
Insert relevant screenshots/recordings/automated-tests
Recording.2024-12-09.040342.1.mp4
After
Insert relevant screenshots/recordings/automated-tests
Recording.2024-12-09.040633.1.mp4