Commit Graph
132 Commits
Author SHA1 Message Date
bflatastic 03ef0d0817 Merge remote-tracking branch 'origin/next' into sync/next
# Conflicts:
#	crates/automation/Cargo.toml
#	crates/automation/src/client.rs
#	crates/automation/src/control.rs
#	crates/automation/src/screenshot.rs
#	crates/automation/src/synthetic.rs
#	crates/automation/tests/it/main.rs
#	crates/automation/tests/it/synthetic.rs
#	crates/color-ui/src/palette.rs
#	crates/color-ui/src/ui/area.rs
#	crates/color-ui/src/ui/disc/stories.rs
#	crates/color-ui/src/ui/mod.rs
#	crates/color-ui/src/ui/paint_chip.rs
#	crates/color-ui/src/ui/pair/stories.rs
#	crates/color-ui/src/ui/palette/stories.rs
#	crates/color-ui/src/ui/panel.rs
#	crates/color-ui/src/ui/picker/stories.rs
#	crates/color-ui/src/ui/picker_dialog.rs
#	crates/color-ui/src/ui/swatches/library.rs
#	crates/color-ui/src/ui/swatches/panel.rs
#	crates/color-ui/src/ui/swatches/stories.rs
#	crates/color-ui/src/ui/wheel/stories.rs
#	crates/color-ui/tests/it/main.rs
#	crates/color-ui/tests/it/panels.rs
#	crates/color-ui/tests/it/picker.rs
#	crates/dialogs/src/lib.rs
#	crates/dialogs/src/native.rs
#	crates/dialogs/src/portal.rs
#	crates/dialogs/src/service.rs
#	crates/draw/src/ui/brush_presets/panel.rs
#	crates/draw/src/ui/brush_presets/picker.rs
#	crates/draw/src/ui/brush_presets/stories.rs
#	crates/draw/src/ui/gradient/palette/mod.rs
#	crates/draw/src/ui/pattern/editor.rs
#	crates/draw/src/ui/pen/stories.rs
#	crates/draw/src/ui/transform/mod.rs
#	crates/draw/src/ui/transform/transform_box.rs
#	crates/draw/src/ui/transform/transform_box/stories.rs
#	crates/draw/src/ui/transform/transform_fields.rs
#	crates/draw/tests/it/brush_presets.rs
#	crates/draw/tests/it/main.rs
#	crates/draw/tests/it/transform_box.rs
#	crates/font-manager/src/axes.rs
#	crates/font-manager/src/picker.rs
#	crates/font-manager/src/picker/rows.rs
#	crates/font-manager/src/picker/stories.rs
#	crates/font-manager/tests/it/main.rs
#	crates/font-manager/tests/it/picker.rs
#	crates/host/src/files.rs
#	crates/i18n/src/lib.rs
#	crates/imaging/src/ui/layer_style/styles.rs
#	crates/keymap/src/keymap.rs
#	crates/keymap/src/matcher.rs
#	crates/layers/src/ui/filter/mod.rs
#	crates/layers/src/ui/filter/stories.rs
#	crates/layers/src/ui/mock.rs
#	crates/layers/src/ui/panel/mod.rs
#	crates/layers/src/ui/panel/stories.rs
#	crates/layers/src/ui/tree.rs
#	crates/layers/tests/it/panel_drag_menu.rs
#	crates/layers/tests/it/panel_filter.rs
#	crates/menu/src/bar.rs
#	crates/menu/src/driver.rs
#	crates/menu/src/model.rs
#	crates/menu/src/shortcuts/pages.rs
#	crates/menu/src/shortcuts/state.rs
#	crates/menu/src/shortcuts/stories.rs
#	crates/menu/src/shortcuts/view.rs
#	crates/menu/tests/it/main.rs
#	crates/menu/tests/it/native.rs
#	crates/menu/tests/it/shortcuts/mod.rs
#	crates/pages/src/ui/mod.rs
#	crates/pages/src/ui/view.rs
#	crates/platform/README.md
#	crates/platform/src/clipboard_tests.rs
#	crates/platform/src/open.rs
#	crates/print/src/ui/stories.rs
#	crates/text/src/ui/character.rs
#	crates/text/src/ui/character/stories.rs
#	crates/text/src/ui/find.rs
#	crates/text/src/ui/find/dialog.rs
#	crates/text/src/ui/find/stories.rs
#	crates/text/src/ui/ruler.rs
#	crates/text/src/ui/ruler/paint.rs
#	crates/text/src/ui/ruler/run.rs
#	crates/text/tests/it/main.rs
#	crates/text/tests/it/ruler.rs
#	crates/ui-canvas/src/canvas/mod.rs
#	crates/ui-canvas/src/canvas/tool.rs
#	crates/ui-canvas/src/canvas/tool_host.rs
#	crates/ui-canvas/src/canvas_controls/grid/mod.rs
#	crates/ui-canvas/src/canvas_controls/grid/stories.rs
#	crates/ui-canvas/src/canvas_controls/guides/stories.rs
#	crates/ui-canvas/src/canvas_controls/task_bar.rs
#	crates/ui-canvas/src/canvas_controls/task_bar/stories.rs
#	crates/ui-canvas/tests/it/canvas/navigate.rs
#	crates/ui-canvas/tests/it/canvas/rulers.rs
#	crates/ui-canvas/tests/it/canvas/tool.rs
#	crates/ui-canvas/tests/it/canvas_controls/grid.rs
#	crates/ui-contract/src/contract/body/presses.rs
#	crates/ui-contract/src/contract/items/drag.rs
#	crates/ui-contract/src/contract/items/hooks.rs
#	crates/ui-contract/src/contract/items/lead.rs
#	crates/ui-contract/src/contract/overlay/placement.rs
#	crates/ui-contract/src/contract/overlay/props.rs
#	crates/ui-contract/src/contract/overlay/ui.rs
#	crates/ui-contract/src/contract/steps/label.rs
#	crates/ui-contract/src/contract/text.rs
#	crates/ui-contract/src/contract/tooltip.rs
#	crates/ui-contract/src/layout/body.rs
#	crates/ui-contract/src/primitives/draw.rs
#	crates/ui-contract/src/primitives/icon.rs
#	crates/ui-contract/src/primitives/mod.rs
#	crates/ui-contract/src/primitives/textures/thumbnails.rs
#	crates/ui-contract/src/runtime/commands/board.rs
#	crates/ui-contract/src/runtime/commands/mod.rs
#	crates/ui-contract/src/runtime/drag.rs
#	crates/ui-contract/src/runtime/egui/input.rs
#	crates/ui-contract/src/runtime/egui/plugin.rs
#	crates/ui-contract/src/runtime/frame.rs
#	crates/ui-contract/src/runtime/keys.rs
#	crates/ui-contract/src/runtime/keys/input.rs
#	crates/ui-contract/src/runtime/keys/route.rs
#	crates/ui-contract/src/runtime/pointer.rs
#	crates/ui-contract/src/runtime/wheel.rs
#	crates/ui-contract/src/runtime/windows.rs
#	crates/ui-contract/src/runtime/windows/viewport.rs
#	crates/ui-contract/src/style/cx.rs
#	crates/ui-contract/src/style/span.rs
#	crates/ui-contract/src/testing/access.rs
#	crates/ui-contract/src/testing/icon_trials.rs
#	crates/ui-contract/tests/it/body/mod.rs
#	crates/ui-contract/tests/it/runtime/mod.rs
#	crates/ui-contract/tests/it/runtime/wheel.rs
#	crates/ui-contract/tests/it/runtime/windows.rs
#	crates/ui-contract/tests/it/text/editor.rs
#	crates/ui-gallery/src/mock/panels.rs
#	crates/ui-panels/src/dialog/mod.rs
#	crates/ui-panels/src/docking/group.rs
#	crates/ui-panels/src/rails/drawer/stories.rs
#	crates/ui-panels/src/rails/tool.rs
#	crates/ui-panels/src/rails/tool/stories.rs
#	crates/ui-panels/src/rails/tool/trials.rs
#	crates/ui-panels/src/sections/footer.rs
#	crates/ui-panels/tests/it/dialogs.rs
#	crates/ui-patterns/src/patterns/dock/hide.rs
#	crates/ui-patterns/src/patterns/dock/panes.rs
#	crates/ui-patterns/src/patterns/form_dialogs/dialog.rs
#	crates/ui-patterns/src/patterns/form_dialogs/dialog/stories.rs
#	crates/ui-patterns/src/patterns/form_dialogs/list_manager.rs
#	crates/ui-patterns/src/patterns/form_dialogs/list_manager/stories.rs
#	crates/ui-patterns/src/patterns/form_dialogs/mod.rs
#	crates/ui-patterns/src/patterns/form_dialogs/new_document.rs
#	crates/ui-patterns/src/patterns/form_dialogs/new_document/cards.rs
#	crates/ui-patterns/src/patterns/form_dialogs/new_document/details.rs
#	crates/ui-patterns/src/patterns/form_dialogs/param.rs
#	crates/ui-patterns/src/patterns/form_dialogs/pdf_export.rs
#	crates/ui-patterns/src/patterns/form_dialogs/pdf_export/stories.rs
#	crates/ui-patterns/src/patterns/form_dialogs/report.rs
#	crates/ui-patterns/src/patterns/form_dialogs/report/stories.rs
#	crates/ui-patterns/src/patterns/form_dialogs/rows.rs
#	crates/ui-patterns/src/patterns/form_dialogs/save_for_web.rs
#	crates/ui-patterns/src/patterns/form_dialogs/save_for_web/hosted.rs
#	crates/ui-patterns/src/patterns/form_dialogs/save_for_web/model.rs
#	crates/ui-patterns/src/patterns/form_dialogs/save_for_web/options.rs
#	crates/ui-patterns/src/patterns/form_dialogs/save_for_web/stories.rs
#	crates/ui-patterns/src/patterns/panels/palette.rs
#	crates/ui-patterns/src/patterns/panels/palette/stories.rs
#	crates/ui-patterns/src/patterns/preferences/document/model.rs
#	crates/ui-patterns/src/patterns/preferences/page.rs
#	crates/ui-patterns/src/patterns/preferences/window.rs
#	crates/ui-patterns/src/patterns/preferences/window/stories.rs
#	crates/ui-patterns/src/patterns/presets/browser.rs
#	crates/ui-patterns/src/patterns/presets/browser/stories.rs
#	crates/ui-patterns/src/patterns/presets/manager.rs
#	crates/ui-patterns/src/patterns/presets/mod.rs
#	crates/ui-patterns/src/patterns/presets/named.rs
#	crates/ui-patterns/src/patterns/presets/picker.rs
#	crates/ui-patterns/tests/it/docking/drop_session.rs
#	crates/ui-patterns/tests/it/docking/native.rs
#	crates/ui-patterns/tests/it/form_dialogs/hosted.rs
#	crates/ui-patterns/tests/it/form_dialogs/list_manager.rs
#	crates/ui-patterns/tests/it/form_dialogs/mod.rs
#	crates/ui-patterns/tests/it/form_dialogs/params.rs
#	crates/ui-patterns/tests/it/form_dialogs/save_for_web.rs
#	crates/ui-patterns/tests/it/panels/palette.rs
#	crates/ui-patterns/tests/it/presets/browser.rs
#	crates/ui-shell/src/shell/app_shell.rs
#	crates/ui-shell/src/shell/app_shell/stories.rs
#	crates/ui-shell/src/shell/mod.rs
#	crates/ui-shell/src/shell/start.rs
#	crates/ui-shell/src/shell/start/stories.rs
#	crates/ui-shell/tests/it/commands/mod.rs
#	crates/ui-shell/tests/it/shell/app_shell.rs
#	crates/ui-shell/tests/it/shell/mod.rs
#	crates/ui-widgets/src/bars/bar.rs
#	crates/ui-widgets/src/buttons/button.rs
#	crates/ui-widgets/src/buttons/face.rs
#	crates/ui-widgets/src/buttons/mod.rs
#	crates/ui-widgets/src/buttons/stories.rs
#	crates/ui-widgets/src/choice/mod.rs
#	crates/ui-widgets/src/choice/swatch.rs
#	crates/ui-widgets/src/choice/swatch/stories.rs
#	crates/ui-widgets/src/choice/swatch_table.rs
#	crates/ui-widgets/src/choice/swatch_table/stories.rs
#	crates/ui-widgets/src/display/text.rs
#	crates/ui-widgets/src/list/row.rs
#	crates/ui-widgets/src/list/row/paint.rs
#	crates/ui-widgets/src/list/stories.rs
#	crates/ui-widgets/src/list/view_stories.rs
#	crates/ui-widgets/src/menu/bar.rs
#	crates/ui-widgets/src/menu/item.rs
#	crates/ui-widgets/src/menu/search.rs
#	crates/ui-widgets/src/menu/stories.rs
#	crates/ui-widgets/src/pickers/mod.rs
#	crates/ui-widgets/src/pickers/reference_point.rs
#	crates/ui-widgets/src/pickers/reference_point/stories.rs
#	crates/ui-widgets/src/tabs/strip.rs
#	crates/ui-widgets/src/text/number.rs
#	crates/ui-widgets/src/text/number/stories.rs
#	crates/ui-widgets/src/tile_grid/grid.rs
#	crates/ui-widgets/tests/it/buttons.rs
#	crates/ui-widgets/tests/it/label/mod.rs
#	crates/ui-widgets/tests/it/label/tooltip.rs
#	crates/ui-widgets/tests/it/main.rs
#	crates/ui-widgets/tests/it/menu/bar.rs
#	crates/ui-widgets/tests/it/menu/mod.rs
#	crates/ui-widgets/tests/it/menu/rows.rs
#	crates/ui-widgets/tests/it/menu/search.rs
#	crates/ui-widgets/tests/it/pickers/select_list.rs
#	crates/ui-widgets/tests/it/text/mod.rs
2026-11-22 01:16:36 +07:00
bflatastic 3846cbbaac chrome-w2: net change of 2 commits
- chrome-w2: written from its sheet
- chrome-w2: repair 1
2026-11-21 21:26:38 +07:00
aiongg 161d2c0a42 Merge storytold next into rework-windows 2026-11-21 03:59:28 +00:00
aiongg d73c1c337f A dock window whose groups are all minimized shrinks to its strips
The window's column takes one held-height state shared with the collapsed
column: WindowColumn::held is the content height, and collapsed the strip's
own width. A column whose every group is minimized shows at its rect's place
and width with the title row and strips' height (DockSizes::minimized_height);
its sides resize the width, and WindowColumn::kept keeps the rect's height, so
an OS window's recorded placement and an in-app window's rect keep the
expanded size and a restore gives it back. Stepped columns keep fitting their
content, which already measures minimized groups as strips.

