Skip to content

Conversation

@Licini
Copy link
Collaborator

@Licini Licini commented Jul 4, 2025

UI Component System Refactoring

Overview

Complete restructuring of the compas_viewer UI architecture to implement a modern component-based system with improved modularity and maintainability.

Key Changes

New Component Architecture

  • Added Component base class with standardized widget attribute and update() method
  • Added BoundComponent class for components bound to object attributes with automatic value synchronization
  • All UI components now inherit from Base class for consistent structure

Component Refactoring

  • Replaced dialogs with integrated components: CameraSettingsDialogCameraSetting, ObjectSettingDialogObjectSetting
  • Enhanced existing components: Updated Slider, TextEdit, Button to use new inheritance model
  • Added new components: BooleanToggle, ColorPicker, NumberEdit, Container, Tabform
  • Removed deprecated components: ColorComboBox, ComboBox, DoubleEdit, LineEdit, LabelWidget

UI Structure Improvements

  • Moved components to dedicated components/ folder
  • Added MainWindow, StatusBar, ViewPort components
  • Refactored MenuBar, ToolBar, SideDock to use new component system
  • Updated UI class to use new component architecture

Technical Improvements

  • Standardized component initialization with obj, attr, action parameters
  • Improved data binding with automatic attribute synchronization
  • Enhanced container system with scrollable and splitter options
  • Updated event handling and signal connections

@Licini Licini mentioned this pull request Jul 8, 2025
@tomvanmele
Copy link
Member

@Licini perhaps for clarity it would make sense that everything that is a component actually lives inside components. this means that most of the files of ui can be moved and that ui.py itself becomes a top-level module...

@Licini Licini requested a review from tomvanmele July 16, 2025 15:40
@Licini Licini marked this pull request as ready for review July 16, 2025 15:40
@Licini Licini changed the title use composition for UI and a lot of clean up UI Component System Refactoring Jul 16, 2025
@Licini
Copy link
Collaborator Author

Licini commented Jul 16, 2025

@tomvanmele Ready to go! Maybe too much to review, we can also just merge and fix anything fast

@tomvanmele
Copy link
Member

i assume we have to do a major release because these are breaking changes?

@Licini
Copy link
Collaborator Author

Licini commented Jul 22, 2025

i assume we have to do a major release because these are breaking changes?

Yep, 2.0.0

@Licini Licini merged commit e6d61ce into main Jul 22, 2025
11 checks passed
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.

3 participants