Add retained paints and shared text selection
This commit is contained in:
1 parent
25370731d0
commit
de92fccba5
60 files changed
+2848
-1297
No files matched your search
+13
-30
@@ -2,35 +2,10 @@
|
||||
|
||||
Only open Iris framework work lives here. Delete an item when it lands.
|
||||
|
||||
## Fix
|
||||
|
||||
- [ ] **Colours are not in a defined colour space. Fix this before a
|
||||
styling pass.** Both render backends prefer an sRGB surface
|
||||
(`default/render.rs` and `android/render.rs`), while `fs_main` returns
|
||||
`unpack4x8unorm` palette and image bytes unchanged. An sRGB attachment
|
||||
treats those values as linear and encodes them again: Mocha Crust
|
||||
(17,17,27) became (73,73,91) in a desktop screenshot measured on
|
||||
2026-09-06.
|
||||
|
||||
Neither diagnostics nor startup logging records Android's selected surface
|
||||
format. A device exposing only a non-sRGB surface can hide the shared bug.
|
||||
|
||||
Done means defining one convention for palette bytes, decoded images,
|
||||
colour emoji and the clear colour, then converting exactly once for the
|
||||
selected target. Record the selected format in diagnostics, and add a GPU
|
||||
test that draws known non-black, non-white pixels into an sRGB target and
|
||||
reads the stored bytes back; screenshots from desktop and Android then
|
||||
confirm the same Catppuccin values rather than serving as the definition.
|
||||
|
||||
## Build (for the port)
|
||||
|
||||
Framework capabilities needed by `RUST.md`'s port plan:
|
||||
|
||||
- [ ] **Selectable, read-only text.** P0's report and P1's transcript rows
|
||||
use `TextEdit` because `Selectable` is implemented only for it. That
|
||||
makes prose focusable and opens the IME over text that cannot be edited.
|
||||
A display widget needs the same selection geometry and clipboard path
|
||||
without a text-input accessibility role or keyboard focus.
|
||||
- [ ] **Overflow ellipsis with an explicit retained end.** `TextAttrs` can
|
||||
only wrap or clip, so a tool summary is cut with no mark. Parley has no
|
||||
ellipsis primitive; use its line breaker to find the cut, but keep source
|
||||
@@ -52,9 +27,9 @@ Framework capabilities needed by `RUST.md`'s port plan:
|
||||
- [ ] **Per-range backgrounds for rich text.** (**P1**.) Inline code is
|
||||
already monospace and coloured, but matching Compose's chip also needs
|
||||
the glyph run's boxes so a surface can be drawn behind exactly that byte
|
||||
range. `TextEdit` already computes the same geometry internally for its
|
||||
selection highlight; expose one shared primitive rather than giving the
|
||||
app a second text-layout path.
|
||||
range. The shared `TextSelection` engine already computes the same geometry
|
||||
for selection highlights; expose one shared primitive rather than giving
|
||||
the app a second text-layout path.
|
||||
- [ ] **A modal/dialog primitive.** (**P1**, reused by **P3** and
|
||||
**P5**.) Needed for the session settings dialog, `UsageDialog`'s
|
||||
equivalent, and the delete-with-`deleteForeign` confirmation with its
|
||||
@@ -69,6 +44,14 @@ Framework capabilities needed by `RUST.md`'s port plan:
|
||||
|
||||
## Later
|
||||
|
||||
- [ ] **Intern independently constructed solid paint definitions.** Inline
|
||||
`rect(Srgba8::...)` values currently receive a new `PaintId` each time.
|
||||
Cache them by canonical linear RGBA bits, but keep `Paints::add` explicitly
|
||||
unique so two semantic theme roles that start with the same value can later
|
||||
change independently. Cache entries must be weak and disappear when the
|
||||
last real handle releases the slot; gradients and texture paints need their
|
||||
own identity rules rather than inheriting solid-value interning blindly.
|
||||
|
||||
- [ ] **Property/content animations.** Cosmetic, so after correctness and
|
||||
parity. Keep them modular, like input; scrolling already animates through
|
||||
`Widget::tick` and `UiData::animate`. A widget that does not opt in must
|
||||
@@ -85,8 +68,8 @@ Framework capabilities needed by `RUST.md`'s port plan:
|
||||
against `.masked_by(rect(BAR_FILL))` on the composer at the phone's own
|
||||
size and density and the two are identical to the pixel. What the pair
|
||||
cannot express is a clip that is not a box: `Painter::set_mask` writes
|
||||
a `RectPrimitive::color(Color::NONE)` at the widget's own region, with
|
||||
no radius, so `.background(rect(fill).radius(r)).masked()` draws a
|
||||
a `RectPrimitive::color` using `PaintId::NONE` at the widget's own region,
|
||||
with no radius, so `.background(rect(fill).radius(r)).masked()` draws a
|
||||
rounded panel and then cuts its content square. Both other call sites
|
||||
(`row.rs`'s fence, `tool.rs`'s raw output) are rounded, which is why
|
||||
the method stands for now.
|
||||
|
||||
Reference in new issue
Block a user