Most context menus hang from Anchor::Point (table header, rulers, ribbon,
places, versions, dock group menu). layer_covers_anchor decides every case in
one place: the pointer, the rect a context request named, and a point for a
layer whose key class is OwnerClass::Menu. Point-anchored layers that are not
menus (the iconic flyout, a popover at a point) keep their rule.
docs/contract-api.md regenerated.
Divider::length has no caller since the ribbon groups fill their line; its story and trial go with it (the filling
divider trial stays). docs/contract-api.md is regenerated with the contract-api bin and lists ContainerProps::least_height
and Row::least_height.
A component with no scroll owner in its scope sent its reveal to the smallest scroll region of the last pass whose
rect met its own; egui's intersects counts a shared edge, so WordCraft's page canvas, taking the focus in its first
pass, scrolled the status bar under it to its end. A reveal and an untaken page or end move now go only to the scroll
owner the scope names, and with none nothing scrolls. A collection that scrolls its rows names itself their scroll
owner, so a reveal in a row still reaches it; the geometric lookup is removed.
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.
Fixesstorytold/photocraft#15862.
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.
- 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.
- `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.
A dimension that belongs to one component's own drawing is a documented
constant in that component's file; layout sizes stay semantic tokens, and
no size-preset token exists for one component (craft-framework.md 5.4).
- Spec: 5.4 rule 3 reworded; Appendix A, 4.6 (the component-token rung
goes, no such tokens exist), 8.3, porting.md and the theme README agree.
- design-lint: literal-size/* treats a module- or impl-level const with a
doc comment as a named value: a name that resolves to it is not flagged,
and its initializer is its definition. Fn-local and undocumented consts
and call-site literals stay flagged. Nine markers that only covered such
consts are removed.
- Ruler ticks: size.ruler.tick.* leaves the size presets; kit.rs draws
TICK_MID = 6 and TICK_MINOR = 3 points in every density, as the old
library and the apps' rulers do. Comfortable ticks go back to 6 / 3
(from 9 / 4.5); Compact is unchanged.
- size.scroll_fade becomes FADE_LENGTH in scroll_bar.rs, size.notice.width
CARD_WIDTH in notice.rs, and size.story.* multiples of size.control.md
in testing/stage.rs (15, 10 and 30 control heights: today's values in
both densities). pointer_tip, checker, thumb.sample.*, the card gaps and
icon.glyph_md stay tokens: each has more than one user.
Sensing grows every part's hit area to the pointer's target size (size.hit.target, 8 pt), so a 6 pt grip reached
1 pt past its rect on each side: a press 1 pt into a floating window's title row started a top resize, and the top
corners of a banded layer (6 pt tall) reached 8 pt. A part declared exact_hit keeps its declared shape as its hit
area. Every window grip and the edge pane's grip declare it: a frame's grip band is sized as its reach, its
neighbours own the points beside it, and the in-app hit area matches the platform's hit test for an exclusive grip.
docs/contract-api.md regenerated.
- 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).
next's WordCraft port and the framework work under it (243d68e12d) take the memoized-view APIs where they meet the
branch: story values bind through StoryData::bind, value_at and pair_at (next's copy-out stories included; one held
form story still binds a copy, as its held answer is a note beside the value); next's env values (GroupLevel,
ControlPlace, RibbonLook, ScreenModeSet), IconMark and PageBandRoom derive MemoProps, and the shell entry keys the page
band's room; request_own_repaint calls become request_repaint. The collection extent next reworked (motion-owned
style context, FillHeight, ideal width by item count) moves into items_extent. The header's hosted cells join the
parts' roving group from the pass's own membership (parts_group over Cx::join_roving), as the parts' stops do. A
content-sized shell slot measures its content with the app running in it every pass. The gallery card hands the
story's output from its view's real run (StoryRun).
Memoized views stay the one change mechanism: next's settling-path additions (modifier reads as bind keys, given-edit
and keymap unsettling, settle counters) give way to the tracked inputs that cover them, and request_own_repaint calls
become request_repaint. next's command board, node facts after the node check, the guide drag out of a ruler and the
CommandStates input are taken; the trials next wrote on Lazy::settles run on memoized views. The ruler guide env value
keys a view under the canvas in every pass of a drag. The replay audit's run in the gate takes next's target selection.
A face measured by MeasureCx::face is part of its composite's measure
call: that call's answer and the inputs the faces read are the record
the layout memory keeps and checks. The face recorded a leaf of its own
under one id shared by every face of the composite, so only the first
face was kept, and a change to it that left the composite's size alone
dropped the kept measurements and asked for a discard pass.
measure_face measures a face as measure_under does, without the leaf.
TextRun::least (MeasureCx::least) returns the run laid out whole with its
least width, so a text measured at Proposal::Min no longer lays the whole
line out a second time for its height. A fitted select face takes its cap
from the same call. A select of 29 blend modes plus the mixed word lays out
56 texts per Min ask instead of 86.