-
Notifications
You must be signed in to change notification settings - Fork 29
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
Add position:sticky to Experiment table head #1805
Conversation
position: sticky; | ||
top: 0; | ||
z-index: 3; | ||
background-color: $bg-color; |
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 keeps the right border of the table body from overlapping with the head
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.
LGTM
We should also make the first column (experiments) sticky as the user cannot drag + drop. IMO timestamp is less important.
Can you follow up, please and thank you.
Thanks @rogermparent for addressing this. Agreed with @mattseddon and one more next step is to add a bit of shadow if possible / if it makes sense (when some content is hidden). But definitely let's merge this! |
Code Climate has analyzed commit 6138da2 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 100.0% (85% is the threshold). This pull request will bring the total coverage in the repository to 96.8% (0.0% change). View more on Code Climate. |
This PR adds a simple implementation of a sticky header using CSS
position: sticky
to implement it.sticky-header-demo.mp4
The style is currently imperfect, particularly on the right-hand side when the table doesn't expand to the full width horizontally. Ther e is also currently no shadow added when scrolling.
I first tried to use a Flexbox-based solution thinking it more proper as we've had some trouble with
position:sticky
on websites, but the flex implementation took a lot of wrestling with the table widths and ended up being less user-friendly as horizontal scrolling became more difficult in a vertical-scroll-only body.Relates to #1562