Skip to content

Add native PHP runtime page to What's New modal - #3915

Merged
bcotrim merged 7 commits into
trunkfrom
rsm-4414-whats-new-modal-native-php
Jun 23, 2026
Merged

Add native PHP runtime page to What's New modal#3915
bcotrim merged 7 commits into
trunkfrom
rsm-4414-whats-new-modal-native-php

Conversation

@bcotrim

@bcotrim bcotrim commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Related issues

How AI was used in this PR

Used Claude Code (Opus 4.8) to draft the slide copy, generate the placeholder illustration, and implement the change. I reviewed the wording for accuracy against the shipped PHP runtime: Native / Sandbox site settings (site-runtime-copy.tsx) and ran ESLint + the whats-new/app-version-api/get-localized-link unit tests locally.

Proposed Changes

Adds a native PHP runtime slide as the lead item in Studio's What's New modal, so users discover that native PHP is now the default runtime for the best performance, and that they can switch any site between the Native and Sandbox runtimes in its settings. Includes a Learn more link to the PHP runtimes docs.

To keep the carousel to four slides, the last one (Blueprints) was retired. The order is now: native PHP → dark mode → phpMyAdmin → CLI. The modal is also set to surface once for existing users on this release.

⚠️ Visual change: needs human review in light + dark mode.

🖼️ The illustration is a temporary placeholder — final artwork (design in progress) will replace it later. The import path stays the same, so it's a one-file swap.

Testing Instructions

  1. Run Studio (npm start).
  2. Trigger the What's New modal from the app menu (What's New).
  3. Confirm the first slide is "Run your sites with native PHP", with the placeholder illustration, the "What's new" pill, and a working Learn more link (opens the PHP runtimes docs).
  4. Page through with Next / Previous / Done — confirm the dark mode, phpMyAdmin, and CLI slides follow and navigation works.
  5. Verify in both light and dark appearance.
  6. Optional: with no stored "last seen version", confirm the modal auto-shows; onboarding should still suppress it.

Pre-merge Checklist

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

wpmobilebot commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 561a337 vs trunk

app-size

Metric trunk 561a337 Diff Change
App Size (Mac) 2340.96 MB 2341.11 MB +0.14 MB ⚪ 0.0%

site-editor

Metric trunk 561a337 Diff Change
load 1070 ms 1075 ms +5 ms ⚪ 0.0%

site-startup

Metric trunk 561a337 Diff Change
siteCreation 6482 ms 6515 ms +33 ms ⚪ 0.0%
siteStartup 6970 ms 7004 ms +34 ms ⚪ 0.0%

Results are median values from multiple test runs.

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

@wojtekn wojtekn 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.

Looks good.

@sejas should we add Studio Code, too?

sejas commented Jun 22, 2026

Copy link
Copy Markdown
Member

Yes! Thanks for the suggestion. I'll add it.

@sejas sejas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I confirm I see the What's new modal with the mentioned text and image.
@bcotrim, I suggest mentioning that the default runtime is native PHP and that users can change the runtime in the site settings.

Light Dark
Image Image
// current app version get the modal once. Keep at `false` otherwise — the modal
// will only auto-show for first-time users of Studio.
export const FORCE_SHOW_WHATS_NEW = false;
export const FORCE_SHOW_WHATS_NEW = true;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

Comment thread apps/studio/src/modules/whats-new/components/whats-new-modal.tsx Outdated

@katinthehatsite katinthehatsite 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.

The changes look good, I left one possible suggestion for the copy wording

