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 07:05:25 +00:00
committed by GitHub
parent b85492bd00
commit 35ec4753b4
14 changed files with 181 additions and 294 deletions
+2 -2
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| {