Fixes storytold/photocraft#15862.
2026-11-21 02:14:51 +00:00
aiongg d202ab2fec Merge remote-tracking branch 'upstream/next' into memo-stack
# Conflicts:
#	crates/ui-contract/src/testing/mod.rs
#	crates/ui-panels/src/docking/targets.rs
#	crates/ui-patterns/tests/it/docking/floating_area.rs
2026-11-20 23:37:01 +00:00
aiongg ddd2e23f89 Collapsed floating windows resize their width
A collapsed dock window's sides resize its width, and only its width, within the bounds of a docked collapsed column
(DockSizes::iconic_bounds, the one rule both use), on macOS by AppKit and elsewhere by the window's own grips.
FloatingGroupOutput::collapsed_width reports the width, which the area keeps as the column's iconic width through the
docked column's own path (Action::ResizeIconic); names show from IconicSizes::labels as in a docked column. The height
stays the icons', the expanded rect keeps its size and the window keeps its edge. The column in a window has no
inner-edge divider: the window's sides size it, as for an expanded column.
2026-11-20 19:45:04 +00:00
aiongg d1386328c2 Dock on Derived: one rail-grid conversion, window ids never reused, docs
- A panel's grid is read only through DockSizes::stepped, in the dock's own sizes, so
  DockGrid::rail is converted in one place; ToolRail counts its columns in its scope's
  style (DockSizes::of_scope), and ToolRail::dock_grid is gone.
