Make a single re-usable banner component (#27412)

Release Notes:

- Fixed an issue where both the predict edit and git onboarding banners
would both show at the same time.
This commit is contained in:
Mikayla Maki 2025-03-25 00:05:25 -07:00 committed by GitHub
parent b85492bd00
commit 35ec4753b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 181 additions and 294 deletions

View file

@ -122,6 +122,7 @@ theme.workspace = true
theme_extension.workspace = true
theme_selector.workspace = true
time.workspace = true
title_bar.workspace = true
toolchain_selector.workspace = true
ui.workspace = true
ui_prompt.workspace = true

View file

@ -65,12 +65,12 @@ use uuid::Uuid;
use vim_mode_setting::VimModeSetting;
use welcome::{BaseKeymap, MultibufferHint};
use workspace::notifications::{dismiss_app_notification, show_app_notification, NotificationId};
use workspace::CloseIntent;
use workspace::{
create_and_open_local_file, notifications::simple_message_notification::MessageNotification,
open_new, AppState, NewFile, NewWindow, OpenLog, Toast, Workspace, WorkspaceSettings,
};
use workspace::{notifications::DetachAndPromptErr, Pane};
use workspace::{CloseIntent, RestoreBanner};
use zed_actions::{
OpenAccountSettings, OpenBrowser, OpenServerSettings, OpenSettings, OpenZedUrl, Quit,
};
@ -105,6 +105,8 @@ pub fn init(cx: &mut App) {
cx.on_action(|_: &ShowAll, cx| cx.unhide_other_apps());
cx.on_action(quit);
cx.on_action(|_: &RestoreBanner, cx| title_bar::restore_banner(cx));
if ReleaseChannel::global(cx) == ReleaseChannel::Dev {
cx.on_action(test_panic);
}