Vendor the native UI kit as crates/ui

- crates/ui holds the theme, icons, components, data widgets, editor surfaces, layout, and utilities; cargo feature gates are gone.
- One merged icon set of 154 SVGs where the app file wins every duplicate name, served by a single rust-embed Assets source.
- IconRole grows the 25 app glyphs, so assets::CustomIconName and crates/assets are deleted.
- ui::init owns the theme and key bindings that desktop used to bind in three calls.
- docs/gpui-native-kit-gaps.md becomes docs/ui-gaps.md; the icon gap is closed.
This commit is contained in:
2026-11-17 09:36:20 +07:00
parent ad6e00b4b9
commit d795dc6e32
287 changed files with 28142 additions and 590 deletions
@@ -1,25 +1,25 @@
# gpui-native-kit gaps
# ui gaps
Known Signed features the kit does not currently support. Recorded instead of
modifying the kit or reimplementing a parallel mechanism.
Known Signed features `ui` does not currently support. Recorded instead of
modifying it or reimplementing a parallel mechanism.
1. **Custom themes.** `Signed Light`/`Signed Dark`, theme registry names, font
sizes, radii, focus ring, and shadows are removed. The kit derives colors,
sizes, radii, focus ring, and shadows are removed. `ui` derives colors,
radii, fonts, and chrome from the OS; `AppearanceMode` is preserved through
`set_mode_override`/`follow_system`.
2. **Tab bar navigation.** The previous/next tab buttons and
`tab_bar.hide_navigation_buttons` are removed; the kit tab strip has none.
`tab_bar.hide_navigation_buttons` are removed; `ui` tab strip has none.
3. **Traffic-light placement.** Custom macOS traffic-light position and the 44px
tab bar are removed. The kit uses `theme.titlebar_height` and a fixed 78px
tab bar are removed. `ui` uses `theme.titlebar_height` and a fixed 78px
traffic-light pad.
4. **Virtual list.** The kit has no data-driven virtual list. Screens keep
4. **Virtual list.** `ui` has no data-driven virtual list. Screens keep
`gpui::uniform_list` for fixed-height lists and `ScrollArea` for the Inbox.
5. **Editable code field.** The kit code view is read-only and supports four
5. **Editable code field.** `ui` code view is read-only and supports four
grammars. Signed only previews files read-only; other extensions render as
plain text.
6. **Hunk-only diffs.** Kit `DiffViewState` needs the full old and new texts;
6. **Hunk-only diffs.** The `ui` `DiffViewState` needs the full old and new texts;
`CommitDiff` carries hunks only. The custom hunk rows are retained.
7. **Tree data.** The kit tree is flat with caller-managed expansion.
7. **Tree data.** `ui` tree is flat with caller-managed expansion.
Folder rows use `IconRole::Folder` and file rows use `IconRole::File`.
8. **Dynamic dock panels.** `DockState` has no unregister or `open_view` API.
Per-repository/per-entity panels register a builder keyed by a unique id and
@@ -28,13 +28,9 @@ modifying the kit or reimplementing a parallel mechanism.
9. **Dialogs.** Dialogs are elements mounted at the window root; there is no
`window.open_dialog`, dialog stack, or non-dismissible option. A single-slot
`DialogHost` is used, and the passphrase dialog ignores dismiss requests.
10. **Notifications.** The kit toast shows one toast at a time; backend errors
10. **Notifications.** `ui` toast shows one toast at a time; backend errors
queue but only the current toast is visible.
11. **Segmented badges.** `Segmented` has no badge slot; filter counts fold
into labels.
12. **Combobox trigger.** `Combobox` has no custom trigger renderer; branch/tag
selectors lose the leading git icon and custom caret.
13. **Icons.** The kit provides common platform roles plus Settings, Help,
Refresh, File, Folder, and similar glyphs. App-specific git, issue, and
pull-request glyphs remain in `assets::CustomIconName` through `IconNamed`;
kit icons are unpainted unless given a color.