git: Add an onboarding and banner flow (#26518)

TODO:

- [ ] Hide the reset onboarding action (only useful for development,
uncomment:
https://github.com/zed-industries/zed/pull/26518/files#diff-f0ce01d9a3df30f60c64b6f9906c54aa0191246a58dbf5297ee321575a180879R96)
- [x] Get a designer to replace the modal background (@danilo-leal)

Release Notes:

- Added a small onboarding banner for the git launch

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
This commit is contained in:
Mikayla Maki 2025-03-12 09:17:47 -07:00 committed by GitHub
parent 5f74297576
commit 45b126a977
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 352 additions and 10 deletions

View file

@ -48,6 +48,7 @@ util.workspace = true
workspace.workspace = true
zed_actions.workspace = true
zeta.workspace = true
git_ui.workspace = true
[target.'cfg(windows)'.dependencies]
windows.workspace = true

View file

@ -18,6 +18,7 @@ use auto_update::AutoUpdateStatus;
use call::ActiveCall;
use client::{Client, UserStore};
use feature_flags::{FeatureFlagAppExt, ZedPro};
use git_ui::onboarding::GitBanner;
use gpui::{
actions, div, px, Action, AnyElement, App, Context, Decorations, Element, Entity,
InteractiveElement, Interactivity, IntoElement, MouseButton, ParentElement, Render, Stateful,
@ -126,6 +127,7 @@ pub struct TitleBar {
application_menu: Option<Entity<ApplicationMenu>>,
_subscriptions: Vec<Subscription>,
zed_predict_banner: Entity<ZedPredictBanner>,
git_banner: Entity<GitBanner>,
}
impl Render for TitleBar {
@ -210,6 +212,7 @@ impl Render for TitleBar {
)
.child(self.render_collaborator_list(window, cx))
.child(self.zed_predict_banner.clone())
.child(self.git_banner.clone())
.child(
h_flex()
.gap_1()
@ -313,6 +316,7 @@ impl TitleBar {
subscriptions.push(cx.observe(&user_store, |_, _, cx| cx.notify()));
let zed_predict_banner = cx.new(ZedPredictBanner::new);
let git_banner = cx.new(GitBanner::new);
Self {
platform_style,
@ -326,6 +330,7 @@ impl TitleBar {
client,
_subscriptions: subscriptions,
zed_predict_banner,
git_banner,
}
}