-
Notifications
You must be signed in to change notification settings - Fork 2k
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: Do not clear flowName in step-route tracker #97369
Conversation
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~30 bytes removed 📉 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~83 bytes removed 📉 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Async-loaded Components (~74 bytes removed 📉 [gzipped])
React components that are loaded lazily, when a certain part of UI is displayed for the first time. 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. Generated by performance advisor bot at iscalypsofastyet.com. |
|
@alshakero cart-items.ts:688 Uncaught TypeError: Cannot read properties of undefined (reading 'product_slug')
at shouldBundleDomainWithPlan (cart-items.ts:688:54)
at getDomainPriceRule (cart-items.ts:756:7)
at DomainRegistrationSuggestion.getPriceRule (index.jsx:237:98)
at DomainRegistrationSuggestion.render (index.jsx:429:23)
at finishClassComponent (react-dom.development.js:19776:31)
at updateClassComponent (react-dom.development.js:19722:24)
at beginWork (react-dom.development.js:21645:16)
at HTMLUnknownElement.callCallback (react-dom.development.js:4164:14)
at Object.invokeGuardedCallbackDev (react-dom.development.js:4213:16)
at invokeGuardedCallback (react-dom.development.js:4277:31)Understand this errorAI
2hook.js:608 The above error occurred in the <DomainRegistrationSuggestion> component:
at DomainRegistrationSuggestion (app:///./components/domains/domain-registration-suggestion/index.jsx:68:5)
at eval (app:///../packages/i18n-calypso/src/localize.js:32:67)
at ConnectFunction (app:///../node_modules/react-redux/dist/react-redux.mjs:876:74)
at div
at FeaturedDomainSuggestions (app:///./components/domains/featured-domain-suggestions/index.jsx:31:1)
at eval (app:///../packages/i18n-calypso/src/localize.js:32:67)
at div
at div
at DomainSearchResults (app:///./components/domains/domain-search-results/index.jsx:62:5)
at eval (app:///../packages/i18n-calypso/src/localize.js:32:67)
at ConnectFunction (app:///../node_modules/react-redux/dist/react-redux.mjs:876:74)
at div
at RegisterDomainStep (app:///./components/domains/register-domain-step/index.jsx:130:5)
at eval (app:///../packages/i18n-calypso/src/localize.js:32:67)
at ShoppingCartWrapper (app:///../packages/shopping-cart/src/with-shopping-cart.tsx:18:74)
at CartKeyWrapper (app:///./my-sites/checkout/with-cart-key.tsx:16:78)
at ConnectFunction (app:///../node_modules/react-redux/dist/react-redux.mjs:876:74)
at div
at div
at div
at div
at StepContainer (app:///../packages/onboarding/src/step-container/index.tsx:25:3)
at Suspense
at AsyncLoad (app:///./components/async-load/index.tsx:20:3)
at RenderDomainsStep (app:///./signup/steps/domains/index.jsx:117:5)
at eval (app:///../packages/i18n-calypso/src/localize.js:32:67)
at ShoppingCartWrapper (app:///../packages/shopping-cart/src/with-shopping-cart.tsx:18:74)
at CartKeyWrapper (app:///./my-sites/checkout/with-cart-key.tsx:16:78)
at ConnectFunction (app:///../node_modules/react-redux/dist/react-redux.mjs:876:74)
at ShoppingCartProvider (app:///../packages/shopping-cart/src/shopping-cart-provider.tsx:23:3)
at CalypsoShoppingCartProvider (app:///./my-sites/checkout/calypso-shopping-cart-provider.tsx:26:3)
at DomainsStep (app:///./landing/stepper/declarative-flow/internals/steps-repository/unified-domains/index.tsx:107:115)
at div
at StepRoute (app:///./landing/stepper/declarative-flow/internals/components/step-route/index.tsx:32:3)
at RenderedRoute (app:///../node_modules/react-router/dist/index.js:577:5)
at Routes (app:///../node_modules/react-router/dist/index.js:1267:5)
at Suspense
at Boot (app:///./landing/stepper/declarative-flow/internals/components/boot/index.tsx:20:3)
at FlowRenderer (app:///./landing/stepper/declarative-flow/internals/index.tsx:97:3)
at FlowSwitch (app:///./landing/stepper/index.tsx:102:3)
at Router (app:///../node_modules/react-router/dist/index.js:1201:15)
at BrowserRouter (app:///../node_modules/react-router-dom/dist/index.js:697:5)
at QueryClientProvider (app:///../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js:26:3)
at Provider (app:///../node_modules/react-redux/dist/react-redux.mjs:1053:3)
at I18nProvider (app:///../node_modules/@wordpress/react-i18n/build-module/index.js:62:5)
at LocaleProvider (app:///../packages/i18n-utils/src/locale-context.tsx:31:3)
at CalypsoI18nProvider (app:///./components/calypso-i18n-provider/index.tsx:25:3)
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.
overrideMethod @ hook.js:608Understand this errorAI
8hook.js:608 The above error occurred in the <DomainRegistrationSuggestion> component:
at DomainRegistrationSuggestion (app:///./components/domains/domain-registration-suggestion/index.jsx:68:5)
at eval (app:///../packages/i18n-calypso/src/localize.js:32:67)
at ConnectFunction (app:///../node_modules/react-redux/dist/react-redux.mjs:876:74)
at div
at div
at DomainSearchResults (app:///./components/domains/domain-search-results/index.jsx:62:5)
at eval (app:///../packages/i18n-calypso/src/localize.js:32:67)
at ConnectFunction (app:///../node_modules/react-redux/dist/react-redux.mjs:876:74)
at div
at RegisterDomainStep (app:///./components/domains/register-domain-step/index.jsx:130:5)
at eval (app:///../packages/i18n-calypso/src/localize.js:32:67)
at ShoppingCartWrapper (app:///../packages/shopping-cart/src/with-shopping-cart.tsx:18:74)
at CartKeyWrapper (app:///./my-sites/checkout/with-cart-key.tsx:16:78)
at ConnectFunction (app:///../node_modules/react-redux/dist/react-redux.mjs:876:74)
at div
at div
at div
at div
at StepContainer (app:///../packages/onboarding/src/step-container/index.tsx:25:3)
at Suspense
at AsyncLoad (app:///./components/async-load/index.tsx:20:3)
at RenderDomainsStep (app:///./signup/steps/domains/index.jsx:117:5)
at eval (app:///../packages/i18n-calypso/src/localize.js:32:67)
at ShoppingCartWrapper (app:///../packages/shopping-cart/src/with-shopping-cart.tsx:18:74)
at CartKeyWrapper (app:///./my-sites/checkout/with-cart-key.tsx:16:78)
at ConnectFunction (app:///../node_modules/react-redux/dist/react-redux.mjs:876:74)
at ShoppingCartProvider (app:///../packages/shopping-cart/src/shopping-cart-provider.tsx:23:3)
at CalypsoShoppingCartProvider (app:///./my-sites/checkout/calypso-shopping-cart-provider.tsx:26:3)
at DomainsStep (app:///./landing/stepper/declarative-flow/internals/steps-repository/unified-domains/index.tsx:107:115)
at div
at StepRoute (app:///./landing/stepper/declarative-flow/internals/components/step-route/index.tsx:32:3)
at RenderedRoute (app:///../node_modules/react-router/dist/index.js:577:5)
at Routes (app:///../node_modules/react-router/dist/index.js:1267:5)
at Suspense
at Boot (app:///./landing/stepper/declarative-flow/internals/components/boot/index.tsx:20:3)
at FlowRenderer (app:///./landing/stepper/declarative-flow/internals/index.tsx:97:3)
at FlowSwitch (app:///./landing/stepper/index.tsx:102:3)
at Router (app:///../node_modules/react-router/dist/index.js:1201:15)
at BrowserRouter (app:///../node_modules/react-router-dom/dist/index.js:697:5)
at QueryClientProvider (app:///../node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js:26:3)
at Provider (app:///../node_modules/react-redux/dist/react-redux.mjs:1053:3)
at I18nProvider (app:///../node_modules/@wordpress/react-i18n/build-module/index.js:62:5)
at LocaleProvider (app:///../packages/i18n-utils/src/locale-context.tsx:31:3)
at CalypsoI18nProvider (app:///./components/calypso-i18n-provider/index.tsx:25:3)
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.
overrideMethod @ hook.js:608Understand this errorAI
react-dom.development.js:26957 Uncaught TypeError: Cannot read properties of undefined (reading 'product_slug')
at shouldBundleDomainWithPlan (cart-items.ts:688:54)
at getDomainPriceRule (cart-items.ts:756:7)
at DomainRegistrationSuggestion.getPriceRule (index.jsx:237:98)
at DomainRegistrationSuggestion.render (index.jsx:429:23)
at finishClassComponent (react-dom.development.js:19776:31)
at updateClassComponent (react-dom.development.js:19722:24)
at beginWork (react-dom.development.js:21645:16)
at beginWork$1 (react-dom.development.js:27460:14)
at performUnitOfWork (react-dom.development.js:26591:12)
at workLoopSync (react-dom.development.js:26500:5) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't complete the test instructions.
Hi @gabrielcaires. Thank you for testing, I somehow missed this issue. It should be good now. |
Hi @gabrielcaires, would really apprecite a spin 🙏🏼 |
@alshakero I find that if I have the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's gooo
Fixes #97077
Proposed Changes
This keeps the flow name persisted after reading it in step-route-tracking hook. This hook assumed it was the only part of the code that relied on this value and this deleted it. This corrects that assumption.
Why are these changes being made?
To prevent sites from being recreated when coming back from checkout to domains step.
Testing Instructions
Regression testing
@daledupreez would really appreciate it if you can take a look. I'm curious to find out if you picked the
andClear
variants for a reason.