etl icon indicating copy to clipboard operation
etl copied to clipboard

wizard: link to wizard pages doesn't work when opened for the first time

Open Marigold opened this issue 1 year ago • 5 comments

Owidbot posts a link to chart-diff page to every PR such as http://staging-site-ntd-funding/etl/wizard/Chart%20Diff. However, when I click on it, I see an error

Page not found
You have requested page /Chart Diff, but no corresponding file was found in the app's pages/ directory. Running the app's main page.

Then I have to manually click on it in wizard. Interesting, after opening the page from Wizard, the link then works (I guess streamlit saves some info about the page internally?).

It's not a big deal, but I wonder if there's an easy solution and whether it bothers someone else too.

Marigold avatar May 20 '24 11:05 Marigold

this has been occurring for some time and, while not urgent, it is a bit annoying.

we currently use a third party library to manage a multi-page app (i.e wizard): https://github.com/blackary/st_pages. So one option would be to explore a bit more how we use this library and try to see if we can fix this.

On the other hand, streamlit has some capabilities for multi-page apps, but I remember these being quite limited. See docs.

In streamlit's roadmap, they mention that they are working on improving (actually testing) their native support (see section 'Multipage apps v2 - Public Preview'). So another option would be to see if we are better of using native support once their v2 is out.


I can look into this from tomorrow / next engineering cycle

lucasrodes avatar May 20 '24 11:05 lucasrodes

If it's on their roadmap, then I wouldn't worry about this. It's just one extra click.

Marigold avatar May 20 '24 18:05 Marigold

For now, I think a simple solution would be that the link points to the wizard, not to chart diff. The user would need to do an extra click anyway, but at least they would not see the error and get confused.

pabloarosado avatar May 23 '24 09:05 pabloarosado

The situation might improve with the new release of MPA v2, but I think there are couple of issues there still.

For the time being, a solution is to use query-based link with the alias of the page (see config.yml for aliases). For chart diff, that'd be: http://staging-site-master/etl/wizard?page=chart-diff

lucasrodes avatar Jun 04 '24 23:06 lucasrodes

This issue still happening in MPAv2. Raised an issue here: https://github.com/streamlit/streamlit/issues/8860

lucasrodes avatar Jun 10 '24 12:06 lucasrodes

This issue 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[bot] avatar Aug 09 '24 23:08 stale[bot]