-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[Table] Refactor header menus to divorce click-target size from gradient size #906
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.
The new gradient and click target are great! |
@@ -51,7 +51,20 @@ | |||
} | |||
} | |||
|
|||
.bp-table-th-menu { | |||
.bp-table-th-menu-container { | |||
flex-shrink: 0; |
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.
shouldn't need flex properties if you're using position: absolute
but whatever
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.
yeah i wasn't actually sure what this rule was doing (i'm no flex expert), but it was there before, so i left it in the refactor.
cursor: $action-cursor; | ||
width: $column-header-min-height + $pt-grid-size; | ||
width: $column-header-min-height; // create a larger, more accessible click target |
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.
i don't think comment means much, and will mean even less in a month. it doesn't even look correct when i compare with code on the left, where the width was obviously larger.
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.
fair, though in general i like quick little CSS comments explaining the intent behind a rule. regardless of the target size prior to this refactor, this element's purpose is still to create a larger click target than the 16px
icon it wraps, so the comment seemed helpful. if the intent is obvious, happy to remove.
Builds on #891
Changes proposed in this pull request:
Table column headers suffer from a problem:
This PR divorces the gradient from the popover click target. Now, we can resize the gradient without affecting the size of the click target. Specific changes:
bp-table-th-menu-container
(new)bp-table-th-menu-container-background
(new; sibling ofbp-table-th-menu
)bp-table-th-menu
(same thing we had before)30px
x30px
.10px
wider to ensure the text fades out before reaching the icon.pointer-events: none
to not swallow clicks meant for the underlying header cell.Reviewers should focus on:
Screenshot
Gradient before:
Gradient after:
Click target before:
Click target after: