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

@ -386,17 +386,10 @@ fn render_accept_terms(
let form = v_flex()
.w_full()
.gap_2()
.when(
view_kind == LanguageModelProviderTosView::ThreadEmptyState,
|form| form.items_center(),
)
.child(
h_flex()
.flex_wrap()
.when(
view_kind == LanguageModelProviderTosView::ThreadEmptyState,
|form| form.justify_center(),
)
.items_start()
.child(Label::new(text))
.child(terms_button),
)
@ -416,9 +409,11 @@ fn render_accept_terms(
);
match view_kind {
LanguageModelProviderTosView::ThreadEmptyState => button_container.justify_center(),
LanguageModelProviderTosView::PromptEditorPopup => button_container.justify_end(),
LanguageModelProviderTosView::Configuration => button_container.justify_start(),
LanguageModelProviderTosView::Configuration
| LanguageModelProviderTosView::ThreadEmptyState => {
button_container.justify_start()
}
}
});