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:
@@ -1,24 +1,23 @@
|
||||
mod helpers;
|
||||
|
||||
use assets::CustomIconName;
|
||||
use gpui::prelude::FluentBuilder as _;
|
||||
use gpui::{
|
||||
AnyElement, Context, Entity, InteractiveElement as _, IntoElement, ParentElement as _, Render,
|
||||
SharedString, Styled as _, Subscription, UniformListScrollHandle, WeakEntity, Window, div, px,
|
||||
uniform_list,
|
||||
};
|
||||
use gpui_native_kit::common::{h_flex, v_flex};
|
||||
use gpui_native_kit::empty_state::EmptyState;
|
||||
use gpui_native_kit::icons::{Icon, IconRole};
|
||||
use gpui_native_kit::input::{Input, InputState, InputStateEvent};
|
||||
use gpui_native_kit::layout::panel::Panel;
|
||||
use gpui_native_kit::scrollbar::Scrollbar;
|
||||
use gpui_native_kit::segmented::{Segmented, SegmentedOption};
|
||||
use gpui_native_kit::theme::{ActiveTheme as _, TextRole, Typeset as _};
|
||||
use helpers::{RepoFilter, render_card};
|
||||
use metadata::ProfileDirectory;
|
||||
use nostr::prelude::PublicKey;
|
||||
use signed_state::RepoListStore;
|
||||
use ui::common::{h_flex, v_flex};
|
||||
use ui::empty_state::EmptyState;
|
||||
use ui::icons::{Icon, IconRole};
|
||||
use ui::input::{Input, InputState, InputStateEvent};
|
||||
use ui::layout::panel::Panel;
|
||||
use ui::scrollbar::Scrollbar;
|
||||
use ui::segmented::{Segmented, SegmentedOption};
|
||||
use ui::theme::{ActiveTheme as _, TextRole, Typeset as _};
|
||||
|
||||
use crate::workspace::Workspace;
|
||||
|
||||
@@ -131,7 +130,7 @@ impl ExploreView {
|
||||
SegmentedOption::new(RepoFilter::All, "All")
|
||||
.icon(Icon::named(IconRole::Grid).small().color(muted)),
|
||||
SegmentedOption::new(RepoFilter::Popular, "Popular")
|
||||
.icon(Icon::named(CustomIconName::Trending).small().color(muted)),
|
||||
.icon(Icon::named(IconRole::Trending).small().color(muted)),
|
||||
SegmentedOption::new(RepoFilter::Recent, "Recent")
|
||||
.icon(Icon::named(IconRole::Clock).small().color(muted)),
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user