Added collapsible sidepanels for PlotWindow - #13896
Conversation
44769ce to
bc16cea
Compare
PlotWindow
bc16cea to
40d7872
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13896 +/- ##
==========================================
+ Coverage 91.34% 91.36% +0.01%
==========================================
Files 477 481 +4
Lines 34062 34112 +50
==========================================
+ Hits 31115 31166 +51
+ Misses 2947 2946 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Pull request overview
Refactors the PlotWindow GUI layout to replace dock-based side panels with splitter-based side panels, and extracts plot-control UI elements into dedicated widgets/utilities to reduce duplication and avoid the QDockWidget-related duplication/undocking issues.
Changes:
- Replaced
QDockWidgetside panels inPlotWindowwith aQSplitter+ reusable side-panel helpers. - Extracted Everest controls plot options and misfits plot options into dedicated widget classes under
widgets/plot_controls/. - Added Qt UI utility helpers (
qt_creator.py) and new unit tests for the extracted widgets/utilities.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/ert/gui/plotting/plot_window.py |
Switches layout to QSplitter side panels and wires in extracted plot-control widgets. |
src/ert/gui/plotting/utils/qt_creator.py |
Adds shared UI helpers for side panels and group-box/layout creation. |
src/ert/gui/plotting/widgets/plot_controls/misfits_options.py |
New misfits options widget wrapper exposing checkbox state. |
src/ert/gui/plotting/widgets/plot_controls/everest_controls_plot_options.py |
New Everest controls plot options widget wrapper for x-axis selection. |
src/ert/gui/plotting/widgets/plot_controls/__init__.py |
Exposes the new plot-control widgets as a small public module surface. |
tests/ert/unit_tests/gui/plotting/widgets/test_misfits_options.py |
Adds unit tests for MisfitsOptions defaults, state updates, and callback triggering. |
tests/ert/unit_tests/gui/plotting/widgets/test_everest_controls_plot_options.py |
Adds unit tests for EverestControlsPlotOptions defaults and callback triggering. |
tests/ert/unit_tests/gui/plotting/utils/test_qt_creator.py |
Adds unit tests for the new Qt creator helpers. |
| self._toggle_mean = QCheckBox("Show mean") | ||
| self._toggle_mean.setChecked(True) | ||
| self._toggle_mean.stateChanged.connect(connection_point) | ||
| self._toggle_outliers = QCheckBox("Show outliers") | ||
| self._toggle_outliers.setChecked(True) | ||
| self._toggle_outliers.stateChanged.connect(connection_point) | ||
| self._toggle_scatter_plot = QCheckBox("Show scatter") | ||
| self._toggle_scatter_plot.setChecked(False) | ||
| self._toggle_scatter_plot.stateChanged.connect(connection_point) | ||
| self._toggle_box = QCheckBox("Show box plot") | ||
| self._toggle_box.setChecked(True) | ||
| self._toggle_box.stateChanged.connect(connection_point) |
| self._display_over_button_group = QButtonGroup() | ||
| self._display_over_button_group.addButton(self._display_over_batches_radio) | ||
| self._display_over_button_group.addButton(self._display_over_controls_radio) | ||
| self._display_over_button_group.buttonClicked.connect(connection_point) |
d34f3a7 to
7a457ed
Compare
berland
left a comment
There was a problem hiding this comment.
Looks good to me. Can the copilot comments be ignored?
Ignored similar comment in regarding the layer in previous PR |
|
Blocked until #13843 is merged |
This comment was marked as outdated.
This comment was marked as outdated.
569def0 to
7a457ed
Compare
Also started the move of the util create_box and create_layout
Not using the functionality of QDockWidget Now uses splitter instead, allows user to collapse sidepanels Note: tests for this feature was added to last commit
Similar to MisfitsOptions, also improved imports
7a457ed to
7e5b85a
Compare
|
Screenshots differ from baselines. A baseline update PR has been prepared: equinor/ert-testdata#43 |
Issue
Resolves #11083
Part of #13883
Resolves #11066
Resolves #
Approach
Moved sidepanels from
QDockWidgettoQSplitterto avoid duplication error, makingQDocketWidgetnot necessary.Now have collapsible sidepanels
Moved plot options in their own respective widgets
https://github.com/user-attachments/assets/84375799-fbd1-4ea4-b983-22dc04e96893

git rebase -i main --exec 'just rapid-tests')When applicable