blackary / st_pages

An experimental version of Streamlit Multi-Page Apps
MIT License
467 stars 77 forks source link

Do not work for Streamlit 1.2.7 version #74

Closed ZefengQiu196 closed 12 months ago

ZefengQiu196 commented 1 year ago

I tried the code in Streamlit 1.2.7, but the section function does not work: The section becomes clickable, the content is the same as the home page, and the location of pages under the section at the sidebar is the same as pages out of the section

rajesh-ahana commented 12 months ago

Having the same issue

yash2mehta commented 12 months ago

Same issue as well, pls fix

aaronpliu commented 12 months ago

same issue in v1.28

Karlosll91 commented 12 months ago

V1. 28, same problem today

blackary commented 12 months ago

Thanks for the feedback -- could someone please share a simple example repo and app that shows this problem?

Karlosll91 commented 12 months ago

Thank you blackary, please check https://github.com/Karlosll91/streamlit_test

I have Python==3.11.5, Streamlit==1.28.0 and st-pages==0.4.5

When I load the app, it looks like is working only in the main page but when I change pages it loses indentation, and sections become clickable. I tried adding show_pages code to all other pages but same thing happens

blackary commented 12 months ago

@Karlosll91 Note that add_page_title() or add_indentation() must be called on every page in the app to add the indentation and to make the section unclickable.

Karlosll91 commented 12 months ago

You are totally right, that solves the problem! thank you. This was my first time using the module and totally missed the comment in the code in the last example of the README. I think I missed because just wanted to use the show_pages function so I just quickly looked over the rest of examples, might I suggest adding the note to the first example too? thanks @blackary

blackary commented 12 months ago

@Karlosll91 Good point. I added it to the first section about using sections.

image