assistant2: Adjust empty state layout (#25745)

Going for a different, arguably simpler design for the Assistant 2 empty
state here. Also took the opportunity to adjust other elements like the
toolbar, message editor, and some items in the configuration page.

<img
src="https://github.com/user-attachments/assets/03fd1d48-a675-4eac-b694-bbe4eeaf06e9"
width="700px"/>

Release Notes:

- N/A
This commit is contained in:
Danilo Leal 2025-02-27 11:33:53 -03:00 committed by GitHub
parent 635b80ed51
commit 5c400dac8d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 189 additions and 139 deletions

View file

@ -38,6 +38,7 @@ pub struct ListItem {
children: SmallVec<[AnyElement; 2]>,
selectable: bool,
outlined: bool,
rounded: bool,
overflow_x: bool,
focused: Option<bool>,
}
@ -63,6 +64,7 @@ impl ListItem {
children: SmallVec::new(),
selectable: true,
outlined: false,
rounded: false,
overflow_x: false,
focused: None,
}
@ -147,6 +149,11 @@ impl ListItem {
self
}
pub fn rounded(mut self) -> Self {
self.rounded = true;
self
}
pub fn overflow_x(mut self) -> Self {
self.overflow_x = true;
self
@ -210,13 +217,13 @@ impl RenderOnce for ListItem {
})
})
})
.when(self.rounded, |this| this.rounded_md())
.child(
h_flex()
.id("inner_list_item")
.group("list_item")
.w_full()
.relative()
.items_center()
.gap_1()
.px(DynamicSpacing::Base06.rems(cx))
.map(|this| match self.spacing {