Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stepper Onboarding: Add logic to skip submit step event #95224

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

agrullon95
Copy link
Contributor

@agrullon95 agrullon95 commented Oct 8, 2024

Fixes: #95125

Proposed Changes

  • Adds logic to allow skipping calypso_signup_actions_submit_step event

Why are these changes being made?

  • Allows us to skip the event if necessary like in the use-my-domain step. The event should only fire after submitting on final screen for that step.

Testing Instructions

  • Checkout branch or use live link
  • Navigate to /setup/onboarding.
  • Open the Chrome dev tools Network tab and filter by calypso_signup_actions_submit_step
  • Click on the Use a domain I own link.
  • Enter a domain in the input field and verify that the calypso_signup_actions_submit_step is NOT triggered.
  • Click the Transfer your domain and Connect your domain options by clicking Select and verify the calypso_signup_actions_submit_step for both scenarios.

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@agrullon95 agrullon95 requested a review from a team as a code owner October 8, 2024 15:45
@matticbot matticbot added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Oct 8, 2024
@matticbot
Copy link
Contributor

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

App Entrypoints (~24 bytes added 📈 [gzipped])

name           parsed_size           gzip_size
entry-stepper        +25 B  (+0.0%)      +24 B  (+0.0%)

Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

@agrullon95 agrullon95 self-assigned this Oct 9, 2024
@@ -54,11 +54,13 @@ export const useStepNavigationWithTracking = ( {
() => ( {
...( stepNavigation.submit && {
submit: ( providedDependencies: ProvidedDependencies = {}, ...params: string[] ) => {
Copy link
Contributor Author

@agrullon95 agrullon95 Oct 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This event triggers every time you call the submit function, which is why the calypso_signup_actions_submit_step event is triggered multiple times within the use-my-domain component.

@agrullon95 agrullon95 requested review from a team, skim1220 and MicBosi October 9, 2024 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

calypso_signup_start fires when clicking on Use My Domain
2 participants