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
st.data_editor jitters on mobile/narrow layout (embedded doc example) #6900
Comments
Same happens to me (Version 116.0.5845.180 (Build oficial) (64 bits). |
Supposedly, this bug has been occurring since 1.22.0 from what I can tell and only on chrome. @xl0 and @javioatwork and @sfc-gh-dmatthews , when you resize the df, will the jitter stop or the df is completely unusable? Are there any console logs that you can provide me with to debug this problem? |
@willhuang1997 , resizing can get it to stop jittering, but it takes many attempts, so I'd say it's unusable. Nothing in the dev tools logs that looks relevant. |
Could this issue be fixed by #7281? It seems to fit the description in that issue. |
@sfc-gh-dmatthews Would you mind taking a look one more time on this on the latest official version. I believe some changes @LukasMasuch on the scrollbar may have helped here. |
@kmcgrady I am unfortunately still seeing the same issue with 1.28.1. I am seeing tabels resize both on a freshly loaded page and some that are only triggered by hovering on the table. This is accompanied by significant cpu load from the page and the page frequently becoming unresponsive. Resizing the window eventually triggered a https://legacy.reactjs.org/docs/error-decoder.html/?invariant=185 react error from all tables on the page. This is observed in Edge on Windows 11 on a 4 K monitor. The issue seems specific to the monitor resolution. |
I also noticed that when this happens, I am seeing the horizontal scrollbar of a table that is supposed to be |
I was able to reproduce the jitter on Streamlit v1.28.3.dev20231115. 😞 |
On macOS Sonoma, using Streamlit v1.28.3.dev20231115 in a clean environment, Python 3.11.5, Chrome: import streamlit as st
import pandas as pd
df = pd.DataFrame({"A": [1,2,3],"B":[4,5,6],"C":[7,8,9]})
a,b = st.columns([2,1])
a.data_editor(df, use_container_width=True) If the sidebar is closed, going from 649->648 pixels of width for the app/window triggers the jitter (fairly reliably). It doesn't seem to jitter when coming up from a smaller size. And the "fairly reliably" comes from some variation at the +1 pixel size. You can watch the scrollbar (or void where the scrollbar should be) and sometimes you need to go +2 pixels then back down to the jitter-point. The minified react error also occurs around this jitter-point if adjusting the width more aggressively than one pixel at a time. |
Screen recording of the above comment: |
For anyone who needs a quick fix: st.write('''<style>
[data-testid="stDataFrameResizable"] {
border: 2px solid rgba(250, 250, 250, 0.1) !important;
}
</style>''', unsafe_allow_html=True) Anything other than the default 1px border seems to get rid of the jitter. |
@J-PRS You are right - the quick fix fixes it. Thank you :) |
FYI @J-PRS @EMjetrot @jenshnielsen @xl0 @javioatwork I was playing with a solution for this, and I found some solution that can be fixed with #7733 . Essentially there's some rounding errors happening that's creating a misjudgment of sizing the dataframe cannot decide, and so it switches between the two (the jitter effect)
(2) and (3) handle a potentially different rounding error. I'm detecting between the The URL allows you to run some arbitrary code for testing, but I can provide a link to the wheel file to test locally. |
Same with |
I also did a few tests and was able to eventually run in jitter with 1 & 3 as well. But not with 2 ( @xl0 I believe the error you get is a different issue. I have seen an error before in Streamlit a couple of times in situations of quick and excessive resizing of the browser window. But it is unlikely that this is something to appear in any normal usage scenario. |
I can reproduce the jitter in the maximized Data_Display_Tester for all 3 scenarios. |
## Describe your changes Glide-data-grid had a [major update](glideapps/glide-data-grid#810). This PR updates to this version and adapts the implementation for all the breaking/updated features. This update fixes a variety of issues (see list below). ## GitHub Issue Link (if applicable) Closes #6900 Closes #7032 Closes #7727 Closes #6810 Closes #7930 Closes #7949 Closes #7831 Closes #8168 ## Testing Plan - Updated tests --- **Contribution License Agreement** By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.
The fix is merged and will be released in |
Just wanted to follow up that the updates are live as of the latest release 1.32.2. 🥳 Thanks everyone for your valuable input and feedback! |
We are still getting this flickering issue with latest streamlit version 1.32.2. We have a multi page app which is embedded in iframe of another app. |
@upasana-mittal Do you use altair / vega lite charts? In that case, you are probably running into the issue reported here. |
We are using plotly charts |
@upasana-mittal In that case, this sounds like a new issue. It would be awesome if you could create a new issue for this. |
## Describe your changes Glide-data-grid had a [major update](glideapps/glide-data-grid#810). This PR updates to this version and adapts the implementation for all the breaking/updated features. This update fixes a variety of issues (see list below). ## GitHub Issue Link (if applicable) Closes streamlit#6900 Closes streamlit#7032 Closes streamlit#7727 Closes streamlit#6810 Closes streamlit#7930 Closes streamlit#7949 Closes streamlit#7831 Closes streamlit#8168 ## Testing Plan - Updated tests --- **Contribution License Agreement** By submitting this pull request you agree that all contributions to this project are made under the Apache 2.0 license.
Checklist
Summary
When viewing the docs on mobile, the embedded example of
st.data_editor
jitters with an interior scrollbar rapidly appearing and disappearing.Reproducible Code Example
No response
Steps To Reproduce
(On Chrome on a Google Pixel 5)
Expected Behavior
It should have a steady display.
Current Behavior
It jitters as shown in the recording.
Is this a regression?
Debug info
Additional Information
I was not able to reproduce the jitter in Chrome or Firefox in Windows (with simulated mobile dimensions).
I was able to reproduce the bug in DuckDuckGo on the same Google Pixel 5 device. I could also reproduce the issue in Chrome on a Galaxy Note 8.
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: