Skip to content

fix(figurecomposer): show controls for selected BZ mode - #553

Merged
kmnhan merged 1 commit into
mainfrom
dev-figure-composer-bz-momentum-controls
Aug 13, 2026
Merged

fix(figurecomposer): show controls for selected BZ mode#553
kmnhan merged 1 commit into
mainfrom
dev-figure-composer-bz-momentum-controls

Conversation

@kmnhan

@kmnhan kmnhan commented Aug 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • Show the fixed kz controls only for in-plane Brillouin-zone slices.
  • Show the fixed in-plane momentum control only for out-of-plane slices.
  • Update the visible row immediately when the mode changes.
  • Preserve both momentum values when the user switches modes.
  • Restore the correct control visibility from saved operation state.

Root cause

The Brillouin-zone editor added both momentum rows without connecting their
visibility to the selected slice mode.

Validation

  • QT_QPA_PLATFORM=offscreen QT_API=pyqt6 uv run pytest -q tests/interactive/imagetool/manager/figurecomposer/test_overlays.py (26 passed)
  • QT_QPA_PLATFORM=offscreen QT_API=pyside6 uv run pytest -q tests/interactive/imagetool/manager/figurecomposer/test_overlays.py (26 passed)
  • uv run ruff check src/erlab/interactive/_figurecomposer/_operations/_bz_overlay.py tests/interactive/imagetool/manager/figurecomposer/test_overlays.py
  • uv run ruff format --check src/erlab/interactive/_figurecomposer/_operations/_bz_overlay.py tests/interactive/imagetool/manager/figurecomposer/test_overlays.py
  • uv run mypy src/erlab/interactive/_figurecomposer/_operations/_bz_overlay.py
  • git diff --check

@codecov

codecov Bot commented Aug 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.93%. Comparing base (40f973f) to head (44bd08a).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #553      +/-   ##
==========================================
- Coverage   91.94%   91.93%   -0.01%     
==========================================
  Files         250      250              
  Lines       98809    98821      +12     
  Branches    16610    16610              
==========================================
+ Hits        90845    90854       +9     
- Misses       4576     4577       +1     
- Partials     3388     3390       +2     

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

@kmnhan
kmnhan marked this pull request as ready for review August 13, 2026 04:09
@kmnhan
kmnhan merged commit 2b998a0 into main Aug 13, 2026
26 checks passed
@kmnhan
kmnhan deleted the dev-figure-composer-bz-momentum-controls branch August 13, 2026 04:09
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