-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[PR 3] Removed edge-cases of GridSelection #5291
[PR 3] Removed edge-cases of GridSelection #5291
Conversation
…-baseselection' into 5276-feature-gridselection-separation-from-lexical-core-gridselection-vs-nodeselection
…exical-core-baseselection
…-baseselection' into 5276-feature-gridselection-separation-from-lexical-core-gridselection-vs-nodeselection
…-baseselection' into 5276-feature-gridselection-separation-from-lexical-core-gridselection-vs-nodeselection
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…-baseselection' into 5276-feature-gridselection-separation-from-lexical-core-gridselection-vs-nodeselection
…-gridselection-vs-nodeselection' into 5276-feature-gridselection-separation-from-lexical-core-remove-grid-seleciton
…-baseselection' into 5276-feature-gridselection-separation-from-lexical-core-gridselection-vs-nodeselection
…-gridselection-vs-nodeselection' into 5276-feature-gridselection-separation-from-lexical-core-remove-grid-seleciton
…exical-core-remove-grid-seleciton
size-limit report 📦
|
Hey @zurfyx , @fantactuka could you please help me review this PR? |
const rangeSelection = $createRangeSelection(); | ||
rangeSelection.anchor.set(newAnchorCellKey, 0, 'element'); | ||
rangeSelection.focus.set(newFocusCellKey, 0, 'element'); | ||
$setSelection(rangeSelection); |
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.
This is a tricky one, I remember that a selection like this can break the table because you're essentially selecting the cells so operations like delete can make it inconsistent. I think that this entire function should be moved to the tables plugin and we can have a command to delegate handling this logic there.
We don't necessarily have to do it in this PR so you can leave GridSelection for now.
Why
In #5276 we proposed a solution on how to migrate GridSelection out of the core of the bundle, here is the third step by removing edge-case usage of GridSelection to decrease dependencies.
What