diff --git a/crates/feature_flags/src/feature_flags.rs b/crates/feature_flags/src/feature_flags.rs index a5dbef424f..a2864e0736 100644 --- a/crates/feature_flags/src/feature_flags.rs +++ b/crates/feature_flags/src/feature_flags.rs @@ -64,6 +64,12 @@ impl FeatureFlag for PredictEditsFeatureFlag { const NAME: &'static str = "predict-edits"; } +/// A feature flag that controls things that shouldn't go live until the predictive edits launch. +pub struct PredictEditsLaunchFeatureFlag; +impl FeatureFlag for PredictEditsLaunchFeatureFlag { + const NAME: &'static str = "predict-edits-launch"; +} + pub struct PredictEditsRateCompletionsFeatureFlag; impl FeatureFlag for PredictEditsRateCompletionsFeatureFlag { const NAME: &'static str = "predict-edits-rate-completions"; diff --git a/crates/zeta/src/onboarding_modal.rs b/crates/zeta/src/onboarding_modal.rs index 435b8be5fc..9d7ad41a05 100644 --- a/crates/zeta/src/onboarding_modal.rs +++ b/crates/zeta/src/onboarding_modal.rs @@ -66,7 +66,7 @@ impl ZedPredictModal { } fn view_blog(&mut self, _: &ClickEvent, _: &mut Window, cx: &mut Context) { - cx.open_url("https://zed.dev/blog/"); // TODO Add the link when live + cx.open_url("https://zed.dev/blog/edit-predictions"); cx.notify(); onboarding_event!("Blog Link clicked"); @@ -272,19 +272,16 @@ impl Render for ZedPredictModal { )), )); - let blog_post_button = if cx.is_staff() { - Some( + let blog_post_button = cx + .has_flag::() + .then(|| { Button::new("view-blog", "Read the Blog Post") .full_width() .icon(IconName::ArrowUpRight) .icon_size(IconSize::Indicator) .icon_color(Color::Muted) - .on_click(cx.listener(Self::view_blog)), - ) - } else { - // TODO: put back when blog post is published - None - }; + .on_click(cx.listener(Self::view_blog)) + }); if self.user_store.read(cx).current_user().is_some() { let copy = match self.sign_in_status {