Skip to content

Conversation

@katinthehatsite
Copy link
Contributor

@katinthehatsite katinthehatsite commented Nov 26, 2025

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 Push option
  • Confirm that you can see the warning like indicated below:
Screenshot 2025-11-26 at 2 08 56 PM
  • 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:
Screenshot 2025-11-26 at 2 08 39 PM

Pre-merge Checklist

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

@katinthehatsite katinthehatsite self-assigned this Nov 26, 2025
@katinthehatsite katinthehatsite marked this pull request as draft November 26, 2025 11:09
@github-actions
Copy link
Contributor

github-actions bot commented Nov 26, 2025

📊 Performance Test Results

Comparing c654224 vs trunk

site-editor

Metric trunk c654224 Diff Change
load 8199.00 ms 9403.00 ms +1204.00 ms 🔴 14.7%

site-startup

Metric trunk c654224 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


const latestWpVersion = wpVersions.find( ( version ) => version.value === 'latest' )?.value;
const latestWpVersion = wpVersions.find(
( version ) => version.value !== 'latest' && ! version.isBeta && ! version.isDevelopment
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The tooltip on the Create preview button was broken for the semver comparison of versions so I am fixing it at the same time. Alternative fix, could be to add another prop to interface WordPressVersion with the actual version but it seemed like a bit of extra for this one edge case with latest. (that's what I initially tried)

The reason why this is broken: We need value: 'latest' for the dropdown selector, but we need the actual version number like '6.7.1' for semver comparisons. Before this fix, the version mismatch detection was completely broken because it was trying to compare '6.2' with the string 'latest'.

@katinthehatsite
Copy link
Contributor Author

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:

Screenshot 2025-11-26 at 2 08 39 PM

@katinthehatsite katinthehatsite requested a review from a team November 26, 2025 13:52
@katinthehatsite katinthehatsite marked this pull request as ready for review November 26, 2025 13:52
@katinthehatsite katinthehatsite changed the title Studio: Add warning for when the site exceeds limits Studio: Add a warning when pushing a site with an outdated WordPress version Nov 26, 2025
Copy link
Contributor

@ivan-ottinger ivan-ottinger left a comment

Choose a reason for hiding this comment

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

Nice! The changes work as expected. 👌🏼


One thing that came to my mind is how the scrolling would look like if we added a similar opacity as we have on the Sync tab:

Image

I believe it could help users noticed the content is scrollable in cases like this one:

Image

At the same time, this may be outside of scope for this PR.


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 agree and think it makes sense to keep them separate. 👍🏼


I left one inline comment. Also noticed that unit tests are failing.

Copy link
Member

@sejas sejas left a comment

Choose a reason for hiding this comment

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

Great work Kat! I saw in the Linear issue that the notice was preferred over the tooltip 👍 .

I only noticed that the Database checkbox appears a bit cut. Could we show it all?

Image

title={ syncTexts.title }
>
<div className={ isPushSelectionOverLimit ? 'pb-[140px]' : 'pb-[70px]' }>
<div className={ footerPadding }>
Copy link
Member

Choose a reason for hiding this comment

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

Not a strong opinion, but we could declare the footer padding inside the class. Something like:

			<div
				className={ cx(
					noticeCount === 0 && 'pb-[70px]',
					noticeCount === 1 && 'pb-[140px]',
					noticeCount >= 2 && 'pb-[210px]'
				) }
			>

@katinthehatsite
Copy link
Contributor Author

katinthehatsite commented Nov 28, 2025

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 e423be9

@katinthehatsite
Copy link
Contributor Author

@ivan-ottinger I also added a background similar to the other footer for "Connect another site" . Feel free to give it another review 👍

Copy link
Contributor

@ivan-ottinger ivan-ottinger left a comment

Choose a reason for hiding this comment

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

@ivan-ottinger I also added a background similar to the other footer for "Connect another site" . Feel free to give it another review 👍

Thank you for the updates, Kat.

The changes look good and the notice is rendering correctly. 👍🏼

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