Skip to content

Conversation

@ivan-ottinger
Copy link
Contributor

@ivan-ottinger ivan-ottinger commented Nov 27, 2025

Related issues

Proposed Changes

  • add warning notice to the blueprint deeplink flow if the related blueprint includes unsupported features
  • extract out BlueprintWarningNotice and BlueprintIssuesModal components into separate file
  • adjust related unit tests
CleanShot 2025-11-27 at 14 27 56@2x

Testing Instructions

  1. Check out the PR branch and build the app with npm install && npm start.
  2. Try to open a blueprint deeplink that has some unsupported features, e.g.:
wp-studio://add-site?blueprint=eyJtZXRhIjp7InRpdGxlIjoiVGhpcyBpcyBhIHRlc3QgYmx1ZXByaW50IiwiZGVzY3JpcHRpb24iOiJJdCBpbnN0YWxscyBBc3RyYSB0aGVtZSBhbmQgWW9hc3QgU0VPIHBsdWdpbiIsImF1dGhvciI6Iml2YW4iLCJjYXRlZ29yaWVzIjpbInJzcyIsInNvY2lhbCB3ZWIiXX0sInByZWZlcnJlZFZlcnNpb25zIjp7InBocCI6IjguMyIsIndwIjoibGF0ZXN0In0sInN0ZXBzIjpbeyJzdGVwIjoiaW5zdGFsbFRoZW1lIiwidGhlbWVEYXRhIjp7InJlc291cmNlIjoid29yZHByZXNzLm9yZy90aGVtZXMiLCJzbHVnIjoiYXN0cmEifSwib3B0aW9ucyI6eyJhY3RpdmF0ZSI6dHJ1ZX19LHsic3RlcCI6Imluc3RhbGxQbHVnaW4iLCJwbHVnaW5EYXRhIjp7InJlc291cmNlIjoid29yZHByZXNzLm9yZy9wbHVnaW5zIiwic2x1ZyI6IndvcmRwcmVzcy1zZW8ifSwib3B0aW9ucyI6eyJhY3RpdmF0ZSI6dHJ1ZX19LHsic3RlcCI6ImxvZ2luIiwidXNlcm5hbWUiOiJhZG1pbiIsInBhc3N3b3JkIjoicGFzc3dvcmQifV19
  1. The blueprint deeplink flow should start and display the related warning in the modal (as can be seen in the screenshot above). The warning should render correctly and open up details without any issues.
  2. Close the flow and try to add a new site with the existing blueprint flow. Select one of the blueprint files that has unsupported features from 39a4e-pb (e.g. blueprint-portfolio-v1.json).
  3. Similarly as in the deeplink flow, the warning should render correctly and open up details without any issues.

Pre-merge Checklist

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

@ivan-ottinger ivan-ottinger self-assigned this Nov 27, 2025
@ivan-ottinger ivan-ottinger changed the title Add blueprint validation warnings display to deeplink flow Blueprints: Add validation warning display to the deeplink flow Nov 27, 2025
@ivan-ottinger ivan-ottinger marked this pull request as ready for review November 27, 2025 13:30
@ivan-ottinger ivan-ottinger requested a review from a team November 27, 2025 13:30
@github-actions
Copy link
Contributor

📊 Performance Test Results

Comparing a1fb2db vs trunk

site-editor

Metric trunk a1fb2db Diff Change
load 13762.00 ms 12183.00 ms -1579.00 ms 🟢 -11.5%

site-startup

Metric trunk a1fb2db Diff Change
siteCreation 25320.00 ms 25411.00 ms +91.00 ms 🔴 0.4%
siteStartup 9008.00 ms 9018.00 ms +10.00 ms 🔴 0.1%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change

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 @ivan-ottinger, this refactor is really solid IMO. I tested opening Blueprints with unsupported features, and also tested uploading Blueprints in the earlier flow. Everything works as described. 👍

I only have minor, non-blocking comments.

Comment on lines +28 to +37
<Heading className="text-center text-[32px] text-gray-900 mb-[59px]" weight={ 500 }>
{ __( 'Start from a Blueprint' ) }
</Heading>

<BlueprintWarningNotice
warnings={ warnings }
fileName={ blueprintTitle }
className="w-full max-w-4xl mx-auto mb-4"
/>

Copy link
Contributor

@gcsecsey gcsecsey Nov 27, 2025

Choose a reason for hiding this comment

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

Let's use the same mb-5 rule on the Heading as in blueprints.tsx to make these pages consistent. We could also increase the bottom margin on the notice itself to a mb-6 to make the layout more consistent.

PR Suggestion Start from Blueprint
Image Image Image
Suggested change
<Heading className="text-center text-[32px] text-gray-900 mb-5" weight={ 500 }>
{ __( 'Start from a Blueprint' ) }
</Heading>
<BlueprintWarningNotice
warnings={ warnings }
fileName={ blueprintTitle }
className="w-full max-w-4xl mx-auto mb-6"
/>

description?: string;
};

type BlueprintWarning = { feature: string; reason: string };
Copy link
Contributor

Choose a reason for hiding this comment

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

WDYT about moving this to a shared place, eg. to blueprint-validation.tsx, and reuse it in BlueprintValidationSuccess and for all other occurences in this PR where we specify { feature: string; reason: string; }?

Copy link
Contributor

@gavande1 gavande1 left a comment

Choose a reason for hiding this comment

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

Thanks @ivan-ottinger for adding warnings. I have tested and It looks great. LGTM 👍

Image

We definitely need to do something about the modal in terms of designs. Let's add a task to revisit the designs as soon as we have them. But before that, do you think it makes sense to make some changes to improve it even without the designs? Currently, it looks a bit cramped.

Image

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