Organize Iris support files
This commit is contained in:
1 parent
0ead062379
commit
779f5c63d3
21 files changed
+108
-147
No files matched your search
+3
-2
@@ -247,8 +247,9 @@ is a unit test with exactly those names in it.
|
||||
|
||||
### 12. Icons
|
||||
|
||||
Added to `NerdIcons.kt` **and** `build-icon-font.sh`, then the script rerun
|
||||
and its output committed: `md-folder` U+F024B (the header button and
|
||||
Add these to `iris/core/src/icon.rs` **and**
|
||||
`iris/core/build-icon-font.sh`, then rerun the script and commit its output:
|
||||
`md-folder` U+F024B (the header button and
|
||||
directory rows), `md-plus` U+F0415, `md-pencil` U+F03EB,
|
||||
`md-content_save` U+F0193, `md-file_outline` U+F0224. The folder and the plus
|
||||
are the same codepoints dev-updater uses and must not drift from it, as the
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
# iris: known problems and things still to build
|
||||
|
||||
Only open Iris framework work lives here. Delete an item when it lands.
|
||||
|
||||
## Build (for the port)
|
||||
|
||||
Framework capabilities needed by `RUST.md`'s port plan:
|
||||
|
||||
- [ ] **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
|
||||
and displayed strings distinct with one byte mapping shared by spans,
|
||||
links, selection and editing. Replace `wrap: bool` with an enum that can
|
||||
say wrap, clip, head ellipsis and tail ellipsis—the caller must choose
|
||||
because a command is identified by its head and a path by its tail.
|
||||
- [ ] **Expose the distance from a `LazySpan` viewport to its unloaded
|
||||
edge.** (**P1**.) `viewport_len` and the visible extents are already
|
||||
measured internally, but a paging caller cannot ask whether it is within
|
||||
the product's six-viewport `HISTORY_SCREENS` cushion. The API should
|
||||
answer in pixels or viewport multiples, never rows: a row ranges from one
|
||||
line to a screen, so a fixed row count is not a distance.
|
||||
- [ ] **Let an image fit a bounded box while preserving its aspect ratio.**
|
||||
(**P1**.) `Image` currently always reports and draws the decoded texture's
|
||||
natural pixel size. Decoding and fetching a server-produced attachment
|
||||
belong in `app`; iris only owes the generic fit/scale widget used to
|
||||
draw its thumbnail.
|
||||
- [ ] **Per-range backgrounds for rich text.** (**P1**.) Inline code is
|
||||
already monospace and coloured, but the inline-code chip also needs
|
||||
the glyph run's boxes so a surface can be drawn behind exactly that byte
|
||||
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 horizontal gauge/bar widget.** (**P1**.) For
|
||||
`SessionUsageBar`'s equivalent — a bounded fill reflecting a fraction,
|
||||
nothing fancier.
|
||||
- [ ] **A toggle switch.** (**P3**.) For the delete dialog's
|
||||
`deleteForeign` control; iris has no switch/checkbox widget yet as far
|
||||
as this pass found.
|
||||
|
||||
## 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
|
||||
pay nothing and import nothing for them.
|
||||
|
||||
- [ ] **Remove `WidgetView` unless a real composite adopts it.** Every
|
||||
composite in `app/src/ui` uses ordinary child handles plus a root;
|
||||
`WidgetView` and its derive are used only by `iris/examples/view.rs`.
|
||||
It currently demonstrates itself rather than shortening production code.
|
||||
|
||||
- [ ] **A `Stack` that chooses its mask the way it chooses its size
|
||||
should replace `masked_by`.** For a square-cornered surface,
|
||||
`.background(rect(BAR_FILL)).masked()` was measured
|
||||
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` 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.
|
||||
Let `Stack` name the mask child the way `StackSize::Child(n)` names the
|
||||
sizing child. Then `.background(x)` remains the one way to add a surface
|
||||
and clipping to it is a stack property; the named mask child must have
|
||||
drawn before any child that uses it. Once that exists, delete
|
||||
`masked_by` and `Masked::shape` rather than retaining two APIs.
|
||||
+1
-2
@@ -244,8 +244,7 @@ have `ActiveData`'s existing lifecycle through `remove`/`remove_rec`.
|
||||
## Density: `Len::dp`, resolved at `apply_rest` time
|
||||
|
||||
Iris asked for a third length kind beside `abs` (physical pixels) and
|
||||
`rel`/`rest` (a fraction of the parent) — IRIS_TODO.md's "density-
|
||||
independent length unit" — after the P0 phone pass found 16px text
|
||||
`rel`/`rest` (a fraction of the parent) after the P0 phone pass found 16px text
|
||||
drawing at roughly a third size on a real phone. The fix that shipped
|
||||
first (RUST.md's P0 box) was a global stopgap: divide the whole window
|
||||
into a "logical" coordinate space (physical ÷ `content_scale`) and let
|
||||
|
||||
+4
-4
@@ -49,7 +49,7 @@ Later product work:
|
||||
- Desktop layouts for those surfaces.
|
||||
|
||||
Client route coverage and gaps live in `docs/CLIENT_CORE.md`; framework work
|
||||
lives in `docs/IRIS_TODO.md`.
|
||||
lives in `iris/TODO`.
|
||||
|
||||
## Test layers
|
||||
|
||||
@@ -74,8 +74,8 @@ compute pass to prove the shader and CPU hit-test arithmetic agree.
|
||||
### 2. Phone-shaped desktop window
|
||||
|
||||
cd iris
|
||||
./run-headless.sh phone --phone --dir ../app --shot /tmp/phone.png
|
||||
./run-headless.sh phone --phone --dir ../app \
|
||||
./scripts/run-headless.sh phone --phone --dir ../app --shot /tmp/phone.png
|
||||
./scripts/run-headless.sh phone --phone --dir ../app \
|
||||
--replay ../app/touch/flick-120hz.touch --shot /tmp/replay.png
|
||||
|
||||
This layer is for visual output and desktop input integration. Debug frame
|
||||
@@ -187,7 +187,7 @@ name. Explicit benchmark builds add `.bench` to the application id.
|
||||
- Release builds are signed by the machine-local
|
||||
`~/.config/ai-app/release.jks`. No key or enrollment secret belongs in the
|
||||
repository.
|
||||
- `iris/run-headless.sh --dir DIR` selects the workspace containing the
|
||||
- `iris/scripts/run-headless.sh --dir DIR` selects the workspace containing the
|
||||
example and defaults to `iris/`.
|
||||
|
||||
## Session-screen pass condition
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
# Scrolling in iris
|
||||
|
||||
This is the current scrolling design; `docs/IRIS_TODO.md` holds open work.
|
||||
This is the current scrolling design; `iris/TODO` holds open work.
|
||||
|
||||
Read this before touching `iris/src/widget/position/scrollable.rs`,
|
||||
`scroll_area.rs`, `lazy_span.rs`, or anything that pans, flings or lays
|
||||
|
||||
Reference in new issue
Block a user