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-playground][TableCellRecizer] Bug Fix: Correctly take zoom into account when calculating table drag zones #6007

Closed
wants to merge 1 commit into from

Conversation

apella
Copy link
Contributor

@apella apella commented May 2, 2024

Description

In our implementation of this editor, the user can modify the zoom of the editor area independently of the rest of the page. This skews the selection areas of the table cell resizer. This commit fixes that.

It also slightly shifts the rectangles to center on the edge, instead of being outside the cell, and scales these rectangles proportionally. This makes for a more intuitive user experience as the user will try to select the edge, not the outside.

Closes: #

Test plan

Before

lexical-zoom-original

cell-resizer-old-regions

After

lexical-zoom-fixed

(selection zones were temporarily coloured yellow to display the zones. Notice how they now overlap with the cell border)
cell-resizer-new

In our implementation of this editor, the user can modify the zoom of
the editor area independently of the rest of the page. This skews the
selection areas of the table cell resizer. This commit fixes that.

It also slightly shifts the rectangles to *center* on the edge,
instead of being outside the cell, and scales these rectangles
proportionally. This makes for a more intuitive user experience as the
user will try to select the edge, not the outside.
Copy link

vercel bot commented May 2, 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 May 2, 2024 11:06am
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 2, 2024 11:06am

@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 May 2, 2024
@ivailop7 ivailop7 requested a review from ebads67 May 2, 2024 11:25
@apella
Copy link
Contributor Author

apella commented May 9, 2024

Closing this in preference of a more succinct solution suggested by @ebads67

@apella apella closed this May 9, 2024
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants