Skip to content

Feature/viewer layout#747

Draft
cpignedoli wants to merge 3 commits into
feature/viewercontrolsfrom
feature/viewer-layout
Draft

Feature/viewer layout#747
cpignedoli wants to merge 3 commits into
feature/viewercontrolsfrom
feature/viewer-layout

Conversation

@cpignedoli

Copy link
Copy Markdown
Member

Summary

This PR builds on #745 and focuses on improving the usability/layout of the structure viewer controls.

Depends on #745.

Changes

  • Makes StructureManagerWidget use a full-width structure viewer by default, with the detailed viewer controls collapsed below the geometry.
  • Adds a Below / Side controls layout switch in the Appearance tab.
  • Keeps high-frequency controls visible in a compact toolbar:
    • center atoms
    • default view
    • view scale
    • show axes
    • center axes
  • Uses icon-only buttons for center/default view to reduce toolbar space.
  • Moves detailed scale/control explanations into the optional Show view help text.
  • Removes duplicate geometry controls from the below-layout Appearance tab.
  • Adds tests for the below-controls layout and compact toolbar structure.

Validation

  • python -m ruff format aiidalab_widgets_base/viewers.py aiidalab_widgets_base/structures.py tests/test_viewers.py
  • python -m ruff check aiidalab_widgets_base/viewers.py aiidalab_widgets_base/structures.py tests/test_viewers.py
  • python -m compileall aiidalab_widgets_base/viewers.py aiidalab_widgets_base/structures.py tests/test_viewers.py
  • Direct widget smoke test for the compact toolbar and Below / Side switching

Full pytest could not be run locally because the existing AiiDA/pgtest setup tries to call the missing locate executable while searching for pg_ctl before the test body starts.

Screen.Recording.2026-05-19.at.10.44.11.mov

@codecov

codecov Bot commented May 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.58824% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.23%. Comparing base (42bcd52) to head (8684733).

Files with missing lines Patch % Lines
aiidalab_widgets_base/viewers.py 95.52% 3 Missing ⚠️
Additional details and impacted files
@@                    Coverage Diff                     @@
##           feature/viewercontrols     #747      +/-   ##
==========================================================
+ Coverage                   85.12%   85.23%   +0.10%     
==========================================================
  Files                          18       18              
  Lines                        3421     3514      +93     
==========================================================
+ Hits                         2912     2995      +83     
- Misses                        509      519      +10     
Flag Coverage Δ
python-3.12 85.20% <95.58%> (+0.10%) ⬆️
python-3.9 85.21% <95.58%> (+0.10%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cpignedoli cpignedoli marked this pull request as draft May 19, 2026 11:18
@cpignedoli cpignedoli marked this pull request as ready for review May 19, 2026 11:58
@cpignedoli cpignedoli marked this pull request as draft May 19, 2026 11:58
@cpignedoli cpignedoli changed the base branch from master to feature/viewercontrols May 19, 2026 12:06
@cpignedoli cpignedoli marked this pull request as ready for review May 19, 2026 12:06
@cpignedoli cpignedoli marked this pull request as draft May 19, 2026 16:14
@cpignedoli

Copy link
Copy Markdown
Member Author

I will fix pan functionality after merging of #742

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.

1 participant