Fix: Updated reset configuration to use dialog instead of popover which now closes on X button click, Submit Button Now Resets Widgets to default values by clearing config. #1792
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updated reset configuration to use dialog instead of popover which now closes on X button click, Submit Button Now Resets Widgets to default values by clearing config.
Does this introduce a breaking change?
This pull request refactors the reset configuration functionality in
04_Configuration.py
to improve user experience and code readability. The main change replaces the previous popover-based implementation with a dialog-based approach usingst.dialog
. Additional adjustments streamline the reset process and enhance session state handling.Refactoring and User Experience Improvements:
st.dialog
, providing a more intuitive and consistent user interface for resetting configurations.show_reset_dialog
flag to control dialog visibility and clearing session state more effectively after a reset.How to Test
What to Check
Verify that the following are valid
Other Information
This pull request refactors the reset configuration functionality in
04_Configuration.py
to improve user experience and code maintainability. The changes replace the previouspopover
implementation with a dialog-based approach, streamline session state management, and enhance the reset confirmation process.Refactoring of reset configuration functionality:
st.popover
implementation with an@st.dialog
decorator for better UI consistency and clarity. The new dialog includes a confirmation input and reset button labeled:red[Reset Now]
.st.session_state.clear()
to reset all session keys and ensuring proper handling of dialog visibility with theshow_reset_dialog
state variable.