Studio: Add a warning when pushing a site with an outdated WordPress version
Related issues
Closes STU-875
Proposed Changes
This PR adds a notice for the user when the PHP or WordPress versions on their Studio site are not the latest and are different from the versions used on WP.com in the Sync modal for the push process.
Testing Instructions
- Pull the changes from this branch
- Start the app with
npm start - Change the WordPress version on one of your sites to be something like
6.4 - Navigate to the Sync tab
- Connect at least one WP.com site
- Click on the
Pushoption - Confirm that you can see the warning like indicated below:
- Confirm that the modal works well and expands correctly when you have the file tree fully expanded
- You can also test the case when the site both uses an older PHP version or WordPress version and is over 2GB limit:
Pre-merge Checklist
- [ ] Have you checked for TypeScript, React or other console errors?
📊 Performance Test Results
Comparing c65422496324af1b41fb69b2c0cea3833b074144 vs trunk
site-editor
| Metric | trunk | c65422496324af1b41fb69b2c0cea3833b074144 | Diff | Change |
|---|---|---|---|---|
| load | 8199.00 ms | 9403.00 ms | +1204.00 ms | 🔴 14.7% |
site-startup
| Metric | trunk | c65422496324af1b41fb69b2c0cea3833b074144 | Diff | Change |
|---|---|---|---|---|
| siteCreation | 24625.00 ms | 19673.00 ms | -4952.00 ms | 🟢 -20.1% |
| siteStartup | 9053.00 ms | 8076.00 ms | -977.00 ms | 🟢 -10.8% |
Results are median values from multiple test runs.
Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change
One last thing is that we can potentially combine these two messages in one notice when both have to be displayed but I kept them separate for now as they are relevant for two different things:
I only noticed that the Database checkbox appears a bit cut. Could we show it all?
Nice, good catch! I was testing on bigger screen so it looked fully fitting there. I will adjust the padding a bit more 👍
Updated in https://github.com/Automattic/studio/pull/2136/commits/e423be913e33d91093d37a36463ed3f188462ed9
@ivan-ottinger I also added a background similar to the other footer for "Connect another site" . Feel free to give it another review 👍