Theme Change subscriptions#1245
Conversation
There was a problem hiding this comment.
Pull request overview
This PR removes explicit widget theme-change subscriptions that were redundantly added on top of BECWidget’s theme handling, eliminating a layer of double subscriptions. It also removes the theme_update kwarg entirely and standardizes theme subscription behavior across all BECWidget subclasses.
Changes:
- Removed the
theme_updatekwarg fromBECWidgetand all call sites/signatures. - Centralized theme-change subscription by having
BECWidgetalways connect to application theme changes. - Removed per-widget manual theme-change connections that previously caused duplicate subscriptions.
Reviewed changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit_tests/test_busy_loader.py | Updates test widget constructor to match removed theme_update kwarg. |
| bec_widgets/widgets/utility/visual/dark_mode_button/dark_mode_button.py | Drops explicit theme_update=True in base init call. |
| bec_widgets/widgets/services/scan_history_browser/scan_history_browser.py | Removes theme_update plumbing and stops forwarding it to subcomponents. |
| bec_widgets/widgets/services/scan_history_browser/components/scan_history_view.py | Removes theme_update argument and relies on BECWidget default behavior. |
| bec_widgets/widgets/services/scan_history_browser/components/scan_history_metadata_viewer.py | Removes theme_update argument and docstring reference. |
| bec_widgets/widgets/services/scan_history_browser/components/scan_history_device_viewer.py | Removes theme_update argument and relies on base behavior. |
| bec_widgets/widgets/services/device_browser/device_item/device_signal_display.py | Removes theme_update argument and simplifies base init call. |
| bec_widgets/widgets/services/device_browser/device_item/device_config_form.py | Removes extra manual theme-signal connection to avoid double subscription. |
| bec_widgets/widgets/services/bec_atlas_admin_view/experiment_selection/experiment_mat_card.py | Drops explicit theme_update=True in base init call. |
| bec_widgets/widgets/services/beamline_states/beamline_state_pill.py | Drops explicit theme_update=True in base init call. |
| bec_widgets/widgets/services/beamline_states/beamline_state_manager.py | Drops explicit theme_update=True in base init call. |
| bec_widgets/widgets/progress/ring_progress_bar/ring_progress_bar.py | Drops explicit theme_update=True in base init call. |
| bec_widgets/widgets/progress/bec_progressbar/bec_progressbar.py | Drops explicit theme_update=True in base init call. |
| bec_widgets/widgets/plots/waveform/waveform.py | Removes redundant manual theme-change connection (now handled by base). |
| bec_widgets/widgets/plots/plot_base.py | Removes redundant manual theme-change connection and relies on BECWidget. |
| bec_widgets/widgets/plots/heatmap/heatmap.py | Drops explicit theme_update=True in base init call. |
| bec_widgets/widgets/editors/monaco/monaco_widget.py | Drops explicit theme_update=True in base init call. |
| bec_widgets/widgets/control/device_manager/components/ophyd_validation/ophyd_validation.py | Drops explicit theme_update=True in base init call. |
| bec_widgets/widgets/control/device_input/device_combobox/device_combobox.py | Drops explicit theme_update=True in base init call. |
| bec_widgets/widgets/containers/main_window/main_window.py | Removes redundant manual theme-change connection. |
| bec_widgets/utils/palette_viewer.py | Drops explicit theme_update=True in base init call. |
| bec_widgets/utils/help_inspector/help_inspector.py | Drops explicit theme_update=True in base init call. |
| bec_widgets/utils/forms_from_types/forms.py | Renames internal helper to clarify it only wires pretty-display styling to theme updates. |
| bec_widgets/utils/busy_loader.py | Updates demo widget constructor to match removed theme_update kwarg. |
| bec_widgets/utils/bec_widget.py | Removes theme_update kwarg and makes theme subscription unconditional in BECWidget. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Benchmark comparisonThreshold: 20% (lower is better). No benchmark regression exceeded the configured threshold. No benchmark improvement exceeded the configured threshold. All benchmark results
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Description
Some widgets were explicitely connecting to theme updates, however bec widget base class is normally taking care of it. This resolves in another layer of double subscriptions on theme updates.
Since there is no motivation to not follow the theme updates, bool kwarg
theme_updateis completely removed.Related Issues
related to #1244 but fixes different issue.