Merge branch 'main' into channel-guests

This commit is contained in:
Conrad Irwin 2024-01-05 10:02:22 -07:00
commit 3c0052850c
79 changed files with 3501 additions and 3265 deletions

View file

@ -646,8 +646,13 @@ impl Item for ProjectDiagnosticsEditor {
fn tab_content(&self, _detail: Option<usize>, selected: bool, _: &WindowContext) -> AnyElement {
if self.summary.error_count == 0 && self.summary.warning_count == 0 {
let label = Label::new("No problems");
label.into_any_element()
Label::new("No problems")
.color(if selected {
Color::Default
} else {
Color::Muted
})
.into_any_element()
} else {
h_stack()
.gap_1()
@ -1572,6 +1577,7 @@ mod tests {
workspace::init_settings(cx);
Project::init_settings(cx);
crate::init(cx);
editor::init(cx);
});
}

View file

@ -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 {