| @@ -183,6 +183,7 @@ impl ZedAiOnboarding { · 182 unmodified lines |
| 183 | .full_width() | 183 | .full_width() |
| 184 | .style(ButtonStyle::Tinted(ui::TintColor::Accent)) | 184 | .style(ButtonStyle::Tinted(ui::TintColor::Accent)) |
| 185 | .on_click(move |_, _window, cx| { | 185 | .on_click(move |_, _window, cx| { |
| | 186 | telemetry::event!("Upgrade To Pro Clicked", state = "young-account"); |
| 186 | cx.open_url(&zed_urls::upgrade_to_zed_pro_url(cx)) | 187 | cx.open_url(&zed_urls::upgrade_to_zed_pro_url(cx)) |
| 187 | }), | 188 | }), |
| 188 | ) | 189 | ) |
| @@ -210,6 +211,7 @@ impl ZedAiOnboarding { · 21 unmodified lines |
| 210 | .full_width() | 211 | .full_width() |
| 211 | .style(ButtonStyle::Tinted(ui::TintColor::Accent)) | 212 | .style(ButtonStyle::Tinted(ui::TintColor::Accent)) |
| 212 | .on_click(move |_, _window, cx| { | 213 | .on_click(move |_, _window, cx| { |
| | 214 | telemetry::event!("Start Trial Clicked", state = "post-sign-in"); |
| 213 | cx.open_url(&zed_urls::start_trial_url(cx)) | 215 | cx.open_url(&zed_urls::start_trial_url(cx)) |
| 214 | }), | 216 | }), |
| 215 | ) | 217 | ) |
| @@ -234,7 +236,10 @@ impl ZedAiOnboarding { · 18 unmodified lines |
| 234 | .icon(IconName::ArrowUpRight) | 236 | .icon(IconName::ArrowUpRight) |
| 235 | .icon_color(Color::Muted) | 237 | .icon_color(Color::Muted) |
| 236 | .icon_size(IconSize::XSmall) | 238 | .icon_size(IconSize::XSmall) |
| 237 | .on_click(move |_, _window, cx| cx.open_url(&zed_urls::terms_of_service(cx))), | 239 | .on_click(move |_, _window, cx| { |
| | 240 | telemetry::event!("Review Terms of Service Click"); |
| | 241 | cx.open_url(&zed_urls::terms_of_service(cx)) |
| | 242 | }), |
| 238 | ) | 243 | ) |
| 239 | .child( | 244 | .child( |
| 240 | Button::new("accept_terms", "Accept") | 245 | Button::new("accept_terms", "Accept") |
| @@ -242,7 +247,9 @@ impl ZedAiOnboarding { · 1 unmodified line |
| 242 | .style(ButtonStyle::Tinted(TintColor::Accent)) | 247 | .style(ButtonStyle::Tinted(TintColor::Accent)) |
| 243 | .on_click({ | 248 | .on_click({ |
| 244 | let callback = self.accept_terms_of_service.clone(); | 249 | let callback = self.accept_terms_of_service.clone(); |
| 245 | move |_, window, cx| (callback)(window, cx) | 250 | move |_, window, cx| { |
| | 251 | telemetry::event!("Accepted Terms of Service"); |
| | 252 | (callback)(window, cx)} |
| 246 | }), | 253 | }), |
| 247 | ) | 254 | ) |
| 248 | .into_any_element() | 255 | .into_any_element() |
| @@ -267,7 +274,10 @@ impl ZedAiOnboarding { · 18 unmodified lines |
| 267 | .style(ButtonStyle::Tinted(ui::TintColor::Accent)) | 274 | .style(ButtonStyle::Tinted(ui::TintColor::Accent)) |
| 268 | .on_click({ | 275 | .on_click({ |
| 269 | let callback = self.sign_in.clone(); | 276 | let callback = self.sign_in.clone(); |
| 270 | move |_, window, cx| callback(window, cx) | 277 | move |_, window, cx| { |
| | 278 | telemetry::event!("Start Trial Clicked", state = "pre-sign-in"); |
| | 279 | callback(window, cx) |
| | 280 | } |
| 271 | }), | 281 | }), |
| 272 | ) | 282 | ) |
| 273 | .into_any_element() | 283 | .into_any_element() |
| @@ -294,7 +304,13 @@ impl ZedAiOnboarding { · 20 unmodified lines |
| 294 | IconButton::new("dismiss_onboarding", IconName::Close) | 304 | IconButton::new("dismiss_onboarding", IconName::Close) |
| 295 | .icon_size(IconSize::Small) | 305 | .icon_size(IconSize::Small) |
| 296 | .tooltip(Tooltip::text("Dismiss")) | 306 | .tooltip(Tooltip::text("Dismiss")) |
| 297 | .on_click(move |_, window, cx| callback(window, cx)), | 307 | .on_click(move |_, window, cx| { |
| | 308 | telemetry::event!( |
| | 309 | "Banner Dismissed", |
| | 310 | source = "AI Onboarding", |
| | 311 | ); |
| | 312 | callback(window, cx) |
| | 313 | }), |
| 298 | ), | 314 | ), |
| 299 | ) | 315 | ) |
| 300 | }, | 316 | }, |
| @@ -331,7 +347,13 @@ impl ZedAiOnboarding { · 30 unmodified lines |
| 331 | IconButton::new("dismiss_onboarding", IconName::Close) | 347 | IconButton::new("dismiss_onboarding", IconName::Close) |
| 332 | .icon_size(IconSize::Small) | 348 | .icon_size(IconSize::Small) |
| 333 | .tooltip(Tooltip::text("Dismiss")) | 349 | .tooltip(Tooltip::text("Dismiss")) |
| 334 | .on_click(move |_, window, cx| callback(window, cx)), | 350 | .on_click(move |_, window, cx| { |
| | 351 | telemetry::event!( |
| | 352 | "Banner Dismissed", |
| | 353 | source = "AI Onboarding", |
| | 354 | ); |
| | 355 | callback(window, cx) |
| | 356 | }), |
| 335 | ), | 357 | ), |
| 336 | ) | 358 | ) |
| 337 | }, | 359 | }, |
| @@ -359,7 +381,10 @@ impl ZedAiOnboarding { · 21 unmodified lines |
| 359 | .style(ButtonStyle::Outlined) | 381 | .style(ButtonStyle::Outlined) |
| 360 | .on_click({ | 382 | .on_click({ |
| 361 | let callback = self.continue_with_zed_ai.clone(); | 383 | let callback = self.continue_with_zed_ai.clone(); |
| 362 | move |_, window, cx| callback(window, cx) | 384 | move |_, window, cx| { |
| | 385 | telemetry::event!("Banner Dismissed", source = "AI Onboarding"); |
| | 386 | callback(window, cx) |
| | 387 | } |
| 363 | }), | 388 | }), |
| 364 | ) | 389 | ) |
| 365 | .into_any_element() | 390 | .into_any_element() |