- A layout's window counter starts above every id it is built or loaded with; a dock
  area raises a workspace an undo brings back above every id it has shown
  (Workspace::raise_window_floor). A saved u64::MAX id loads without overflow.
- Floating::id and DockArea::new docs say how ids are given and why to keep one Arc.

Part of #2336.
2026-11-20 18:16:52 +00:00
aiongg 42739aaa2d Dock on Derived: tracked panel specs, workspace revisions, layout-owned window ids
- `Workspace` fields are private. `revision()` moves with every write (a clone is a
  new source); `generation()` moves only on `replace` and ends drags as the old
  revision did. A trial walks every `&mut self` method, read from the source.
- Panel specs and permissions leave `DockPanels` for `PanelSpecs`, a plain-data model
  the host keeps in a `Tracked`. `DockArea` binds `Arc<Workspace>` and derives specs,
  permissions and keys from the workspace revision, the specs revision and the lock:
  an idle pass reads no spec, read-only docks included.
- `DockGrid::rail(cells)` is sized by the dock from its own tokens.
- Floating window ids come from a counter the layout owns; `replace` gives incoming
  windows ids the replaced layout never gave out. The dock's global id counter and its
  `no-global-state` allowlist entry are gone.

Part of #2336.
2026-11-20 18:16:52 +00:00
aiongg b35a0faee0 Floating windows: production's bar height, grips and AppKit resize
- The floating window's title row is one text row high (HeaderStrength::Bar, size.row.text: 18 pt compact), as
  production's 18 pt bar; the tab strip below keeps the panel header height.
