Skip to content

Conversation

@multiplex55
Copy link
Owner

Motivation

  • Provide quick split operations in the dashboard editor to let users subdivide an existing slot horizontally or vertically.
  • Avoid label overlap in the preview by reducing visible text and surfacing full slot info via hover tooltips.
  • Ensure splits are safe by reusing existing validation and occupancy checks and rolling back on conflicts.
  • Make the preview more usable by increasing the rendered size of cells.

Description

  • Added a SplitDirection enum and two UI buttons Split H and Split V next to Collapse all, which call a new method split_selected_slot.
  • Implemented split_selected_slot to split the selected slot into two (top/left keeps existing widget/settings, the other half is a new slot created with SlotConfig::with_widget("weather_site", ...) so settings is initialized), compute half/half spans, and use clamp_slot, occupancy_map, and validate_slot to detect conflicts and roll back on error.
  • Increased preview cell size from 40px to 60px via cell_size and removed the full in-slot text in favor of per-slot hover tooltips using ui.interact(...).on_hover_text(...) that show id/widget and position/span.
  • Kept existing widget/state for the original slot, used the same default widget for the new slot, and surface warnings via blocked_warning when operations are invalid.

Testing

  • Ran cargo fmt to format changes, which completed successfully.
  • No unit/integration test suite was executed as part of this change.

Codex Task

@multiplex55 multiplex55 merged commit ad77978 into master Jan 9, 2026
1 check passed
@multiplex55 multiplex55 deleted the codex/add-split-buttons-in-dashboard-editor branch January 9, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants