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] Stop selecting the whole table after pasting cells #6539

Merged
merged 3 commits into from
Aug 22, 2024

Conversation

ivailop7
Copy link
Collaborator

Fixes #5656

Upon pasting a cells selection in a table when the target area is not a cells selection inside a table, it would select the whole table after the paste event. It worked correctly (not select the whole table) if the selected area to paste to was a cells selection.

Before:

before.mov

After:

after.mov

Copy link

vercel bot commented Aug 21, 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 Aug 22, 2024 4:46pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 22, 2024 4:46pm

@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 Aug 21, 2024
@ivailop7 ivailop7 added the extended-tests Run extended e2e tests on a PR label Aug 21, 2024
Copy link

github-actions bot commented Aug 21, 2024

size-limit report 📦

Path Size
lexical - cjs 29.38 KB (0%)
lexical - esm 29.24 KB (0%)
@lexical/rich-text - cjs 37.74 KB (0%)
@lexical/rich-text - esm 31.05 KB (0%)
@lexical/plain-text - cjs 36.41 KB (0%)
@lexical/plain-text - esm 28.42 KB (0%)
@lexical/react - cjs 39.64 KB (0%)
@lexical/react - esm 32.51 KB (0%)

@ivailop7 ivailop7 changed the title Stop selecting the whole table after pasting cells [lexical-table] Stop selecting the whole table after pasting cells Aug 21, 2024
zurfyx
zurfyx previously approved these changes Aug 21, 2024
@ivailop7 ivailop7 added this pull request to the merge queue Aug 22, 2024
Merged via the queue into facebook:main with commit fb82331 Aug 22, 2024
37 of 41 checks passed
@moughxyz
Copy link
Contributor

I was actually just investigating an issue with whole table selection as well :) #6542

I'm wondering if it should be ok for a PR like the one that was merged here to go through without tests? The problem is that the change made here is now indefensible against future changes. No one will know whether it's safe to modify code in this area, and no one will know whether their changes break something here.

I mention this in my PR:

It's also my opinion that for large open source projects like this, tests should be the ultimate way of determining what stays and what goes. At some point there will no longer be anyone involved in the project who has all the historical context necessary to determine whether a change is harmful or beneficial, and its up to the tests to defend each change.

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: Full table selected after cells copy/paste
6 participants