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

Refactor table resizer rendering logic #5957

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

AlexanderReznik
Copy link
Contributor

Disabling table resizer when mouse button is pressed, instead of when the selection is of type TableSelection.

This makes ui slightly better in some cases:

  1. Cursor doesn't change when starting the table selection
    table-selection-cursor

  2. Cursor doesn't change when during range selection the cursor is over the table
    range-selection-cursor

Copy link

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

@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 Apr 24, 2024
@@ -102,7 +83,7 @@ function TableCellResizer({editor}: {editor: LexicalEditor}): JSX.Element {
});
return;
}

updateIsMouseDown(isMouseDownOnEvent(event));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a safety measure in case mouseup is not registered by the browser. I'm not sure if this can ever happen and I'll be happy to hear a second opinion, if this check is required

@ivailop7 ivailop7 changed the title Change table resizer rendering logic Refactor table resizer rendering logic Apr 24, 2024
@ivailop7
Copy link
Collaborator

@AlexanderReznik, in the preview here, I'm still getting the selection stuck

@AlexanderReznik
Copy link
Contributor Author

@AlexanderReznik, in the preview here, I'm still getting the selection stuck

This is not getting fixed in this pr, but I'll try to fix it later

@ivailop7
Copy link
Collaborator

@AlexanderReznik, in the preview here, I'm still getting the selection stuck

This is not getting fixed in this pr, but I'll try to fix it later

Ah, misunderstood what this was fixing. My fault. All good now. Thanks, Alex!

@ivailop7 ivailop7 merged commit db7b242 into facebook:main Apr 25, 2024
45 checks passed
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

3 participants