Re-vendor the native UI kit at 278430d

- Upstream merged core, data, editor, and utils into a single `components` crate: `ui::button`, `ui::tabs`, `ui::code`, `ui::tree`, `ui::sidebar` are flat, and `h_flex`/`v_flex`/`StyledExt` live in `ui::common` and `ui::layout`.
- Adopts the new wrapper-less component module tree, the merged theme/icon updates, and the relocated editor grammars.
- Titlebar repo tabs use the new `TabsVariant::Titlebar` capsule sizing.
- Doc examples now import from `ui::`, so all 44 doctests compile; the clipboard sample no longer names the kit crate.
- docs/ui-gaps.md records that `ui` has no dock/view-registry API instead of the deleted `DockState`.
This commit is contained in:
2026-11-17 09:49:10 +07:00
parent 71f4ec0b6b
commit 8f96a2cc16
80 changed files with 1524 additions and 2037 deletions
@@ -15,13 +15,13 @@ use ui::avatar::Avatar;
use ui::button::Button;
use ui::clipboard::ClipboardButton;
use ui::common::{Sizable as _, h_flex, v_flex};
use ui::data::tabs::{Tab, Tabs};
use ui::icons::{Icon, IconRole};
use ui::input::InputState;
use ui::layout::panel::Panel;
use ui::scroll_area::ScrollArea;
use ui::scrollbar::Scrollbar;
use ui::spinner::Spinner;
use ui::tabs::{Tab, Tabs};
use ui::theme::{ActiveTheme as _, TextRole, Typeset as _};
use utils::relative_time;
+1 -1
View File
@@ -10,13 +10,13 @@ use signed_state::{CheckoutsStore, RepoStore};
use ui::button::Button;
use ui::combobox::{Combobox, ComboboxState};
use ui::common::{h_flex, v_flex};
use ui::data::tabs::{Tab, Tabs};
use ui::icons::{Icon, IconRole};
use ui::input::{Input, InputState};
use ui::layout::panel::Panel;
use ui::menu::Menu;
use ui::scrollbar::Scrollbar;
use ui::spinner::Spinner;
use ui::tabs::{Tab, Tabs};
use ui::theme::{ActiveTheme as _, TextRole, Typeset as _};
use super::helpers::{ForkCompare, fork_display_name, truncate_label};
+1 -1
View File
@@ -11,13 +11,13 @@ use signed_git::{CommitDiff, DiffStatus, FileCommit, FileDiff, Repo};
use ui::badge::{Badge, BadgeVariant};
use ui::clipboard::ClipboardButton;
use ui::common::{h_flex, v_flex};
use ui::data::tree::{Tree, TreeItem};
use ui::icons::{Icon, IconRole};
use ui::layout::panel::Panel;
use ui::layout::resizable::{Resizable, ResizableState};
use ui::scrollbar::Scrollbar;
use ui::spinner::Spinner;
use ui::theme::{ActiveTheme as _, TextRole, Typeset as _};
use ui::tree::{Tree, TreeItem};
use utils::relative_time_secs;
use super::helpers::{DiffRow, diff_rows, render_diff_row};
+3 -3
View File
@@ -8,12 +8,12 @@ use gpui::{
ParentElement as _, SharedString, Styled as _, Task, WeakEntity, Window, div, px,
};
use signed_git::{FileCommit, Repo, WorktreeSnapshot};
use ui::code::CodeViewState;
use ui::common::{h_flex, v_flex};
use ui::data::tree::{Tree, TreeItem};
use ui::editor::code::CodeViewState;
use ui::editor::markdown::MarkdownViewState;
use ui::icons::{Icon, IconRole};
use ui::markdown::MarkdownViewState;
use ui::theme::{ActiveTheme as _, TextRole, Typeset as _};
use ui::tree::{Tree, TreeItem};
use super::helpers::{code_language, is_markdown_path, preview_spinner, source_hash};
use crate::shared::tree::{TreeItemSeed, TreeRow, collect_expanded, flatten};
+2 -2
View File
@@ -234,8 +234,8 @@ pub(super) fn preview_spinner() -> AnyElement {
}
/// The kit grammar for a path; only four languages are supported.
pub(super) fn code_language(path: &str) -> ui::editor::highlight::Language {
use ui::editor::highlight::Language;
pub(super) fn code_language(path: &str) -> ui::highlight::Language {
use ui::highlight::Language;
match Path::new(path)
.extension()
.and_then(|ext| ext.to_str())
+1 -1
View File
@@ -17,9 +17,9 @@ use signed_state::{
};
use ui::alert::{Alert, AlertSeverity};
use ui::common::{h_flex, v_flex};
use ui::data::sidebar::{Sidebar, SidebarEntry};
use ui::icons::{Icon, IconRole};
use ui::layout::panel::Panel;
use ui::sidebar::{Sidebar, SidebarEntry};
use ui::spinner::Spinner;
use ui::theme::{ActiveTheme as _, TextRole, Typeset as _};
+2 -2
View File
@@ -13,9 +13,9 @@ use ui::avatar::Avatar;
use ui::button::{Button, ButtonVariant};
use ui::command_palette::{Command, CommandPalette, CommandPaletteState};
use ui::common::{Sizable as _, h_flex};
use ui::data::tabs::{Tab, Tabs, TabsVariant};
use ui::icons::{Icon, IconRole};
use ui::menu::{Menu, MenuItem};
use ui::tabs::{Tab, Tabs, TabsVariant};
use ui::theme::ActiveTheme as _;
use ui::tooltip::Tooltip;
@@ -227,7 +227,7 @@ impl TitlebarView {
Some(
Tabs::new("signed-repo-tabs")
.variant(TabsVariant::Pill)
.variant(TabsVariant::Titlebar)
.overflow_scroll(true)
.selected(selected)
.tabs(move |_, cx| {
+1 -1
View File
@@ -5,8 +5,8 @@ use gpui::{
Context, IntoElement, ParentElement as _, Render, SharedString, Styled as _, Window, div,
};
use ui::common::v_flex;
use ui::data::tabs::{Tab, Tabs, TabsVariant};
use ui::layout::panel::{Panel, PanelView};
use ui::tabs::{Tab, Tabs, TabsVariant};
use crate::shared::log_dropped;