-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Fix selection of small table cells #9673
Conversation
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.
It looks good from me the code perspective. I would be happy to have it confirmed from one of the designers, too.
@@ -16,4 +16,8 @@ | |||
box-shadow: inset 0 0 0 1px $blue-medium-500; | |||
border-style: double; | |||
} | |||
|
|||
&__cell-content { |
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.
@jasmussen - do we have any pattern for the placeholder in the table cell?
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.
@jasmussen Just thought I'd ping you again on this question in case you missed it. Cheers.
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.
Hope you don't mind, I've also added you as a reviewer based on Grzegorz' feedback.
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.
Sorry I missed the ping!
I think PR works well for me!
We don't have any pattern for placeholder text in tables, and I don't think we need it either. The table resembles a table in its natural state, and it's clear where you need to set the caret in order to type. Also, given table cells can grow very small, as this PR is about, it would be hard to add placeholder text that worked within those rules.
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.
Awesome - thanks for the reviews on this! 😃
Will merge now.
Description
I noticed that it can be difficult to select very narrow table cells. The RichText element within the table cell is the element that receives selection. In the gif below the rich text has collapsed to just 1px wide and is hard to select:
This PR moves padding from the
td
element to the RichText (just for the editor) so that there's a larger selection area.Pretty open to other suggestions of how to fix this - this seemed like the simplest.
How has this been tested?
Manually tested selection of a narrow cell
Screenshots
Gif showing the fix
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist: