Conversation
… components across views
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Pull Request Summary 🚀
What does this PR do? 📝
Improves UI consistency and reduces clutter across the DataSure Streamlit views, without changing the data pipeline or check logic. It introduces a shared UI-helpers module and routes every view's headers, dividers, and destructive-action confirmations through it.
Highlights:
utils/ui_utils.pywith four helpers:page_header,section_header,metric_row, and a singleconfirm_dialog(st.dialog-based) idiom.st.write("---")→st.divider().:white_check_mark:→:material/check_circle:(replication), empty_render_demo_guidancestub (config), and a bordered import-config card matching the credentials card.keyto the "Select Data to Remove" selectbox so its choice persists across reruns (the Remove button was previously never enabled), plus adisabledguard preventing a delete with no selection.Why is this change needed? 🤔
The seven view files were built independently over time, so headings, dividers, confirmation patterns, and layout drifted apart. My audit with Claude found ~11 cross-view inconsistencies plus several clutter spots. This made the app read as several loosely related pages rather than one coherent product. Centralizing the repeated patterns fixes that and makes future views consistent by default.
How was this implemented? 🛠️
src/datasure/utils/ui_utils.py. The helpers importstreamlitat call time so they honor the view-test harness'ssys.modulesswap regardless of import order.start_view,import_view,prep_view,config_view,correction_view,replication_view,output_view_template) to call the helpers instead of ad hocst.title/st.subheader/st.write("---")/bespoke confirmations.checks/, connectors, processing, or.streamlit/config.toml(the IPA theme was already solid).st.formconversion and the nine-tab output restructure were deliberately left out of scope (documented as a future follow-up).How to test or reproduce ? 🧪
uv run python -m pytest -m "not slow"— full suite (3093 passed, 7 pre-existing skips).uv tool run pre-commit run --all-files— all hooks pass.uv run datasureand walk the flow:Screenshots (if applicable) 📷
Confirmation that demo should be restarted:

Require confirmation if configuration to be deleted:

Checklist ✅