Skip to content

Fix inaccessible QGIS settings actions on short screens - #124

Open
joao-jtjsoftware wants to merge 2 commits into
opengeos:mainfrom
joao-jtjsoftware:fix/qgis-settings-layout
Open

Fix inaccessible QGIS settings actions on short screens#124
joao-jtjsoftware wants to merge 2 commits into
opengeos:mainfrom
joao-jtjsoftware:fix/qgis-settings-layout

Conversation

@joao-jtjsoftware

@joao-jtjsoftware joao-jtjsoftware commented Aug 1, 2026

Copy link
Copy Markdown

Summary

  • Make the QGIS settings tabs scrollable.
  • Keep Save, Test Provider, Reset Defaults, diagnostics, and status controls outside the scroll area.
  • Constrain oversized floating settings docks to the available screen geometry.
  • Add Qt layout regression tests.

Fixes #115.

Testing

  • Reproduced using QGIS 3.44.12 LTR at a constrained window size.
  • Confirmed that settings content scrolls and footer actions remain accessible.
  • Added two PyQt layout tests.
  • Pre-commit hooks pass.

Summary by CodeRabbit

  • Bug Fixes

    • Improved the Settings panel layout for smaller windows by making long tabs scrollable.
    • Ensured action buttons remain accessible while scrolling through settings.
    • Kept floating Settings panels within the available screen area and resized oversized panels automatically.
  • Tests

    • Added regression coverage for compact layouts and floating panel sizing.

@coderabbitai

coderabbitai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 346f66e3-0034-4093-aab2-1e63b6a9f43e

📥 Commits

Reviewing files that changed from the base of the PR and between 8b7f013 and 8435d25.

📒 Files selected for processing (2)
  • qgis_geoagent/open_geoagent/dialogs/settings_dock.py
  • qgis_geoagent/tests/test_settings_layout.py

📝 Walkthrough

Walkthrough

The settings dock wraps the Dependencies and Model tabs in scroll areas. Footer actions remain outside the Model scroll area. Floating docks now fit within the active screen’s available geometry. Regression tests cover both behaviors.

Changes

Settings dock layout

Layer / File(s) Summary
Scrollable settings tabs
qgis_geoagent/open_geoagent/dialogs/settings_dock.py, qgis_geoagent/tests/test_settings_layout.py
The Dependencies and Model tabs use resizable scroll areas. Tests verify tab scrolling, footer placement, and minimum-height behavior.
Floating dock geometry
qgis_geoagent/open_geoagent/dialogs/settings_dock.py, qgis_geoagent/tests/test_settings_layout.py
showEvent constrains oversized floating docks and repositions them within the active screen. Tests verify the resulting frame geometry.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: giswqs

Poem

A rabbit hops through settings bright,
Scrolls the forms to fit just right.
Buttons wait below the pane,
Docks stay within the screen again.
“Click Save!” sings the hare with cheer.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the primary fix for inaccessible settings actions on short screens.
Linked Issues check ✅ Passed The changes address issue #115 by adding scrollable settings tabs, preserving footer actions, and constraining floating docks to available screen geometry.
Out of Scope Changes check ✅ Passed The code and regression tests directly support the settings layout and floating-dock requirements in issue #115.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@qgis_geoagent/open_geoagent/dialogs/settings_dock.py`:
- Around line 445-455: Update the dock geometry logic around frameGeometry() so
the client width and height account for the native window-frame extents before
positioning: derive the frame margins, reduce the available client dimensions
accordingly, and resize before applying x/y clamps. Preserve the existing
on-screen positioning behavior, and add a regression test using available
geometry close to both dock dimensions to verify the entire floating dock
remains visible.

In `@qgis_geoagent/tests/test_settings_layout.py`:
- Around line 35-38: Update the regression test around
dock._fit_floating_dock_to_screen() to exercise the production showEvent() path:
show the floating dock, then call app.processEvents() so the queued fit callback
runs before geometry assertions. Remove the direct private-helper call unless
the test explicitly needs it for a separate case.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: caa2bb03-8dbc-41b2-8cc2-6a2e576f6a0b

📥 Commits

Reviewing files that changed from the base of the PR and between 5e758b5 and 8b7f013.

📒 Files selected for processing (2)
  • qgis_geoagent/open_geoagent/dialogs/settings_dock.py
  • qgis_geoagent/tests/test_settings_layout.py

Comment thread qgis_geoagent/open_geoagent/dialogs/settings_dock.py Outdated
Comment thread qgis_geoagent/tests/test_settings_layout.py
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.

QGIS Plugin Settings and Chat box are too tall -> inaccessible buttons

1 participant