debugger: Unify landing state for new session modal (#30046)

Closes #ISSUE

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2025-05-07 00:27:50 +02:00 committed by GitHub
parent cec1d2584b
commit bbffe1ec2c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 58 additions and 101 deletions

View file

@ -629,9 +629,7 @@ impl Render for NewSessionModal {
),
)
.justify_between()
.when(!matches!(self.mode, NewSessionMode::Scenario(_)), |this| {
this.children(self.adapter_drop_down_menu(window, cx))
})
.children(self.adapter_drop_down_menu(window, cx))
.border_color(cx.theme().colors().border_variant)
.border_b_1(),
)
@ -644,7 +642,15 @@ impl Render for NewSessionModal {
.border_color(cx.theme().colors().border_variant)
.border_t_1()
.w_full()
.child(self.debug_config_drop_down_menu(window, cx))
.child(
matches!(self.mode, NewSessionMode::Scenario(_))
.not()
.then(|| {
self.debug_config_drop_down_menu(window, cx)
.into_any_element()
})
.unwrap_or_else(|| v_flex().w_full().into_any_element()),
)
.child(
h_flex()
.justify_end()