Skip to content

Remove the site-setup "Back to goals" affordances - #112478

Merged
taipeicoder merged 4 commits into
trunkfrom
remove/site-setup-goals-back-buttons
Jul 10, 2026
Merged

Remove the site-setup "Back to goals" affordances#112478
taipeicoder merged 4 commits into
trunkfrom
remove/site-setup-goals-back-buttons

Conversation

@taipeicoder

Copy link
Copy Markdown
Contributor

Proposed Changes

  • Remove the UI affordances that navigate to the site-setup goals step, ahead of removing the step itself:
    • the importer not-authorized "Start building" CTA (and its goToGoalsPage navigator),
    • the WordPress content-import error "Back to goals" button,
    • the import-ready "can't be imported" and "already on WordPress.com" screens' "Back to goals" buttons.
  • Remove the now-unused ErrorMessage secondary-button surface and the dead generateStepPath('goals') case.

Why are these changes being made?

This is a precursor to removing the dead site-setup goals step. Splitting the inbound navigation removal out first keeps that follow-up a clean delete with nothing pointing at the step. The goals step itself is unchanged in this PR.

Testing Instructions

  • Type-check and lint pass. The importer not-authorized and error screens, and the import-ready screens, no longer offer a "Back to goals" / "Start building" action; their remaining actions ("Back to start", "Try again") are unchanged.

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?
  • For UI changes, have you tested the affected components in dark mode?
  • Have you tested accessibility for your changes?
  • Have you used memoizing on expensive computations?
  • 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)?

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>
@taipeicoder taipeicoder self-assigned this Jul 9, 2026
@matticbot

matticbot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

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

Sections (~12 bytes removed 📉 [gzipped])

Details
name                 parsed_size           gzip_size
site-migration-flow        -42 B  (-0.1%)      -12 B  (-0.1%)
site-setup-flow            +16 B  (+0.0%)       +0 B

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 and others added 2 commits July 9, 2026 21:57
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>
@taipeicoder
taipeicoder force-pushed the remove/site-setup-goals-back-buttons branch from 28121b6 to 303656f Compare July 10, 2026 00:05
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>
@taipeicoder
taipeicoder marked this pull request as ready for review July 10, 2026 00:35
@taipeicoder
taipeicoder added this pull request to the merge queue Jul 10, 2026
Merged via the queue into trunk with commit 572454a Jul 10, 2026
10 checks passed
@taipeicoder
taipeicoder deleted the remove/site-setup-goals-back-buttons branch July 10, 2026 01:13
@a8ci18n

a8ci18n commented Jul 10, 2026

Copy link
Copy Markdown

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:

  • Unfortunately, your content is on a platform that we don't yet support. Try a different site.
  • It looks like <strong>%(website)s</strong> is already on WordPress.com. Try a different address.

Thank you in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants