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

Design Picker: Rename step slug from designSetup to design-setup #100318

Open
wants to merge 3 commits into
base: trunk
Choose a base branch
from

Conversation

taipeicoder
Copy link
Contributor

@taipeicoder taipeicoder commented Feb 25, 2025

Fixes #100206

Proposed Changes

This PR replaces all instances of designSetup to design-setup. In addition, taking into account backwards compatibility, the following changes were also made:

  1. Ensure Tracks event still triggers for the previous step slug.
export const getStepOldSlug = ( stepSlug: string ): string | undefined => {
	const stepSlugMap: Record< string, string > = {
		'create-site': 'site-creation-step',
+		'design-setup': 'designSetup',
	};

	return stepSlugMap[ stepSlug ];
  1. Ensure previous URL is still accessible.
+	DESIGN_SETUP_LEGACY: {
+		slug: 'designSetup',
+		asyncComponent: () => import( './steps-repository/design-setup' ),
+	},

/setup/onboarding flow

Screen.Capture.on.2025-02-25.at.16-32-12.mp4

/setup/site-setup flow (head to /start?flags=-onboarding/force-goals-first)

Screen.Capture.on.2025-02-25.at.16-45-54.mp4

/setup/update-design

Screen.Capture.on.2025-02-25.at.16-49-50.mp4

/setup/import-focused flow

Screen.Capture.on.2025-02-25.at.17-17-04.mp4

Note

We will follow up updating the URL in wpcom and Jetpack in later PRs.

Why are these changes being made?

Stepper step slug consistency.

Testing Instructions

  • Ensure /setup/site-setup flow still works as intended
  • Ensure /setup/onboarding flow still works as intended
  • Ensure /setup/update-design flow still works as intended
  • Ensure /setup/import-focused flow still works as intended
  • In each of the flows above, replace design-setup with designSetup in the URL and ensure the flow still works

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 UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • 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)?

@matticbot
Copy link
Contributor

matticbot commented Feb 25, 2025

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

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

name           parsed_size           gzip_size
entry-stepper      +3717 B  (+0.3%)      +59 B  (+0.0%)

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

Sections (~50 bytes added 📈 [gzipped])

name                parsed_size           gzip_size
site-setup-wg             +67 B  (+0.0%)      +15 B  (+0.0%)
site-setup-flow           +67 B  (+0.0%)      +15 B  (+0.0%)
onboarding-flow           +64 B  (+0.0%)      +17 B  (+0.0%)
update-design-flow        +45 B  (+0.0%)      +13 B  (+0.0%)
import-flow               +38 B  (+0.0%)       +5 B  (+0.0%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

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.

@taipeicoder taipeicoder self-assigned this Feb 25, 2025
@taipeicoder taipeicoder marked this pull request as ready for review February 25, 2025 07:58
@taipeicoder taipeicoder requested a review from a team as a code owner February 25, 2025 07:58
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Feb 25, 2025
@taipeicoder taipeicoder requested review from a team February 25, 2025 07:58
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.

Design Picker: Rename route slug from designSetup to design-setup
2 participants