- A resizable or movable layer with a header keeps its top grip's band (contract::grip_band, size.handle.sm) clear
  above the header, so the top grip never lies over it; the regions start below the band or the padding, whichever
  is deeper. Dialogs keep their layout (their padding is deeper than the band).
- Grips lie inside the frame for layers too; corners reach twice the edge width along each edge (12 pt), top corners
  of a banded layer only the band's height.
- Where the OS resizes a window from its own frame (macOS Inset, resizable: windows::os_resizes) no app grips stand,
  the cursor over AppKit's resize areas is the default (craft_window::mac::in_resize_area) and the move band keeps
  the arrow, as an OS title bar does.
- DockSizes::window_chrome (title row plus the band in the app window) sizes floating windows, stepped resizes,
  collapsed windows and float previews (FloatSpace::chrome).
2026-11-20 16:57:13 +00:00
aiongg 0238e191e3 Native dock windows: the mount carries that the app moves the window (Overlay::moved_by_app), so its first pass knows it before the Windows hit test is routed 2026-11-17 18:10:29 +00:00
aiongg c5a2c52386 Dock UI: a collapsed floating window's title row is its column's bar alone, the band and the double arrow; its menu opens from the band 2026-11-17 05:24:12 +00:00
aiongg 1536ecd9c2 Dock: Shift+Tab keeps the panels the host's Except names, docked and floating; Dock Panel joins the first group that takes the unit; one title row height for floating windows
- hide::shown reads ShellCx::panels_hidden: the host's Except stays, any other hide hides every panel; a hidden
  dock (Tab) hides every panel. The columns no longer skip themselves on the shell's dock visibility.
- DockTo::Docked tries the dock columns' groups, then the docked tree's, as tabs, and takes the first the model
  takes under the permissions (drop::takes), so a toolbar's group is passed over.
- DockSizes::title_row is FloatingGroup's title row height; the window commands' source, stepped window heights
  and FloatSpace::title_row use it.
- Trials: hidden.rs, dock_back.rs, and the window group under the area's title row in floating_area.rs.
2026-11-17 04:26:50 +00:00
aiongg a4d5004009 Dock: a floating window keeps the edge its collapsed strip was dropped near; icons float collapsed under the pointer; top grips keep the bottom edge; a column that cannot collapse offers no collapse 2026-11-17 04:15:48 +00:00
aiongg 2f35c5be59 Dock UI: a stepped column's double arrow is named for the steps it switches to; a floating stepped window's left grip keeps its right edge 2026-11-17 04:03:22 +00:00
aiongg 4baf9d937b Docking docs: icon drop spots, flyout side, stepped columns, flyouts from the Window menu 2026-11-17 03:50:46 +00:00
aiongg aa46612ac9 Dock area: a floating window draws its one column as a dock column does
Pass::column shows a column, docked or floating: an IconicColumn while it is
collapsed, else a DockColumn, with what the user did turned into actions in
column_work. Each dock column calls it with its own bar; each floating window
calls it inside a FloatingGroup with ColumnBar::Window, the title row being
the column's bar: its double arrow sets the column iconic, and a collapsed
window shows its icons at their size against the float area's nearer edge.
The window's split tree, its split resizes and its minimized toggle are gone.
Trial: the double arrow collapses a floating window's column and expands it,
the window keeping its rect.
2026-11-17 03:28:18 +00:00
aiongg 1d8c7d13a2 Merge branch 'fw/mac1-bars' into fw/mac1
# Conflicts:
#	crates/ui-contract/src/contract/body/hooks.rs
#	crates/ui-shell/src/shell/app_shell.rs
#	crates/ui-shell/tests/it/shell/app_shell.rs
2026-11-16 16:25:37 +00:00
aiongg b32bb77e61 Dock area: a document panel's body is shown edge to edge, without the panel inset 2026-11-16 16:14:25 +00:00
aiongg 88df0b40ee Dock area: every docked body fills its group inset by the panel padding 2026-11-16 16:10:57 +00:00
aiongg e86e041e13 Dock area: a group view lays out in a Ui held to its group's rect and clipped to it 2026-11-16 16:00:29 +00:00
aiongg dbeb743fab Dock column: the last open group fills; groups asking for a fill no longer share 2026-11-16 15:52:27 +00:00
aiongg e0b9e97529 panels-w14: net change of 3 commits
- panels-w14: written by an agent
- panels-w14: finished by an agent
- panels-w14: review fixes (review-1)
2026-11-15 09:18:07 +00:00
aiongg 353579afd3 Docking: a new float opens at a height fitted to its content
A panel or group floated out of the dock opens at its docked width and at
the height its group measures at in a floating window's room, at most
size.float.height. Content that fills its body opens at that height.

- Proposal::Size measures a component as it is shown at a rect of that
  size, with no share of the parent body's room.
- drag::amend lets a host change a drag's payload in the frame the drag
  started. The dock area measures the dragged panel there and puts the
  size on PanelDrag::source / GroupDrag::source. The Float command and a
  tab torn out of the window measure where they run.
- DockGroupOutput::drag_started also reports tab drags.
- FloatSpace::size_of caps a panel's, group's or column's height at the
  default float height. FloatSpace::record and its contents are gone.
2026-11-12 14:32:39 +00:00
aiongg 264ad8cc53 Native windows: the macOS title-row move starts on the press
The tracked macOS move sent StartMove a pass after the pointer passed the
click distance. winit hands performWindowDragWithEvent the event AppKit is
handling when the command runs, and in that later pass it is often not the
press, or none, so the drag took only some of the time.

- StartMove goes out in the band's Down pass where the OS tracks moves. The
  move is reported (Begin, Update, Commit) once the system pointer has passed
  the click distance; a click on the row moves and docks nothing.
- A window whose move the app runs keeps AppKit's own movable flag: the band
  writes nothing for it and the end hook leaves it alone. AppKit moves such a
  window for the hand-off and resizes it from its edges only while it is
  movable.
2026-11-12 14:32:39 +00:00
aiongg c19abe8663 Dock a native window by dragging its title row
A floating dock group in its own OS window now moves through a window move
gesture the app runs, which reports Begin, Update, Commit and Cancel like a
layer's move, so the dock marks the target under the pointer and docks the
whole window on release.

- macOS (Caps::OS_MOVES_TRACKED): the OS moves the window (StartMove), and the
  app follows the system pointer, button and Cmd through SystemWindows, the
  running platform's WindowSystem in craft-window. The hand-off ends when the
  system reports the button up.
- X11 and Windows: the app moves the window with SetOuterPosition so the
  pressed point stays under the pointer; Escape puts it back.
- A drag started by a container shown in its own OS window follows that
  window's pointer, not its parent's.
- The runtime's end hook sets NSWindow.movable for every window; a window
  whose move the app runs is never moved by AppKit from its band.
2026-11-12 14:32:39 +00:00
aiongg 31948854ad A native dock window's own title row is its only title bar
A tool window's frame comes from policy::tool_frame, whatever frame the main
window has: Inset with the traffic lights hidden on macOS, undecorated with no
caption buttons elsewhere. The installed decision applies to the other kinds.
2026-11-12 14:32:39 +00:00
aiongg 0799bc7588 Open floating dock windows as OS windows where the host reports window positions
DockConfig::native_windows is on by default. A float opens native where the
window host opens OS windows and reports their positions (ShellInfo::window_positions,
WindowHost::positions_reported: not on Wayland); a float never shown native opens
over its place in the main window. AppSpec::new takes the backend winit opens on.

