Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Private by default launch flow (#30242)
* merging conflicts * some cleanup * Launch site after completing all flow steps * Exclude steps for the site launch flow, if user has already made a domain or plan purchase * In the domain step, removing the free *.wordpress.com suggestion, and showing by default domain suggestions derived from siteSlug * Added a Skip button on the Domains step for users who don't want to purchase a domain for launching a site * 1. Copy change 2. Fixes an error of occasional domain step failure due to missing prevProps.selectedSite * Added customized header/sub-header for the domains and plans steps for those in the launch flow; Modified the CTA button copy in the plans step * Move launching to apiRequestFunction; remove infoNotices and success messages for launch * refactored addPlanToCart and addDomainToCart functions, consolidating the common code * Remove siteId dependency where not needed * removes siteID from providesDependenciesInQuery * Updating README * Some code cleanup * 1. Removed siteSlug as a providedDependency in steps, since it's already provided as a dependency in query 2. Removed delayApiRequestUntilComplete for steps that don't need to delay the API request 3. The launch site endpoint can accept a site id or slug, so removing site ID fetch from launchSiteApi() * Check if site has a domain or a plan from the state tree * Moved the domain check to state * Clarifying that the launch site API can take either an ID or slug * Use QuerySiteDomains component to force fetch site domains * Use QuerySiteDomains component to force fetch site domains * This revision now handles removing the plan step and domain step in the framework. In the launch flow, if the site has a domain or a paid plan, then the corresponding step is skipped. * In handleSkip() function for the domain step, removing a bunch of variables with undefined values since they are not needed to submit the signup step. Outcome: code is cleaner * i18n fixes - translator comments and rewording text * Refactored removeFulfilledSteps() function to make it generic and applicable to all steps. It also combines the functionality of submitQueryDependencies() * Removed submitQueryDependencies() function and some code cleanup * Removed stray console statements * Moving the lines for checking if a step is already fulfilled one level up * Change button text on Paid plans in the plan step for launch flow * Fixing a typo on a translator comment * i18n bot suggestion to reuse context * Use the destructured isLaunchPage variable * Removing unused variables * 1. If a step provides multiple dependencies, the entire step was getting excluded even if just one dependency was getting fulfilled. Introduced a change in which we exclude a step only if all of the dependencies it provides have been fulfilled 2. Added the isSiteTopicFulfilled callback to the site topic step of the preview flow * Add the site topic callback to the domain step only in the subdomain flow. This should hopefully fix the failing e2e test (though hacky) * Adding a site-topic step to the subdomain flow, so that it can fulfill the vertical query dependency * rename flow to launch-site
- Loading branch information