Remove the site-setup "Back to goals" affordances - #112478
Conversation
Ahead of removing the site-setup goals step, remove the UI affordances that navigate to it: the importer not-authorized "Start building" CTA and its goToGoalsPage navigator, the WordPress content-import error "Back to goals" button, and the import-ready "can't import" / "already on WordPress.com" screens' "Back to goals" buttons. Also drop the now-unused ErrorMessage secondary-button surface and the dead generateStepPath 'goals' case. The goals step itself is removed in a follow-up; this PR only removes the inbound navigation to it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Jetpack Cloud Live (direct link)
Automattic for Agencies Live (direct link)
Dashboard Live (dotcom) (direct link)
|
|
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~12 bytes removed 📉 [gzipped]) DetailsSections 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. Generated by performance advisor bot at iscalypsofastyet.com. |
With the "Back to goals" buttons gone, the "can't be imported" and "already on WordPress.com" screens' only action is "Back to start", which returns to import capture. Update the subtitles to suggest trying a different site/address instead of building a new one. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The goals step is being retired, so nothing should route to it. The design picker and import capture steps used it as their back target; with it gone they have no in-flow step to return to, so they leave goBack undefined and Stepper falls back to browser history rather than the removed step. The remaining goBack/goNext fallbacks that pointed at goals now exit to the site home. The design picker renders a Back affordance only when a handler is actually supplied, so it no longer shows a dead button. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
28121b6 to
303656f
Compare
These are the flow's entry steps, so there is nothing to go back to. Leaving the flow's goBack undefined is not enough: Stepper's navigation wrapper adds an automatic history-back button whenever the referrer is same-origin, and clicking it just leaves the flow. Suppress it at the step instead — the design picker returns no back handler in Site Setup, and the import capture passes hideBack to its step container. The shared import wrapper keeps its Back button for the "ready" screens, which still return to capture. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/34260667 Some locales (Brazilian Portuguese, Hebrew) have been temporarily machine-translated due to translator availability. All other translations are usually ready within a few days. Untranslated and machine-translated strings will be sent for translation next Monday and are expected to be completed by the following Friday. Hi @taipeicoder, could you please edit the description of this PR and add a screenshot for our translators? Ideally it'd include all of the following strings:
Thank you in advance! |
Proposed Changes
goalsstep, ahead of removing the step itself:goToGoalsPagenavigator),ErrorMessagesecondary-button surface and the deadgenerateStepPath('goals')case.Why are these changes being made?
This is a precursor to removing the dead site-setup
goalsstep. Splitting the inbound navigation removal out first keeps that follow-up a clean delete with nothing pointing at the step. Thegoalsstep itself is unchanged in this PR.Testing Instructions
Pre-merge Checklist