image: nativePhpIllustration,
title: __( 'Run your sites with native PHP' ),
description: __(
'Studio can now run your sites with native PHP for the best performance, plus real file access and broader plugin compatibility. Pick the Native or Sandbox runtime for any site in its settings.'

@fredrikekelund fredrikekelund Jun 22, 2026

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.

As @sejas said – I think we should mention that this is the new default.

plus real file access

I think this can easily be misconstrued as "access to the entire system", which is not true by default.

broader plugin compatibility

I don't think this is really true, tbh. If we were switching from SQLite to MySQL, then yes, but the pure PHP runtime doesn't do much on this front, I think. At least not with how far Playground has come by now.

const locale = useI18nLocale();
const whatsNewPages: WhatsNewPage[] = [
{
image: nativePhpIllustration,

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.

Can we add a learn more link and point it to https://developer.wordpress.com/docs/developer-tools/studio/php-runtimes/ ?

That's only a draft for now, but if we can add it into the code, we can start iterating on the content

bcotrim and others added 3 commits June 22, 2026 15:36
Co-authored-by: katinthehatsite <katerynakodonenko@gmail.com>
…php' into rsm-4414-whats-new-modal-native-php

# Conflicts:
#	apps/studio/src/modules/whats-new/components/whats-new-modal.tsx
@bcotrim
bcotrim requested a review from fredrikekelund June 22, 2026 15:07
@shaunandrews

Copy link
Copy Markdown
Contributor
image

I updated the illustration, and focused the copy on the user value (faster sites), the new default, and how to switch. The learn more link can point to the docs where we can explain file system access and other more technical value-adds.

@fredrikekelund fredrikekelund 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.

One small suggestion for the copy, but overall this LGTM 👍

Comment thread apps/studio/src/modules/whats-new/components/whats-new-modal.tsx Outdated
Co-authored-by: Fredrik Rombach Ekelund <fredrik@f26d.dev>
@bcotrim
bcotrim enabled auto-merge (squash) June 23, 2026 08:46
@bcotrim
bcotrim merged commit 645f414 into trunk Jun 23, 2026
11 checks passed
@bcotrim
bcotrim deleted the rsm-4414-whats-new-modal-native-php branch June 23, 2026 09:03
@shaunandrews

Copy link
Copy Markdown
Contributor
image

That change in the copy seems to have triggered truncation for the text.

bcotrim added a commit that referenced this pull request Jun 24, 2026
## Related issues

- Follow-up to #3915 — fixes the truncation reported in [review
feedback](#3915 (comment))
- Related to
[RSM-4414](https://linear.app/a8c/issue/RSM-4414/update-the-whats-new-modal-with-details-about-the-native-php-runtime)

## How AI was used in this PR

Used Claude Code (Opus 4.8) to diagnose the truncation, trace the
history of the modal's line-clamp behavior, and implement the fix. I
confirmed the modal renders every slide's copy in full (no truncation,
no scrollbar) in the running app, and ran ESLint + a typecheck on the
changed file.

## Proposed Changes

The **"Faster local sites with native PHP"** slide in the What's New
modal was cutting its description off mid-sentence (*"…switch between
Native…"*).

The root cause was a fragile rule, not the copy itself: the modal
clamped the **first** slide's description to 5 lines but **every other**
slide to 3. The native PHP copy was written while it was the lead slide;
once a Studio Code slide became the new lead (#3924), native PHP dropped
into a 3-line slot and its (unchanged) text no longer fit.

Rather than trimming the copy, this gives **every slide the same 5-line
clamp** the intro slide already used — which the fixed-height modal
accommodates without scrollbars. That removes the intro-vs-regular
distinction that caused the regression, so future copy tweaks or slide
reordering won't silently truncate. It also drops a leftover wrapper
element that had no styling. The slide copy is unchanged from `trunk`.

Thanks to @fredrikekelund for
[suggesting](#3946 (review))
the all-slides approach over a copy-only fix.

## Testing Instructions

1. Run Studio (`npm start`).
2. Open the What's New modal (app menu → **What's New**).
3. Page through every slide and confirm each description shows in full
with no truncation/ellipsis — in particular, the **"Faster local sites
with native PHP"** slide should end with *"…in your site settings."*
4. Confirm no scrollbar appears on any slide and the footer buttons stay
in place.
5. Verify in **both light and dark** appearance.

## Pre-merge Checklist

- [x] Have you checked for TypeScript, React or other console errors?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

7 participants