The OS close of a native float is its Close action, taken when every panel in the
window may close; the group's open state belongs to the dock model. The gallery's
mock editor keeps its floats inside its preview.
2026-11-12 14:32:39 +00:00
aiongg e2ae0d10ea docs(dialogs, docking, themes): name the library crate behind each craft_ui module 2026-11-12 14:32:39 +00:00
aiongg 3a0736c569 Docs: the framework, development workflow, design notes and migration records 2026-11-12 14:32:38 +00:00
Zinadin ZidanandClaude Opus 5.5 9f68b84897 docs(docking): a label left with a digit keeps its text, not only one with a letter (#410)
A blank name falls back to the default label only when no letter or
digit is left ("{name} 2" gives "2"); the docs and the rustdoc of
labels::named said a letter. A test pins both cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 17:59:40 +06:00
Zinadin ZidanandClaude Opus 5.5 0f2ad92204 docs(docking): a group drawn without a drag bar is moved by its border band (#410)
The accessibility section said a group's top border band is never
announced. Where no drag bar is drawn the band is the group's one move
handle and has the node.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 17:35:37 +06:00
Zinadin ZidanandClaude Opus 5.5 b4bd8e6f70 docking: each move handle has one name, after what it moves (#410)
A group's drag bar and its top border band were both buttons with
move_group_label, so a screen reader heard every group twice, and every
group and column bar had the same name. The band, which only drags, is
now out of the accessibility tree and keyboard focus (unless no bar is
drawn), and a `{name}` in move_group_label or move_column_label stands
for what the handle moves: the logical label of the panel the group
shows, or the titled panels a column's groups show, joined by ", ". A
blank title leaves the placeholder out with the brackets, quotes or
separator around it. Labels without it, today's defaults included, are
used unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 12:44:01 +06:00
aiongg bd97cb760c craft-ui: iconic flyouts stay open by default (#384) 2026-10-27 01:49:01 -04:00
aiongg 4db3dd0117 Merge commit '819fd27f002439df60c2892715bfa322b2e566ea' into docking-native-ime 2026-10-26 03:15:20 +00:00
aiongg 512b54355c docking: apps can draw extra tabs after a group's panel tabs (#356)
DockContent::group_extra_tabs_width and group_extra_tabs draw host tabs
right after a group's panel tabs, before the drag bar and the header.
They fit with the panel tabs as one more tab that never overflows: both
shrink widest first to min_tab_width, and in a narrower row the panel
tabs overflow while the extra tabs keep that width.
2026-10-25 23:12:14 -04:00
aiongg 28f4036f3b docking: native floating windows publish their IME descriptor
A native floating window is an egui pass of its own, and can draw several
panel bodies. A Composer drawn there records its descriptor, and the dock
area publishes it once, after the window's last body, so a body drawn after
the editor's cannot clear it and end the composition. DockContent::window_drawn
runs at the same point for apps that publish their own descriptor.
2026-10-26 02:21:16 +00:00
aiongg f85b11b8e4 docking: AppKit moves a native window for its bar drag on macOS (#341)
* docking: AppKit moves a native window for its bar drag on macOS

Moving a native window with OuterPosition every frame jitters on macOS:
the window's reported place and the pointer events disagree about where
the window is. On macOS the bar press (or the start of a drag of a
window's only tab or group) now sends ViewportCommand::StartDrag, which
winit turns into performWindowDragWithEvent, and the dock area sends no
OuterPosition for that drag.

egui keeps running frames during the move, but the window's reported
place lags it, so each frame takes the window's place as AppKit's
cursor (NSEvent::mouseLocation) less the pressed point. Drop targets,
the drag fade, cross-window routing and the drop use that point. The
drag ends on the first frame where NSEvent::pressedMouseButtons or egui
reports the release, and is resolved once; a desktop drop records
cursor less grab. Ctrl/Cmd is read from AppKit's modifier flags, since
AppKit sends no key events during the move, and Escape does not cancel
the move. A press released within the click distance docks nothing.
Windows, X11 and Wayland keep their paths.

The window system seam (WindowSystem, formerly DesktopCursor) tells the
cursor, the button, the modifiers and whether it moves windows.
NativeHost models AppKit's move (moves_windows, held): the window
follows the cursor at the grab and reports its place late. The
app-driven cursor path from #325 and its stale-pointer model are
removed, since macOS no longer takes that path.

* docs: a cancel during an AppKit bar drag leaves the window moving
2026-10-25 21:58:02 -04:00
aiongg 8b19c44267 docking: a dragged window fades only while it highlights a drop target (#321)
* docking: a dragged native window fades only while a drop target is highlighted

The dragged window stays opaque over empty space and goes to 75% only
while the bar, only-tab or only-tab-row drag shows a drop preview.
paint_group_drag reports whether it highlighted a target; end_cross keeps
that for the next frame, since the dragged window sets its opacity before
the preview is drawn.

* docking: a dragged in-window floating window fades only while a drop target is highlighted

The rule for native windows covers in-window floating windows too. A
title bar drag draws its window at DRAG_OPACITY (75%) while the drag
highlights a drop target, and opaque over empty space and after a drop,
Escape or focus loss. finish_group_drag keeps paint_group_drag's result
for the next frame, since the window draws before the preview.
FloatingFrame takes an opacity for the whole frame, contents included.

* docking: a title-bar drag also fades over a preview the host draws
2026-10-25 12:21:53 -04:00
aiongg da5bc8df94 docking: native palettes stay shown while the app is inactive (#326)
* docking: keep native palettes shown while the app is inactive

Palettes no longer hide when none of the application's windows has focus.
They drop to WindowLevel::Normal while the application is inactive, so
they do not cover other applications, and go back to AlwaysOnTop when it
is active again. Files dragged from another application reach them, OS
sheets attached to them stay open, and they stay shown, dimmed, while an
app modal blocks input.

* docking: on Windows an inactive app's palettes go behind other windows

* docking: the viewer level test expects the inactive palette level
2026-10-25 12:18:10 -04:00
aiongg 200b68fd6a docking: a macOS window bar drag follows AppKit's cursor (#325)
AppKit reports a native window's new place as soon as a move is
commanded, but measures the pointer events it sends against where the
window server had the window, which can be a move behind. Placing the
window from those events made it overshoot and step back while the
cursor moved smoothly.

On macOS the window now goes to NSEvent::mouseLocation, flipped against
the primary screen's height and divided by egui's zoom factor, less the
pressed point; drop targets are hit at the same point. Other platforms
keep placing the window from the frame's pointer move.

The cursor source is a DesktopCursor the test harness fixes. NativeHost
can tell the cursor (tells_cursor) and measure a window's pointer events
against its place some frames back (stale), through window_pointer.
2026-10-25 12:09:34 -04:00
aiongg c74116411d docking: a group drops on its own column's window edge, and window-edge drops preview a line (#324)
A group bar drag to a dock band named by one of the moving panels, such as the window edge of the column the group heads, anchors on another panel of that column, as a tab drag does; with none, the drop is a no-op. Before, the model rejected the move and the drop did nothing.

Drops on the bands along the layout's outer edge (a new dock, a new outermost column, the outer edge band) preview the line along that edge instead of the rect the panels take; drops beside groups keep the rect. The window-edge column line sits inside the window, like the new-dock line.
2026-10-25 12:08:55 -04:00
aiongg bab74e1f4c docking: a canvas body takes no drop in the docking profile (#323)
With new_dock_zones (and without side_edge_zones), the body of a frame or
floating group that takes no tabs is no drop target, whatever its
accepts_splits. A floating window released there stays floating and a
docked panel floats as over empty space; the outer edge band, dock columns,
new docks and drops beside other groups still dock. Without new_dock_zones
the whole canvas body still goes to the nearest of drop_edges.
2026-10-25 12:07:15 -04:00
aiongg 2ccf7ea3a2 Merge remote-tracking branch 'upstream/main' into dock-result-preview
# Conflicts:
#	crates/ui/src/docking/drop_tests.rs
#	crates/ui/src/docking/render/preview.rs
2026-10-25 14:01:23 +00:00
aiongg edef7915d2 docking: fixes from the first Mac test round (edge band, drop_edges, no-op drops, narrow frames, pane previews) (#312)
* docking: fade a dragged native window only when the drag can dock

* docking: narrow the outer edge band to the canvas column and add DockStyle::drop_edges

* docking: drop_edges defaults to all sides; the docking profile's outer band takes only its top and bottom

* panes: preview the slot a dragged pane docks in, also while floating

* docking: a drop that changes only sizes is a no-op; a lone floating group's header drag looks through its window

* docking: a drop beside a frame too narrow to halve takes the room from beyond its divider

* panes: the dock preview counts a pane its drop reveals, and a side pane stays inside the host

With SidePolicy::OneSlot a drop can reveal a pane the frame hides, so the landing slot is
worked out from every open pane. A side pane is no wider than the room the panes outside it
leave, as the preview assumes; egui placed a wider one partly beyond the host's edge.

* docking: anchor an outer edge drop on the area it shows

The edge band and window.panel.dock to an outer edge anchor on the canvas only where the edge area narrows to the canvas column, else on a panel that is not protected, so tree order no longer decides the frame. The renderer tries the drop and offers the band only when it wraps the panels the band shows. A top (bottom) edge also narrows a split of rows to its first (last) row when only that row holds the canvas. to_actions takes the permissions, and FloatSpace records side_edge_zones.

* docking: a sized split gives the new frame its minimum or saved width

* docking: keep a native window opaque during a float-only drag

* docking: DockCommand::to_actions keeps its signature; to_actions_with takes the permissions

FilmCraft calls to_actions. Without permissions no panel is protected, so an outer edge dock
wraps the part between the docks, as before.
2026-10-25 09:59:17 -04:00
aiongg ea4c823abb docking: save every floating window's id (#317) 2026-10-25 09:50:13 -04:00
aiongg cdc6713130 Merge branch 'mac-b1-edges' into dock-result-preview 2026-10-25 07:01:22 +00:00
aiongg 91aaa294d0 docking: anchor an outer edge drop on the area it shows
The edge band and window.panel.dock to an outer edge anchor on the canvas only where the edge area narrows to the canvas column, else on a panel that is not protected, so tree order no longer decides the frame. The renderer tries the drop and offers the band only when it wraps the panels the band shows. A top (bottom) edge also narrows a split of rows to its first (last) row when only that row holds the canvas. to_actions takes the permissions, and FloatSpace records side_edge_zones.
2026-10-25 06:18:34 +00:00
aiongg d004f40c25 docking: preview a drop beside something with the rect the panel takes 2026-10-25 05:56:38 +00:00
aiongg 950b9644e8 docking: a drop beside a frame too narrow to halve takes the room from beyond its divider 2026-10-25 05:34:35 +00:00
aiongg 63b3e4e2e8 docking: a drop that changes only sizes is a no-op; a lone floating group's header drag looks through its window 2026-10-25 05:34:35 +00:00