First rudimentary implementation of the visor logic#108
Conversation
There was a problem hiding this comment.
Pull request overview
This PR implements rudimentary visor launcher functionality for the desktop system. A visor is a launcher mode where multiple instances are laid out horizontally, centered within a fixed-size panel, and positioned forward in 3D space (using a z-offset). The implementation adds a new LauncherMode enum with Band and Visor variants, updates layout logic to handle visor-specific centering and sizing, and introduces z-offset calculation for instances based on their parent launcher's mode.
Changes:
- Added
LauncherModeenum withBandandVisorvariants to distinguish launcher behavior - Updated layout algorithm to center visor launcher children horizontally with fixed panel sizing
- Implemented z-offset logic to position visor instances forward in 3D space (when multiple instances exist)
- Added
group()method toOrderedHierarchyfor retrieving sibling nodes, supporting visor layout calculations
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| desktop/src/projects/configuration/types.rs | Added LauncherMode enum and mode field to LaunchProfile |
| desktop/src/projects/mod.rs | Set default profile mode to Visor in ProjectConfiguration::default() |
| desktop/src/projects/launcher_presenter.rs | Added mode field and getter to LauncherPresenter |
| desktop/src/projects/configuration/toml_reader.rs | Hardcoded mode to Visor when loading profiles from TOML |
| desktop/src/instance_presenter.rs | Added z_offset parameter to set_rect for 3D positioning |
| desktop/src/desktop_system.rs | Implemented visor-specific layout logic (centering, z-offset) and refactored layout algorithm |
| desktop/src/aggregates/ordered_hierarchy.rs | Added group() method to retrieve sibling nodes with tests |
| desktop/src/desktop.rs | Set primary launcher mode to Band in desktop_groups() |
| .github/copilot-instructions.md | Added conventions about multiple exit points and enum import style |
| Ok(LaunchProfile { name, params, tags }) | ||
| Ok(LaunchProfile { | ||
| name, | ||
| mode: LauncherMode::Visor, |
There was a problem hiding this comment.
The mode is hardcoded to LauncherMode::Visor for all profiles loaded from TOML configuration files. This means users cannot configure the launcher mode through TOML. Consider adding a "mode" field to the TOML parser that defaults to Visor if not specified, allowing users to explicitly set the mode in their configuration files.
A start, but needs a proper Z buffer