Skip to content

Add blueprint blogname support for site name default#2563

Merged
sejas merged 5 commits intotrunkfrom
stu-832-studio-add-support-for-blueprints-blogname
Feb 12, 2026
Merged

Add blueprint blogname support for site name default#2563
sejas merged 5 commits intotrunkfrom
stu-832-studio-add-support-for-blueprints-blogname

Conversation

@sejas
Copy link
Member

@sejas sejas commented Feb 10, 2026

Related issues

Proposed Changes

  • Extract blogname from setSiteOptions blueprint steps and use it as the default site name in the add-site form. Follows the same pattern as blueprintSuggestedDomain for custom domains. The name syncs back to the blueprint on submit so the user's changes are preserved.
  • Improves the reset logic when a user clicks back and starts a new flow to avoid leaking the site name between flows.

Testing Instructions

Automated Tests

npm test -- common/lib/tests/blueprint-settings.test.ts src/modules/add-site/hooks/tests/use-blueprint-deeplink.test.tsx

Manual Tests

1. Catalog blueprint with blogname

  1. Create a test blueprint JSON file with a setSiteOptions step:
    {
      "$schema": "https://playground.wordpress.net/blueprint-schema.json",
      "steps": [
        {
          "step": "setSiteOptions",
          "options": {
            "blogname": "My Custom Blog"
          }
        }
      ]
    }

blueprint-name-1.json

  1. Open Studio and click Add site
  2. Select Start with a Blueprint
  3. Click on "Choose Blueprint file" and select the JSON file above
  4. Click Continue
  5. Verify: The site name field shows "My Custom Blog"
  6. Open advance settings and confirm the path is the name slugified
  7. Change the name to something else (e.g. "Renamed Blog")
  8. Click Add site
  9. Verify: The site is created with the name "Renamed Blog" (user override is respected)
  10. If the site name or path already exist, then the name will append a sequential number like My Custom Blog2

BEFORE

blueprint-name-trunk.mp4

AFTER

blueprint-name-after.mp4

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

Extract blogname from setSiteOptions blueprint steps and use it as the
default site name in the add-site form. Follows the same pattern as
blueprintSuggestedDomain for custom domains. The name syncs back to the
blueprint on submit so the user's changes are preserved.
@sejas sejas self-assigned this Feb 10, 2026
@sejas sejas marked this pull request as ready for review February 11, 2026 18:51
@sejas sejas requested a review from a team February 11, 2026 18:51
@wpmobilebot
Copy link
Collaborator

📊 Performance Test Results

Comparing c3387d5 vs trunk

site-editor

Metric trunk c3387d5 Diff Change
load 2719.00 ms 2727.00 ms +8.00 ms ⚪ 0.0%

site-startup

Metric trunk c3387d5 Diff Change
siteCreation 7073.00 ms 7100.00 ms +27.00 ms ⚪ 0.0%
siteStartup 3922.00 ms 3925.00 ms +3.00 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

Copy link
Contributor

@nightnei nightnei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes LGTM and it works es expected 👍

Copy link
Contributor

@gcsecsey gcsecsey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sejas, these changes LGTM and work well.

When adding the Blueprint that sets the name, the fields are set correctly:

Image

When trying to add a second site with the same Blueprint, the pathname gets a counter:

Image

@sejas sejas merged commit ab973a1 into trunk Feb 12, 2026
9 checks passed
@sejas sejas deleted the stu-832-studio-add-support-for-blueprints-blogname branch February 12, 2026 15:42
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.

4 participants