Category tests move into their component's tests/ folder (controls, chrome,
views, media, nodes, files, kanban, markdown, docking, session, debug); the
cross-cutting suites (input, layout, popups, style, wrapping, the gallery and
theme editor pages, the grab-bag widget tests) stay in tests/ with the shared
support.
Mechanical port of WidgetsComponents onto the refactored core, per the
porting table: widgets paint on tp::Canvas, handle the routed tp::InputEvent,
use the container widgets, popup kinds, Widget::platform(), the theme
interaction constants and WidgetsTesting for tests.
- Painter, the ui:: mirror types, ImageId/ImageLoader, InputRouting and the
per-frame hooks are gone; the app adapter constructs Ui(UiOptions{...}) and
dispatches InputState directly.
- Drags go through the router: NodeEditor and TreeView arm a pending gesture
at press and consume Dragged Started/Moved/Finished/Cancelled; a click that
does not drag finishes selection, and releasing while stretched absorbs
into the stretch instead of flinging.
- The widget sizes that left Metrics live in the components as sizes::
(slider, scroll bar, splitter, menu, window buttons); MarkdownEditor takes
the images directory from the application.
- Tests drive the headless UiDriver on the recording canvas; the suite is
781 tests (the InputTranslator tests died with the translator, and the
per-frame hook test died with the hook - both are covered by core tests).
The full build's failing set is unchanged: the four old-API application
entry points (3DEditor, LibraryViewer, Sketch3D) that the next PRs port.
Small core changes the components port needs:
- UiOptions takes the canvas and Ui exposes canvas(), so widgets can load and
size images through it.
- The test driver gains key/holdKey/pressKey/click overloads that hold
modifiers only for that one call, like the old driver's modifier argument.
- borderWidth is a hairline and stays unscaled; the scaling guard accounts for
it.