Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Add "Checking" icon for diagnostics
Nate Butler710a26ce3224
diff --git a/Cargo.lock b/Cargo.lockindex 1d0af3c0087..13d4be62337 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -9514,7 +9514,7 @@ dependencies = [[[package]]name = "zed"-version = "0.119.0"+version = "0.120.0"dependencies = ["activity_indicator","ai",diff --git a/assets/icons/arrow_circle.svg b/assets/icons/arrow_circle.svgnew file mode 100644index 00000000000..750e349e2b8--- /dev/null+++ b/assets/icons/arrow_circle.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-refresh-cw"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M8 16H3v5"/></svg>diff --git a/crates/diagnostics/src/items.rs b/crates/diagnostics/src/items.rsindex 9f7be0c04f2..da1f77b9afb 100644--- a/crates/diagnostics/src/items.rs+++ b/crates/diagnostics/src/items.rs@@ -23,11 +23,21 @@ pub struct DiagnosticIndicator {impl Render for DiagnosticIndicator {fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {let diagnostic_indicator = match (self.summary.error_count, self.summary.warning_count) {- (0, 0) => h_stack().child(- IconElement::new(Icon::Check)- .size(IconSize::Small)- .color(Color::Success),- ),+ (0, 0) => h_stack().map(|this| {+ if !self.in_progress_checks.is_empty() {+ this.child(+ IconElement::new(Icon::ArrowCircle)+ .size(IconSize::Small)+ .color(Color::Muted),+ )+ } else {+ this.child(+ IconElement::new(Icon::Check)+ .size(IconSize::Small)+ .color(Color::Default),+ )+ }+ }),(0, warning_count) => h_stack().gap_1().child(@@ -64,6 +74,7 @@ impl Render for DiagnosticIndicator {Some(Label::new("Checking…").size(LabelSize::Small)+ .color(Color::Muted).into_any_element(),)} else if let Some(diagnostic) = &self.current_diagnostic {diff --git a/crates/ui/src/components/icon.rs b/crates/ui/src/components/icon.rsindex 9c0b1e58e30..4c6e48c0fc0 100644--- a/crates/ui/src/components/icon.rs+++ b/crates/ui/src/components/icon.rs@@ -29,6 +29,7 @@ pub enum Icon {ArrowRight,ArrowUp,ArrowUpRight,+ ArrowCircle,AtSign,AudioOff,AudioOn,@@ -119,6 +120,7 @@ impl Icon {Icon::ArrowRight => "icons/arrow_right.svg",Icon::ArrowUp => "icons/arrow_up.svg",Icon::ArrowUpRight => "icons/arrow_up_right.svg",+ Icon::ArrowCircle => "icons/arrow_circle.svg",Icon::AtSign => "icons/at_sign.svg",Icon::AudioOff => "icons/speaker_off.svg",Icon::AudioOn => "icons/speaker_loud.svg",