2.2 KiB
2.2 KiB
gpui-native-kit gaps
Vendored crates/ui shortcomings recorded here instead of patched in place.
PanelRow(src/layout/panel.rs) seeds its split panes fromwindow.viewport_size()during the first render frame. On some launches that size is not yet the window's final bounds, so the divider freezes at a wrong position (observed ~24% instead of the intended 50%) until a drag or a double-click reset. Seeding from the canvas-measured extent, or re-seeding while no user resize has happened, would fix it.island()(src/layout/panel.rs) rounds and paintsoverflow_hidden, but gpui'sContentMaskis rectangular only: children are never clipped to the rounded corners. Full-bleed panel content (photos, backgrounds) paints square over the island chrome and must apply the matchingtheme.radius.overlayitself — see the signed-out banner insigned_app.- The popup primitives extracted into
menu.rs(trigger_toggle,anchored_overlay,focus_capture) cover the trigger-button, anchored-panel, and focus-grab surfaces. They do not cover lists:ComboboxStateandCommandPaletteStatekeep their own entity-backed virtualized rows outside theMenuItemengine because menu rows are built per frame from aVec, while both hold stateful selections theuniform_listdrives. Any future row engine should absorb those two. toast.rsandalert.rseach re-implement the same scaffolding: a store entity with push/dismiss ids, an entry wrapper, a floating stack view with fade-out. Unification was declined for now; if either gains behavior the other lacks, extract the shared store/stack shell first.- The toggle family (
checkbox.rs,switch.rs,toggle.rs) restates the same control scaffolding three times: sizing, disabled handling, awhen(checked)style fork, and an on-change handler with optimistic paint. A shared toggle base would shrink the trio. StatusDotandBadgeboth map a*Variantenum onto the same theme tokens (primary/success/warning/destructive ramps plus muted foreground). The tables are duplicated rather than shared.ControlSizing(common.rs) and theSize::*_remsmethods (theme) are parallel lookup tables: one mapsSizeto control metrics, the other to glyph metrics. Adding a size means touching both.