Say what docs/ui.md counts, with the true share and the studio's base
The table of controllers still to split now states its measure (every .set_ call, the status line's included), the share of Bridge writes as counted (four fifths with the status line, two thirds without), the base counts before the work on voelin-ui-vm (studio.rs 64, settings_pages.rs 52), why the studio went before streams.rs, and what ImageSource::size() does now. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d9de95b985
commit
12b2773791
1 file changed
+25
-9
+25
-9
@@ -87,7 +87,8 @@ this file is `voelin_ui_vm::chat`. The boundary:
|
||||
|
||||
- **Values.** A picture is an `ImageRef` (`Arc<ImageSource>`: a file of the
|
||||
engine's cache with its stamp, decoded RGBA pixels, SVG or memory bytes,
|
||||
or none; `size()` reads a file's header). A colour is an `Rgb(u32)`, a
|
||||
or none; `size()` decodes a raster file once to tell it shows, and parses an SVG, so a
|
||||
picture with a size is one a front end can draw). A colour is an `Rgb(u32)`, a
|
||||
shared string an `Arc<str>`, a list a `Vec`. The bridge structs (51 in
|
||||
`bridge.rs`, 10 in `studio_bridge.rs`) are plain `Clone + PartialEq + Debug`
|
||||
structs with the field names of the Slint structs in `bridge.slint` and
|
||||
@@ -118,10 +119,15 @@ no display); the Slint crate's tests are what needs the window types.
|
||||
|
||||
### Controllers still to split
|
||||
|
||||
Counted as `.set_` calls per file (`grep -c '\.set_'`, the status line's
|
||||
`set_status` included) before this round's splits; Bridge writes alone are
|
||||
about four fifths of each. Each one is a slice of the same shape as
|
||||
`settings_pages` and `studio`: move the decisions into
|
||||
The measure is the number of `.set_` calls in the file (`grep -c '\.set_'`):
|
||||
every setter counts, those of the Bridge, `Nav`, the window, models and the
|
||||
engine, and the status line's `self.set_status(…)`, which writes the Bridge's
|
||||
status text too. In the seven largest files (230 calls) 150 are direct
|
||||
`bridge.set_…` writes and 37 go through the status line, so Bridge writes
|
||||
are about four fifths of those files and direct ones about two thirds; the
|
||||
rest are `Nav`, window and engine setters (in `dev.rs` mostly those). The
|
||||
numbers are those of the files as they stand. Each controller is a slice of
|
||||
the same shape as `settings_pages` and `studio`: move the decisions into
|
||||
`voelin-ui-vm/src/<area>/logic.rs`, keep the writes in
|
||||
`voelin-ui/src/<area>/bind.rs`.
|
||||
|
||||
@@ -140,10 +146,20 @@ about four fifths of each. Each one is a slice of the same shape as
|
||||
| `popout.rs` | 8 | the viewer's own window |
|
||||
| `members.rs`, `links.rs`, `inbox.rs`, `home.rs`, `events.rs` | 6, 5, 5, 5, 4 | small; split with their neighbours |
|
||||
|
||||
Before this round: `studio.rs` had 62 and `settings_pages.rs` 52 (the two
|
||||
with the most). Their `bind.rs` files still show 58 and 51 `.set_` calls: the
|
||||
Bridge and model writes stay where the toolkit is, and what each write says
|
||||
now comes from `logic.rs`, which has tests of its own.
|
||||
Before the work on `voelin-ui-vm` began, `studio.rs` had 64 `.set_` calls
|
||||
and `settings_pages.rs` 52 (the two with the most, then `streams.rs` with 45;
|
||||
62 was `studio.rs` once the view models had moved, two setters having
|
||||
gone with them). Their `bind.rs` files still show 58 and 51: the Bridge and model writes
|
||||
stay where the toolkit is, and what each write says now comes from
|
||||
`logic.rs`, which has tests of its own.
|
||||
|
||||
Why the studio went before `streams.rs`: it had the most calls, and it is
|
||||
self-contained. It has its own state (`StudioState`), windows and bridge
|
||||
(`studio-bridge.slint`), so its decisions moved without touching the event
|
||||
dispatch of `app.rs`. `streams.rs`, `chat.rs` and the rest of the list are
|
||||
driven by that dispatch (the watch, share and history events of `events.rs`
|
||||
and `app.rs`), so they follow it: the state transition of every engine event
|
||||
comes first, then the controllers that show the result.
|
||||
|
||||
## Theme tokens
|
||||
|
||||
|
||||
Reference in new issue
Block a user