|
| 1 | +# UI Component System Refactoring |
| 2 | + |
| 3 | +## Overview |
| 4 | +Complete restructuring of the compas_viewer UI architecture to implement a modern component-based system with improved modularity and maintainability. |
| 5 | + |
| 6 | +## Key Changes |
| 7 | + |
| 8 | +### New Component Architecture |
| 9 | +- Added `Component` base class with standardized `widget` attribute and `update()` method |
| 10 | +- Added `BoundComponent` class for components bound to object attributes with automatic value synchronization |
| 11 | +- All UI components now inherit from `Base` class for consistent structure |
| 12 | + |
| 13 | +### Component Refactoring |
| 14 | +- **Replaced dialogs with integrated components**: `CameraSettingsDialog` → `CameraSetting`, `ObjectSettingDialog` → `ObjectSetting` |
| 15 | +- **Enhanced existing components**: Updated `Slider`, `TextEdit`, `Button` to use new inheritance model |
| 16 | +- **Added new components**: `BooleanToggle`, `ColorPicker`, `NumberEdit`, `Container`, `Tabform` |
| 17 | +- **Removed deprecated components**: `ColorComboBox`, `ComboBox`, `DoubleEdit`, `LineEdit`, `LabelWidget` |
| 18 | + |
| 19 | +### UI Structure Improvements |
| 20 | +- Moved components to dedicated `components/` folder |
| 21 | +- Added `MainWindow`, `StatusBar`, `ViewPort` components |
| 22 | +- Refactored `MenuBar`, `ToolBar`, `SideDock` to use new component system |
| 23 | +- Updated `UI` class to use new component architecture |
| 24 | + |
| 25 | +### Technical Improvements |
| 26 | +- Standardized component initialization with `obj`, `attr`, `action` parameters |
| 27 | +- Improved data binding with automatic attribute synchronization |
| 28 | +- Enhanced container system with scrollable and splitter options |
| 29 | +- Updated event handling and signal connections |
| 30 | + |
| 31 | +## Impact |
| 32 | +This refactoring provides a cleaner, more maintainable codebase with better separation of concerns and improved extensibility for future UI development. |
0 commit comments