T01 primitives: image, divider, backdrop, focus, pressable, measure, tooltip

Ely-built primitives plus gallery demos for every chapter-one entry,
including gpui natives. The gallery now scripts real input by posting
NSEvents to its own queue and shoots each interaction in both modes.
Codex gpt-6-astra (max): three rounds; the last finding, a two-line
doc comment, was fixed after the three-review cap.
This commit is contained in:
ZacharyZhang-NY committed 2026-09-25 00:39:06 -04:00
1 parent abf4cbcfc6
commit a13343c2a5
38 files changed
+2165 -157

No files matched your search

+25 -25
View File
@@ -2,33 +2,33 @@
## T01 Primitives — `src/primitives`
- [ ] Box / View — native `div()`
- [ ] Text — native: strings and `StyledText` are elements
- [x] Box / View — native `div()`
- [x] Text — native: strings and `StyledText` are elements
- [x] Icon (T00)
- [x] IconSet / IconRegistry (T00)
- [ ] Svg — native `svg()`
- [ ] Image — loading, failed, placeholder over `img()`
- [ ] Canvas — native `canvas()`
- [ ] Divider / Separator
- [ ] Spacer — native `div().flex_1()`
- [ ] Portal — native `deferred(anchored())`
- [ ] Overlay / Backdrop
- [ ] Slot — native `impl IntoElement` params and `ParentElement`
- [ ] Show / When — native `.when()` / `.when_some()`
- [ ] For / Each — native `.children(iter)`
- [ ] Fragment — native: children take iterators
- [ ] VisuallyHidden — blocked: gpui 0.2.2 has no accessibility tree
- [ ] FocusRing
- [ ] FocusScope / FocusTrap
- [ ] ClickOutside — native `on_mouse_down_out`
- [ ] HoverArea — native `on_hover` / `.hover()`
- [ ] Pressable — press state, long press
- [ ] KeyboardHandler — native `on_key_down` / `on_action`
- [ ] Measure
- [ ] ResizeObserver → `primitives::Measure`
- [ ] IntersectionObserver
- [ ] Clipboard — native `write_to_clipboard` / `read_from_clipboard`
- [ ] Tooltip Trigger — owns `Tooltip`: delay, follow mouse, rich content
- [x] Svg — native `svg()`
- [x] Image — loading, failed, placeholder over `img()`
- [x] Canvas — native `canvas()`
- [x] Divider / Separator
- [x] Spacer — native `div().flex_1()`
- [x] Portal — native `deferred(anchored())`
- [x] Overlay / Backdrop
- [x] Slot — native `impl IntoElement` params and `ParentElement`
- [x] Show / When — native `.when()` / `.when_some()`
- [x] For / Each — native `.children(iter)`
- [x] Fragment — native: children take iterators
- [x] VisuallyHidden — blocked: gpui 0.2.2 has no accessibility tree
- [x] FocusRing
- [x] FocusScope / FocusTrap
- [x] ClickOutside — native `on_mouse_down_out`
- [x] HoverArea — native `on_hover` / `.hover()`
- [x] Pressable — press state, long press
- [x] KeyboardHandler — native `on_key_down` / `on_action`
- [x] Measure
- [x] ResizeObserver → `primitives::Measure`
- [x] IntersectionObserver
- [x] Clipboard — native `write_to_clipboard` / `read_from_clipboard`
- [x] Tooltip Trigger — owns `Tooltip`: delay, follow mouse, rich content
## T02 Typography — `src/typography`
+1 -1
View File
@@ -289,4 +289,4 @@
- [ ] DesignTokenViewer
- [ ] IconBrowser
- [ ] A11yChecker — contrast audit
- [ ] ScreenshotTest Harness — self-capture
- [ ] ScreenshotTest Harness — self-capture; scripted input since T01