Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content

Refactor: Change of the widget folder structure and plugin creation

wyzula_j requested to merge refactor/nesting-widgets into main

Description

The widget folder currently lacks a clear hierarchy, with all widgets placed at the same level. This MR introduces a structured organization by nesting and grouping widgets according to their use cases, such as plotting, control, containers, etc.

Additionally, the plugin generator is updated to detect classes with a PLUGIN=True class attribute, allowing us to specify which widgets should have plugins generated. This approach replaces the previous method, which generated plugins only for top-level widgets inheriting from the BECWidget base class.

Related Issues

Closes #408 (closed)

Type of Change

  • Plugin generation is now based on a class attribute.
  • widget folder is reorganized for better structure.

Potential Side Effects

Some imports may still be incorrect and require verification.

New Structure

Reorganized Widget Structure

  • control: Widgets for data acquisition, device control, and experiment setup
    • device_control: Position-related widgets
      • position_indicator
      • positioner_box
      • positioner_group
    • buttons: Action-trigger widgets
      • stop_button
      • button_reset
      • button_resume
      • button_abort
    • scan_control: Widgets for scanning and data grouping
      • scan_group_box
      • scan_control
    • device_input: Inputs related to devices
      • device_line_edit
      • base_classes
      • signal_line_edit
      • device_combobox
      • signal_combobox
  • services: Service-oriented widgets
    • device_browser
    • bec_queue
    • bec_status_box
  • plots: Visualization widgets for data display
    • multi_waveform
    • motor_map
    • image
    • waveform
  • dap: Data analysis and processing widgets
    • dap_combo_box
    • lmfit_dialog
  • containers: Layout and grouping widgets
    • figure
    • dock
  • utility: Widgets for UI customization and auxiliary controls
    • spinner
    • toggle
    • visual
      • colormap_selector
      • colormap_widget
      • dark_mode_button
      • color_button

Folder Structure

widgets/
├── control/
│   ├── device_control/
│   │   ├── position_indicator/
│   │   ├── positioner_box/
│   │   └── positioner_group/
│   ├── buttons/
│   │   ├── stop_button/
│   │   ├── button_reset/
│   │   ├── button_resume/
│   │   └── button_abort/
│   ├── scan_control/
│   │   └── scan_group_box/
│   └── device_input/
│       ├── device_line_edit/
│       ├── base_classes/
│       ├── signal_line_edit/
│       ├── device_combobox/
│       └── signal_combobox/
├── services/
│   ├── device_browser/
│   ├── bec_queue/
│   └── bec_status_box/
├── plots/
│   ├── multi_waveform/
│   ├── motor_map/
│   │   └── motor_map_dialog/
│   ├── image/
│   └── waveform/
│       └── waveform_popups/
│           ├── dap_summary_dialog/
│           └── curve_dialog/
├── dap/
│   ├── dap_combo_box/
│   └── lmfit_dialog/
├── containers/
│   ├── figure/
│   │   └── plots/
│   │       ├── multi_waveform/
│   │       ├── motor_map/
│   │       ├── image/
│   │       └── waveform/
│   └── dock/
└── utility/
    ├── spinner/
    ├── toggle/
    └── visual/
        ├── colormap_selector/
        ├── colormap_widget/
        ├── dark_mode_button/
        └── color_button/

Additional Comments

I don't have a strong preference regarding folder names and am open to other suggestions.

Definition of Done

  • Documentation is up-to-date.
  • Imports have been verified.
Edited by wyzula_j

Merge request reports

Loading