feat: apply declarative render rule across components

This commit is contained in:
2026-11-10 08:04:24 +07:00
parent fbc4f24d16
commit 44abaf47a9
12 changed files with 545 additions and 561 deletions
+10 -6
View File
@@ -9,12 +9,16 @@ is the first downstream consumer; its screens drive the order.
## Next
- [ ] **Declarative render audit** — run the AGENTS.md render rule over the
other landed components: replace `let mut` element variables reassigned
under `if` / `if let` with one chained expression using `.when(...)` /
`.when_some(...)` / `.map(...)`. The sidebar row is the model; sweep
`crates/core`, `crates/data`, `crates/editor`, `crates/layout`, and
re-run tests plus a gallery pass after each crate.
- [x] **Declarative render audit** — the AGENTS.md render rule swept the
landed components: `let mut` element variables reassigned under `if` /
`if let` now build one chained expression with `.when(...)` /
`.when_some(...)` / `.map(...)`. Converted: Tabs strip root and tab,
Menu / DropdownMenu / Popover / Combobox wrappers, ScrollArea pane and
scrollbars, Select rows, Dock tab entries, Resizable panes and dividers,
the Markdown text / code / table rows, and the Diff gutter cell.
`MenuItem` and `Tab` adopted `FluentBuilder` so their builders chain
too; data accumulators (`Vec`/`String` builders, style clones) stay
imperative — they are state, not element refinement.
## Queue — to follow