@thatopen/ui to organize and display information in the application interface. Panels are integrated into the left sidebar using a tabbed layout.
Panel Architecture
Panels are created usingBUI.Component.create<BUI.Panel>() and structured with <bim-panel-section> elements. Each panel section can contain tables, forms, buttons, and other UI components.
Integration in main.ts
Project Information Panel
Source:src/components/Panels/ProjectInformation.ts
Displays loaded BIM models and provides AI/Chart analysis tools.
Structure
Features
- Models List Table: Displays all loaded IFC models with management controls
- Relations Tree: Shows IFC spatial structure with filtering capabilities (
preserveStructureOnFilter: true) - AI Integration: Modal interface for AI-powered analysis (ChatGPT integration)
- Chart Visualization: Data visualization tools for BIM analytics
Components Used
CUI.tables.modelsList()- Pre-built table for model managementCUI.tables.relationsTree()- IFC spatial hierarchy treeModalDataUI()- Custom AI chat interfaceChartUI()- Custom charting component
Selection Panel (Element Data)
Source:src/components/Panels/Selection.ts
Displays properties and attributes of selected BIM elements. Dynamically appears when elements are selected.
Structure
Dynamic Behavior
The panel automatically shows/hides based on selection state:Features
- Properties Table: Displays all IFC properties of selected elements
- Search Functionality: Filter properties with 200ms debounce
- Expand/Collapse: Toggle full property tree expansion
- Export: Download element data as TSV format
- Auto-cleanup: Clears on fragment disposal
Integration
The panel is rendered in the viewport grid’s “second” layout:Settings Panel
Source:src/components/Panels/Settings.ts
Provides application configuration options including theme selection and world settings.
Structure
Theme Management
Features
- Theme Selector: System, Dark, or Light mode with persistent UI classes
- Worlds Configuration: Table displaying all 3D world settings
- Search Worlds: Filter world configuration options
- Expand/Collapse: Toggle world settings table expansion
Components Used
<bim-selector>- Radio button group for theme selectionCUI.tables.worldsConfiguration()- Pre-built worlds config table<bim-text-input>- Debounced search input (200ms)
Help Panel
Source:src/components/Panels/Help.ts
Provides links to That Open Company community and educational resources.
Structure
Features
- Static Content: Fixed panel sections with informational content
- External Links: Opens That Open Company resources in new windows
- Community Resources: Link to That Open People community
- Educational Programs: Links to Master course and Get The Code membership
Design Notes
- Uses
fixedattribute on panel sections for consistent layout white-space: normalon labels allows text wrapping- Each section includes descriptive icon and call-to-action button
Panel Common Patterns
Panel Section Structure
Search Pattern
Most panels implement debounced search:Table Expansion Pattern
Best Practices
- Preserve Structure: Set
preserveStructureOnFilter = trueon tables to maintain hierarchy during search - Debouncing: Use 200ms debounce on search inputs to avoid excessive filtering
- Event Cleanup: Remove event listeners when panels are disposed
- Responsive Layout: Use flex containers with gap spacing for consistent UI
- Icon Consistency: Use semantic icons that match panel function
See Also
- Toolbar Components - Action-based toolbar UI
- Viewport System - Layout integration and grid management
- AppManager - Global application state and grid management