Skip to content

Fix Blueprint Version Warning Comparison - #2494

Merged
sejas merged 3 commits into
trunkfrom
stu-1265-ensure-the-warning-in-the-blueprint-advanced-settings
Jan 28, 2026
Merged

Fix Blueprint Version Warning Comparison#2494
sejas merged 3 commits into
trunkfrom
stu-1265-ensure-the-warning-in-the-blueprint-advanced-settings

Conversation

@sejas

@sejas sejas commented Jan 28, 2026

Copy link
Copy Markdown
Member

Related issues

Proposed Changes

  • Respect the Blueprint preferred versions and prefill the dropdowns
  • Display warning when the version in the selected version doesn't match Blueprint
    • This state could happen when the WP version is not in the supported versions
    • Or when the user changes the selected version manually
  • Update warning text from "default is" to "selected is" for clarity
  • Remove unnecessary originalDefaultVersions prop

Testing Instructions

  • Run npm start

Test 1: Warning appears when blueprint version uses unsupported WP version

blueprint-unsupported-wp.json

  1. Click "Add site"
  2. Select "Start with a Blueprint"
  3. Choose a blueprint that specifies preferredVersions (e.g., WP 5.8.1)
  4. Observe the warning appears even if the advanced options are collapsed
  5. Open the advance settings observe the whole warning
Screenshot 2026-01-28 at 13 16 59

Test 2: Warning updates dynamically when user changes dropdown

test-multiple-warnings-blueprint.json

  1. Create a site with valid preferred Blueprint versions
  2. Observe no warning appears
  3. Change the PHP or WP version dropdown inside the advance settings
  4. Observe the warning appears
Screenshot 2026-01-28 at 13 17 17

Test 3: No supported PHP version

blueprint-unsupported-php.json

We didn't modify the logic, but I observed that if the PHP version is not supported, the flow displays an error validating the Blueprint in the previous step.

Screenshot 2026-01-28 at 13 17 34

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?
sejas added 2 commits January 28, 2026 12:51
Simplify the blueprint preferred versions warning logic:
- Validate WP versions against the API-fetched supported versions list
- Compare blueprint versions to current user selection instead of original defaults
- Update warning text from "default is" to "selected is" for clarity
- Remove unnecessary originalDefaultVersions prop
@sejas sejas changed the title Ensure the warning appears in the blueprint advanced settings Jan 28, 2026
@sejas sejas self-assigned this Jan 28, 2026
@sejas
sejas requested review from a team, epeicher and ivan-ottinger January 28, 2026 13:15
@sejas
sejas marked this pull request as ready for review January 28, 2026 13:15
@wpmobilebot

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing f147d0c vs trunk

site-editor

Metric trunk f147d0c Diff Change
load 2838.00 ms 2828.00 ms -10.00 ms 🟢 -0.4%

site-startup

Metric trunk f147d0c Diff Change
siteCreation 7124.00 ms 7084.00 ms -40.00 ms 🟢 -0.6%
siteStartup 3927.00 ms 3930.00 ms +3.00 ms 🔴 0.1%

Results are median values from multiple test runs.

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

@epeicher epeicher left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @sejas! This works as expected. I can see validation warnings when using versions different from those specified in the Blueprint. The WordPress version is automatically updated to latest when it is unsupported, while the unsupported php version is just discarded.

Also the warnings are displayed as soon as the versions of PHP or WordPress is changed to a different one than selected in the Blueprint. LGTM!

Incorrect WP version collapsed Incorrect WP version expanded Selecting different version than the Blueprint Non-supported PHP version
Image Image Image Image
@sejas
sejas merged commit 6c9852c into trunk Jan 28, 2026
9 checks passed
@sejas
sejas deleted the stu-1265-ensure-the-warning-in-the-blueprint-advanced-settings branch January 28, 2026 16:11

@ivan-ottinger ivan-ottinger left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you for the fix, Antonio! The changes work nicely!

CleanShot.2026-01-29.at.09.58.22.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants