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
+14 -3
View File
@@ -1,3 +1,16 @@
//! Renders a centered panel for lists, tables, and searches with nothing to show.
//!
//! # Examples
//!
//! ```no_run
//! use ui::empty_state::EmptyState;
//!
//! let state = EmptyState::new("No projects yet")
//! .hint("Create a project to get started");
//! ```
use crate::icons::Icon;
use crate::theme::{ActiveTheme as _, Size, TextRole, Typeset as _};
use gpui::prelude::FluentBuilder as _;
use gpui::{
App, IntoElement, ParentElement as _, RenderOnce, SharedString, StyleRefinement, Styled as _,
@@ -5,8 +18,6 @@ use gpui::{
};
use crate::components::common::{StyledExt, v_flex};
use crate::icons::Icon;
use crate::theme::{ActiveTheme as _, Size, TextRole, Typeset as _};
/// The centered "nothing here yet" panel for lists, tables, and searches.
#[derive(IntoElement)]
@@ -52,7 +63,7 @@ impl EmptyState {
self
}
/// Sets an action element — usually a button — under the hint.
/// Sets an action element, usually a [`crate::components::button::Button`], under the hint.
pub fn action<E>(mut self, action: E) -> Self
where
E: IntoElement,