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:
@@ -2,20 +2,12 @@ use std::collections::HashSet;
|
||||
use std::path::PathBuf;
|
||||
|
||||
use anyhow::Error;
|
||||
use assets::CustomIconName;
|
||||
use gpui::prelude::FluentBuilder as _;
|
||||
use gpui::{
|
||||
AnyElement, App, AppContext as _, Context, Entity, InteractiveElement as _, IntoElement,
|
||||
ParentElement as _, PathPromptOptions, Render, SharedString, Styled as _, Subscription, Task,
|
||||
WeakEntity, Window, div,
|
||||
};
|
||||
use gpui_native_kit::alert::{Alert, AlertSeverity};
|
||||
use gpui_native_kit::common::{h_flex, v_flex};
|
||||
use gpui_native_kit::data::sidebar::{Sidebar, SidebarEntry};
|
||||
use gpui_native_kit::icons::Icon;
|
||||
use gpui_native_kit::layout::panel::Panel;
|
||||
use gpui_native_kit::spinner::Spinner;
|
||||
use gpui_native_kit::theme::{ActiveTheme as _, TextRole, Typeset as _};
|
||||
use metadata::ProfileDirectory;
|
||||
use nostr::prelude::{PublicKey, Url};
|
||||
use signed_core::{Announcement, RepoAddr};
|
||||
@@ -23,6 +15,13 @@ use signed_git::{FileCommit, GitCache, Repo};
|
||||
use signed_state::{
|
||||
Backend, CheckoutsStore, LocalReposStore, Mirrors, Nip34Binding, RepoStore, SyncStatusDirectory,
|
||||
};
|
||||
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::spinner::Spinner;
|
||||
use ui::theme::{ActiveTheme as _, TextRole, Typeset as _};
|
||||
|
||||
pub mod actions;
|
||||
pub mod commit_diff;
|
||||
@@ -885,19 +884,19 @@ impl RepoDetailView {
|
||||
.entries(move |_, cx| {
|
||||
let mut entries = vec![
|
||||
SidebarEntry::row("repo-nav-commits", "Commits")
|
||||
.prefix(Icon::named(CustomIconName::GitCommit))
|
||||
.prefix(Icon::named(IconRole::GitCommit))
|
||||
.when_some(commit_count, |entry, count| entry.suffix(count.to_string())),
|
||||
];
|
||||
|
||||
if include_issues {
|
||||
entries.push(
|
||||
SidebarEntry::row("repo-nav-issues", "Issues")
|
||||
.prefix(Icon::named(CustomIconName::GitIssueDone))
|
||||
.prefix(Icon::named(IconRole::GitIssueDone))
|
||||
.when_some(issue_count, |entry, count| entry.suffix(count.to_string())),
|
||||
);
|
||||
entries.push(
|
||||
SidebarEntry::row("repo-nav-pulls", "Pull requests")
|
||||
.prefix(Icon::named(CustomIconName::GitPullRequest))
|
||||
.prefix(Icon::named(IconRole::GitPullRequest))
|
||||
.when_some(pull_count, |entry, count| entry.suffix(count.to_string())),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user