Recategorize a few items in the component preview (#35681)

Release Notes:

- N/A
This commit is contained in:
Danilo Leal
2025-08-05 23:11:43 +00:00
committed by GitHub
parent bc2108cbba
commit cc93175256
11 changed files with 44 additions and 12 deletions
+6 -4
View File
@@ -94,18 +94,20 @@ impl RenderOnce for EndTrialUpsell {
impl Component for EndTrialUpsell {
fn scope() -> ComponentScope {
ComponentScope::Agent
ComponentScope::Onboarding
}
fn name() -> &'static str {
"End of Trial Upsell Banner"
}
fn sort_name() -> &'static str {
"AgentEndTrialUpsell"
"End of Trial Upsell Banner"
}
fn preview(_window: &mut Window, _cx: &mut App) -> Option<AnyElement> {
Some(
v_flex()
.p_4()
.gap_4()
.child(EndTrialUpsell {
dismiss_upsell: Arc::new(|_, _| {}),
})
+9 -1
View File
@@ -368,7 +368,15 @@ impl RenderOnce for ZedAiOnboarding {
impl Component for ZedAiOnboarding {
fn scope() -> ComponentScope {
ComponentScope::Agent
ComponentScope::Onboarding
}
fn name() -> &'static str {
"Agent Panel Banners"
}
fn sort_name() -> &'static str {
"Agent Panel Banners"
}
fn preview(_window: &mut Window, _cx: &mut App) -> Option<AnyElement> {
+1 -1
View File
@@ -236,7 +236,7 @@ impl RenderOnce for AiUpsellCard {
impl Component for AiUpsellCard {
fn scope() -> ComponentScope {
ComponentScope::Agent
ComponentScope::Onboarding
}
fn name() -> &'static str {
+2
View File
@@ -318,8 +318,10 @@ pub enum ComponentScope {
Notification,
#[strum(serialize = "Overlays & Layering")]
Overlays,
Onboarding,
Status,
Typography,
Utilities,
#[strum(serialize = "Version Control")]
VersionControl,
}
+9 -1
View File
@@ -1267,8 +1267,16 @@ impl Render for ConfigurationView {
}
impl Component for ZedAiConfiguration {
fn name() -> &'static str {
"AI Configuration Content"
}
fn sort_name() -> &'static str {
"AI Configuration Content"
}
fn scope() -> ComponentScope {
ComponentScope::Agent
ComponentScope::Onboarding
}
fn preview(_window: &mut Window, _cx: &mut App) -> Option<AnyElement> {
+12
View File
@@ -299,6 +299,18 @@ impl RenderOnce for ThemePreviewTile {
}
impl Component for ThemePreviewTile {
fn scope() -> ComponentScope {
ComponentScope::Onboarding
}
fn name() -> &'static str {
"Theme Preview Tile"
}
fn sort_name() -> &'static str {
"Theme Preview Tile"
}
fn description() -> Option<&'static str> {
Some(Self::DOCS)
}
+1 -1
View File
@@ -131,7 +131,7 @@ impl RenderOnce for Banner {
impl Component for Banner {
fn scope() -> ComponentScope {
ComponentScope::Notification
ComponentScope::DataDisplay
}
fn preview(_window: &mut Window, _cx: &mut App) -> Option<AnyElement> {
+1 -1
View File
@@ -158,7 +158,7 @@ impl RenderOnce for Callout {
impl Component for Callout {
fn scope() -> ComponentScope {
ComponentScope::Notification
ComponentScope::DataDisplay
}
fn description() -> Option<&'static str> {
+1 -1
View File
@@ -179,7 +179,7 @@ impl RenderOnce for Tab {
impl Component for Tab {
fn scope() -> ComponentScope {
ComponentScope::None
ComponentScope::Navigation
}
fn description() -> Option<&'static str> {
+1 -1
View File
@@ -99,7 +99,7 @@ struct Animation {}
impl Component for Animation {
fn scope() -> ComponentScope {
ComponentScope::None
ComponentScope::Utilities
}
fn description() -> Option<&'static str> {
+1 -1
View File
@@ -126,7 +126,7 @@ impl From<Hsla> for Color {
impl Component for Color {
fn scope() -> ComponentScope {
ComponentScope::None
ComponentScope::Utilities
}
fn description() -> Option<&'static str> {