Skip to content

Conversation

lukasmasuch
Copy link
Collaborator

@lukasmasuch lukasmasuch commented Jul 28, 2023

Describe your changes

As described here, a recent chrome update changed the behavior of the overflow: overlay CSS setting. This means we can no longer enforce an overlaying scrollbar with our style settings. We use this for st.dataframe, but it's now adding a white border for the scrollbar gutter.

The solution here is to ignore the custom styles for the dataframe scroll area. We need to apply this in our global CSS settings, since once it is applied it doesn't seem that it can be unset.

Current version:

Screen.Recording.2023-06-22.at.21.34.34.mov

Fixed version:

Screen.Recording.2023-10-10.at.15.16.13.mov

GitHub Issue Link (if applicable)

Closes: #6888

Testing Plan

We are not currently testing the scrollbar behavior, and this would be quite hard to do since it really depends on the OS, browser, and interactive usage. But I added/updated e2e tests to check dataframes with scroll areas if they are rendered correctly.


Contribution License Agreement

By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.

@lukasmasuch lukasmasuch changed the title Add negative padding to allow scrollbar overlay Fix dataframe scrollbars by using negative padding Jul 28, 2023
@lukasmasuch lukasmasuch changed the title Fix dataframe scrollbars by using negative padding [WIP] Fix dataframe scrollbars by using negative padding Aug 17, 2023
@stale
Copy link

stale bot commented Sep 3, 2023

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 3, 2023
@lukasmasuch lukasmasuch removed the stale label Sep 5, 2023
@stale
Copy link

stale bot commented Sep 20, 2023

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 20, 2023
@lukasmasuch lukasmasuch removed the stale label Sep 20, 2023
@lukasmasuch lukasmasuch changed the title [WIP] Fix dataframe scrollbars by using negative padding Fix dataframe scrollbars by using negative padding Oct 10, 2023
@lukasmasuch lukasmasuch marked this pull request as ready for review October 10, 2023 20:05
@lukasmasuch lukasmasuch merged commit 3b2f014 into develop Oct 10, 2023
@lukasmasuch lukasmasuch deleted the fix/dataframe-scrollbar-2 branch October 10, 2023 21:27
eric-skydio pushed a commit to eric-skydio/streamlit that referenced this pull request Dec 20, 2023
* Add negative padding to allow scrollbar overlay

* Change from overlay to auto

* Add some debugging stuff

* Some more tweaks

* Only apply negative padding for webkit browsers

* Change back previous defaults

* Remove unused imports

* Improve implementation

* Use effect for scroll check

* Improve implementation

* Improve implementation

* Improve scroll determination

* Improvements to scrolling logic

* Remove logging

* Improve fix logic

* Add additional pixel

* Remove outdated snapshots

* Update test to cover scrolling

* Rename

* Fix tests

* Improvements

* Update snapshots

* Move snapshots

* Add comments
zyxue pushed a commit to zyxue/streamlit that referenced this pull request Mar 22, 2024
* Add negative padding to allow scrollbar overlay

* Change from overlay to auto

* Add some debugging stuff

* Some more tweaks

* Only apply negative padding for webkit browsers

* Change back previous defaults

* Remove unused imports

* Improve implementation

* Use effect for scroll check

* Improve implementation

* Improve implementation

* Improve scroll determination

* Improvements to scrolling logic

* Remove logging

* Improve fix logic

* Add additional pixel

* Remove outdated snapshots

* Update test to cover scrolling

* Rename

* Fix tests

* Improvements

* Update snapshots

* Move snapshots

* Add comments
zyxue pushed a commit to zyxue/streamlit that referenced this pull request Apr 16, 2024
* Add negative padding to allow scrollbar overlay

* Change from overlay to auto

* Add some debugging stuff

* Some more tweaks

* Only apply negative padding for webkit browsers

* Change back previous defaults

* Remove unused imports

* Improve implementation

* Use effect for scroll check

* Improve implementation

* Improve implementation

* Improve scroll determination

* Improvements to scrolling logic

* Remove logging

* Improve fix logic

* Add additional pixel

* Remove outdated snapshots

* Update test to cover scrolling

* Rename

* Fix tests

* Improvements

* Update snapshots

* Move snapshots

* Add comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scrollbars in dataframes have white background in Chrome 114
2 participants