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

@ -9,7 +9,7 @@ use git::{
};
use git_panel_settings::GitPanelSettings;
use gpui::{actions, App, FocusHandle};
use onboarding::{clear_dismissed, GitOnboardingModal};
use onboarding::GitOnboardingModal;
use project_diff::ProjectDiff;
use ui::prelude::*;
use workspace::Workspace;
@ -103,7 +103,7 @@ pub fn init(cx: &mut App) {
},
);
workspace.register_action(move |_, _: &ResetOnboarding, window, cx| {
clear_dismissed(cx);
cx.dispatch_action(&workspace::RestoreBanner);
window.refresh();
});
workspace.register_action(|workspace, _action: &git::Init, window, cx| {