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

Figure out how to persist form data between pages and saved sessions, with caveats #82

Open
andrew-weisman opened this issue Feb 23, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@andrew-weisman
Copy link
Contributor

andrew-weisman commented Feb 23, 2024

Right now when you flip back and forth between pages, selections of widgets in forms are not persisted. Ditto goes for saving the streamlit session to disk (new functionality around 2/23/24) in order to be consistent with the page-switching behavior.

At least, perhaps, put in a warning when there is form data that is not being saved, at least for session state saves.

May have to employ something like the streamlit_dataframe_editor class in order to do this.

Another option, probably the best option, would probably be to not use forms at all. They are probably being used because otherwise the page would take a long time to reload. However, a general principle we should probably employ is to hide long-taking processes on pages behind buttons (putting the long-taking process in a callback to the button). This would also ensure that the entire app is maximally snappy and ensure every page always loads quickly. When a user clicks a button (e.g., to run a workflow or display a heavy Plotly graphic), then they should expect a longer-taking process, so that would not be a problem.

Existing examples are currently in the Gater (plotting the new phenotypes) and in running the SIT workflow.

@andrew-weisman andrew-weisman added the enhancement New feature or request label Feb 23, 2024
@andrew-weisman andrew-weisman self-assigned this Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant