147 UI cleanup tweaks - #149
Conversation
Removed lengthy subtitles and replaced with tooltips. Improved title text and made it dynamic depending on whether a new project or attaching an existing project.
Correctly size the anonymise screen. Make the columns in the 'Always Anonymise' table the same size. Looked at automatically creating a new row when tabbing ot entering at the end of the final row, but not straightforward so parked this for now.
Resize the builder content to fit on start. Increase the size of the report title and subtitle input fields
Previously 'Empty Database & Restart' would delete and recreate gui.db, then only quit the application — requiring a manual relaunch. Now it deletes gui.db and uses os.execv to atomically restart the process. The startup logic in main.py handles recreating gui.db from the current schema spec. Project folders and data are unaffected — users can re-attach them via 'Add Existing Project' on startup.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Jason Farrar <farrar.jason1@gmail.com>
|
Documentation reminder The following view file(s) were modified in this PR: Please review and update the relevant pages in If the UI has visually changed, capture a new screenshot for the affected screen(s) and commit it to |
There was a problem hiding this comment.
Pull request overview
This PR focuses on UI polish across several views by tightening layouts, clarifying copy/labels, and adding inline help to reduce ambiguity during project creation and report building.
Changes:
- Refactors multiple UI layout blocks for compactness and consistency (mostly formatting/one-liner cleanups).
- Enhances the Project wizard form with per-field help icons and updated wizard titles/subtitles.
- Tweaks several sizing defaults (button labels/widths, splitter sizes, and dialog default sizing).
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/openstan/views/run_reports_view.py | Report-builder UI tweaks (button labeling, sizing, splitter sizing) plus several formatting refactors. |
| src/openstan/views/project_view.py | Adds help-text constants and a label+help-icon helper for the project wizard; adjusts wizard copy and folder dialog defaults. |
| src/openstan/views/anonymise_dialog.py | Adjusts dialog sizing and table sizing defaults; copy/layout compacting. |
| src/openstan/views/admin_view.py | Adjusts dialog sizing and compacts several layout/widget setup calls. |
Suppressed comments (3)
src/openstan/views/run_reports_view.py:163
- This inline conditional exceeds the project's formatted style and will likely be rewritten by
ruff format --check, causing CI noise/failure. Consider restoring the multi-line form so it stays stable under Ruff formatting.
item = QListWidgetItem(v)
item.setFlags(item.flags() | Qt.ItemFlag.ItemIsUserCheckable)
state = (
Qt.CheckState.Checked
src/openstan/views/project_view.py:81
- This helper constructs a raw
QWidgetcontainer. To keep consistent theming defaults (auto-fill background) and avoid mixing raw Qt widgets, useStanWidgetfor the container and parent the layout directly.
def _make_label_with_help(label_text: str, help_text: str) -> QWidget:
"""Create a label widget with an adjacent help icon for use in StanForm."""
container = QWidget()
row = QHBoxLayout()
row.setContentsMargins(0, 0, 0, 0)
row.addWidget(StanLabel(label_text))
row.addWidget(StanHelpIcon(help_text))
row.addStretch()
container.setLayout(row)
return container
src/openstan/views/project_view.py:104
- This call was collapsed into a very long line; Ruff formatting will typically expand it back out. Keeping the nested call multi-line makes it stable under
ruff format --checkand matches the existing style used elsewhere (e.g.StanFolderDialoginsrc/openstan/components.py).
def __init__(self, parent=None) -> None:
super().__init__(parent)
self.setWindowTitle("Select Project Folder Location")
self.setDirectory(
QStandardPaths.writableLocation(
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Jason Farrar <farrar.jason1@gmail.com>
Correctly size the anonymise screen. Make the columns in the 'Always Anonymise' table the same size. Looked at automatically creating a new row when tabbing ot entering at the end of the final row, but not straightforward so parked this for now.
Signed-off-by: Jason Farrar <farrar.jason1@gmail.com>
No description provided.