Skip to content

147 UI cleanup tweaks - #149

Merged
boscorat merged 15 commits into
masterfrom
147-ui-cleanup-tweaks
Aug 8, 2026
Merged

147 UI cleanup tweaks#149
boscorat merged 15 commits into
masterfrom
147-ui-cleanup-tweaks

Conversation

@boscorat

@boscorat boscorat commented Aug 8, 2026

Copy link
Copy Markdown
Owner

No description provided.

Jason Farrar and others added 7 commits August 8, 2026 21:17
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>
@boscorat boscorat linked an issue Aug 8, 2026 that may be closed by this pull request
@boscorat
boscorat requested a lite review from Copilot August 8, 2026 22:04
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

Documentation reminder

The following view file(s) were modified in this PR:

src/openstan/views/admin_view.py
src/openstan/views/anonymise_dialog.py
src/openstan/views/project_view.py
src/openstan/views/run_reports_view.py

Please review and update the relevant pages in docs/screens/ before merging.

If the UI has visually changed, capture a new screenshot for the affected screen(s) and commit it to docs/assets/screenshots/. See docs/assets/screenshots/SCREENSHOTS.md for the filename, required app state, and capture instructions for each screen.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 QWidget container. To keep consistent theming defaults (auto-fill background) and avoid mixing raw Qt widgets, use StanWidget for 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 --check and matches the existing style used elsewhere (e.g. StanFolderDialog in src/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.

Comment thread src/openstan/views/project_view.py
Comment thread src/openstan/views/anonymise_dialog.py Outdated
Comment thread src/openstan/views/admin_view.py Outdated
boscorat and others added 7 commits August 8, 2026 23:11
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>
@boscorat
boscorat merged commit abad3cc into master Aug 8, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI Cleanup & Tweaks

2 participants