Skip to content
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

Component streamlit-url-fragment stop working since 1.32 #8387

Closed
4 tasks done
xgorse opened this issue Mar 27, 2024 · 5 comments
Closed
4 tasks done

Component streamlit-url-fragment stop working since 1.32 #8387

xgorse opened this issue Mar 27, 2024 · 5 comments
Labels
status:needs-triage Has not been triaged by the Streamlit team type:bug Something isn't working

Comments

@xgorse
Copy link

xgorse commented Mar 27, 2024

Checklist

  • I have searched the existing issues for similar issues.
  • I added a very descriptive title to this issue.
  • I have provided sufficient information below to help reproduce this issue.

Summary

Since 1.32, the streamlit-url-fragment component can't decode the fragment on the first load or reload, if you change the fragment once loaded it's work

Reproducible Code Example

import streamlit as st

from streamlit_url_fragment import get_fragment


fragment = get_fragment()
st.write(fragment)

Steps To Reproduce

If you reload the page, the result None

Expected Behavior

Get the fragment data on first load

Current Behavior

No response

Is this a regression?

  • Yes, this used to work in a previous version.

Debug info

  • Streamlit version: 1.32
  • Python version: 3.11
  • Operating System: Mac OS 14.3 / Linux 6.6.16-linuxkit (docker)
  • Browser: Arc/Firefox

Additional Information

Work as expected with Sreamlit 1.31

I don't know if it's related but at the same time, i have some issue with Streamlit-Antd-Components, some time the menu component is working on initial load.
Both component are working with no problem, since month, before 1.32

@xgorse xgorse added status:needs-triage Has not been triaged by the Streamlit team type:bug Something isn't working labels Mar 27, 2024
Copy link

If this issue affects you, please react with a 👍 (thumbs up emoji) to the initial post.

Your feedback helps us prioritize which bugs to investigate and address first.

Visits

@xgorse
Copy link
Author

xgorse commented Mar 27, 2024

I was thinking of a delay on component loading and try with no success :

if fragment is None: 
  st.stop()

or time.sleep(3)

@xgorse
Copy link
Author

xgorse commented Mar 27, 2024

in the browser console if i add value to the hash it's work
window.location.hash = window.location.hash +"&foo=bar"

xgorse added a commit to xgorse/streamlit-url-fragment that referenced this issue Mar 29, 2024
Streamlit 1.32 break this component on first page load
streamlit/streamlit#8387
Just call the when the handler on Streamlit.RENDER_EVENT
@xgorse
Copy link
Author

xgorse commented Mar 29, 2024

I have made a PR to fix the component ktosiek/streamlit-url-fragment#2
Anyway i this this will be fixed in future release #8389

@kmcgrady
Copy link
Collaborator

kmcgrady commented Apr 1, 2024

Going to close this issue as fixed with the revert and the PR to fix the component. Let us know if you need anything else.

@kmcgrady kmcgrady closed this as completed Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:needs-triage Has not been triaged by the Streamlit team type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants