Skip to content

FilmCraft: An open-source, nonlinear video editor written by scratch in pure Rust

Update docking docs and drop leftovers

aiongg7a8a2da2df7c
diff --git a/crates/ui-egui/README.md b/crates/ui-egui/README.md
index 2911aa3ed..98799841f 100644
--- a/crates/ui-egui/README.md
+++ b/crates/ui-egui/README.md
@@ -78,17 +78,23 @@ keeps Source navigation, markers and marked-range playback separate from Program
## Pane layout controls
-Dock transactions and pointer targets use `craft-ui::docking`; bounded split geometry and
-keyboard-accessible resize handles use `craft-ui::layout`. FilmCraft adapts its existing saved
-dock tree and panel identities to the shared model. Panel tabs or their header grip can move
-between tab groups, split at an edge, reorder, or float when released with Cmd/Ctrl; a release
-over no target cancels. Floating windows move by their title bar, resize from every edge and
-split like the main window. Every group, Tools and the Audio Meters included, resizes down to
-the same minimum and has no maximum. Timeline sequence
-tabs retain their sequence-opening, closing and horizontal reorder behavior; the header grip
-moves the Timeline panel. Workspace saves retain floating groups alongside the legacy layout
-JSON, and workspaces without floating data still load. Automation IDs and workspace commands
-remain the integration boundary.
+The panels use `craft-ui::docking` with its split-tree settings: craft-ui draws the frames, tab
+strips, floating windows and drag previews and owns the gestures; `dock_ui.rs` draws the panel
+bodies, the ≡ panel menu and the Timeline's sequence tabs. Bounded split geometry and
+keyboard-accessible resize handles use `craft-ui::layout`. Panel tabs or their group's drag bar
+move between tab groups, split at a group's or the window's edge, reorder, or float when released
+with Cmd/Ctrl; a release over no target cancels. Every group, Tools and the Audio Meters included,
+resizes down to the same minimum and has no maximum. Timeline sequence tabs retain their
+sequence-opening, closing and horizontal reorder behavior.
+
+On desktop each floating panel opens in its own OS window. These windows stay above other
+windows and hide while another application is active. A floating window moves by its title bar,
+resizes from every edge and splits like the main window. On Wayland, drops between windows can't
+be resolved, so a floating window docks back only through a command such as `window.dockPanel`.
+Where egui embeds viewports (tests), floating windows stay inside the main window.
+
+Named workspaces save the layout, floating windows included; workspaces saved in the earlier
+layout format still load. Automation IDs and workspace commands remain the integration boundary.
Tools and dock tabs expose their actual egui widget IDs, paint keyboard focus, and support
Tab/Shift-Tab traversal and Space/Enter activation. Control-injected keys can reach focused
diff --git a/crates/ui-egui/src/dock_ui.rs b/crates/ui-egui/src/dock_ui.rs
index 8f0d20343..73f0fb0c7 100644
--- a/crates/ui-egui/src/dock_ui.rs
+++ b/crates/ui-egui/src/dock_ui.rs
@@ -321,10 +321,8 @@ impl FilmcraftApp {
/// (the group's drag bar), `panel.tabs.more.<Panel>`, `panel.float.<n>.move` and `.resize`,
/// `dock.gutter.<path>` (`a`/`b` per split level), `dock.corner.<outer path>.<inner path>`
/// where two dividers meet, the same inside floating window `n` as `panel.float.<n>.gutter.…`
- /// and `panel.float.<n>.corner.…`, and `dock.gutter.group.<Panel>`, `.stack.<Panel>` and
- /// `.column.<Panel>` for the dividers below a group or accordion entry and beside a column,
- /// named by the panel they hold first. Controls of a floating window in its own OS window
- /// are registered in that window's viewport.
+ /// and `panel.float.<n>.corner.…`. Controls of a floating window in its own OS window are
+ /// registered in that window's viewport.
fn register_dock_hits(&mut self, hits: &[(Hit<PanelKind>, Rect)]) {
let window = |panel: &PanelKind| self.ui.dock.floating.iter().position(|window| window.contains(panel));
let native: HashMap<usize, egui::ViewportId> = self.auto.windows.iter().map(|(viewport, index)| (*index, *viewport)).collect();
@@ -355,9 +353,6 @@ impl FilmcraftApp {
None => continue,
},
Hit::Divider(Divider::Split(path)) => (format!("dock.gutter.{}", path_id(path)), "gutter"),
- Hit::Divider(Divider::Group(panel)) => (format!("dock.gutter.group.{}", panel.id()), "gutter"),
- Hit::Divider(Divider::Stack(panel)) => (format!("dock.gutter.stack.{}", panel.id()), "gutter"),
- Hit::Divider(Divider::Column(panel)) => (format!("dock.gutter.column.{}", panel.id()), "gutter"),
Hit::Divider(Divider::Intersection(outer, inner)) => (format!("dock.corner.{}.{}", path_id(outer), path_id(inner)), "gutter corner"),
Hit::Divider(Divider::WindowSplit(panel, path)) => match window(panel) {
Some(index) => (format!("panel.float.{index}.gutter.{}", path_id(path)), "gutter"),
diff --git a/crates/ui-egui/tests/it/monitor_geometry.rs b/crates/ui-egui/tests/it/monitor_geometry.rs
index 6ecaa81d4..0b6b355cf 100644
--- a/crates/ui-egui/tests/it/monitor_geometry.rs
+++ b/crates/ui-egui/tests/it/monitor_geometry.rs
@@ -6,7 +6,6 @@ use egui_kittest::kittest::{NodeT, Queryable};
use filmcraft_engine::Session;
use filmcraft_ui_egui::{
FilmcraftApp,
- dock::PanelKind,
panels::monitor::{self, Which},
theme::{self, ThemeKind},
};
@@ -24,12 +23,11 @@ fn harness_at_scale(width: f32, kind: ThemeKind, which: Which, scale: f32) -> Ha
move |ui, app: &mut FilmcraftApp| {
app.set_theme(ui.ctx(), kind);
app.auto.begin_frame();
- let panel = if which == Which::Source { PanelKind::Source } else { PanelKind::Program };
- // The panel frame as docking draws it: a tab strip over the themed panel background.
+ // A stand-in for the docked frame: the themed panel background, with the body below
+ // a tab strip's height.
let frame = ui.max_rect();
ui.painter().rect_filled(frame, 0.0, app.tokens.panel_bg);
let content = egui::Rect::from_min_max(egui::pos2(frame.min.x, frame.min.y + app.tokens.tab_h), frame.max);
- let _ = panel;
monitor::show(app, ui, content, which);
let source = filmcraft_ui_egui::panels::dragged_source(ui);
ui.ctx().data_mut(|data| data.insert_temp(egui::Id::new("observed-source-drag"), source));
diff --git a/docs/control-protocol.md b/docs/control-protocol.md
index e939f59d3..8e8cf301a 100644
--- a/docs/control-protocol.md
+++ b/docs/control-protocol.md
@@ -209,13 +209,12 @@ Time is in ticks (254 016 000 000 per second); commands also accept `seconds`, `
Invalid source/target identities and non-finite or out-of-range geometry return an error with
the layout unchanged. `ui.inspect.ui.dock.floating` reports floating windows and their
logical-point rectangles. `panel.drag.<Panel>` locates the drag bar of each panel's group;
-`panel.float.<index>.move` and `.resize` locate floating geometry handles; `dock.gutter.<path>`
+`panel.float.<index>.move`, `.resize` (bottom-right corner) and `.resize.<Edge>` locate floating
+geometry handles; `dock.gutter.<path>`
locates a split divider (`a`/`b` per split level), `dock.corner.<outer path>.<inner path>` the
four-way handle where two dividers meet, `panel.float.<index>.gutter.<path>` and
-`panel.float.<index>.corner.<outer path>.<inner path>` the same inside a floating window, and
-`dock.gutter.group.<Panel>`,
-`.stack.<Panel>` and `.column.<Panel>` the dividers below a group or accordion entry and beside a
-column, named by the panel they hold first; `ui.docking` lists every docking gesture source. Named workspace saves include floating windows.
+`panel.float.<index>.corner.<outer path>.<inner path>` the same inside a floating window;
+`ui.docking` lists every docking gesture source. Named workspace saves include floating windows.
The panels use craft-ui's shared docking with its split-tree settings. Its control commands
(`window.panel.move`, `.float`, `.dock`, `.activate`, `.close`, `.closeGroup`, `.closeOthers`,