Skip to content

Fix truncated native PHP copy in What's New modal - #3946

Merged
bcotrim merged 3 commits into
trunkfrom
fix-whats-new-native-php-truncation
Jun 24, 2026
Merged

Fix truncated native PHP copy in What's New modal#3946
bcotrim merged 3 commits into
trunkfrom
fix-whats-new-native-php-truncation

Conversation

@bcotrim

@bcotrim bcotrim commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Related issues

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 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

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

wpmobilebot commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing fd1d70e vs trunk

app-size

Metric trunk fd1d70e Diff Change
App Size (Mac) 1311.88 MB 1311.88 MB 0.00 MB ⚪ 0.0%

site-editor

Metric trunk fd1d70e Diff Change
load 1028 ms 1036 ms +8 ms ⚪ 0.0%

site-startup

Metric trunk fd1d70e Diff Change
siteCreation 6516 ms 6509 ms 7 ms ⚪ 0.0%
siteStartup 6470 ms 7022 ms +552 ms 🔴 8.5%

Results are median values from multiple test runs.

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

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

The difference in line clamping between the first slide and the subsequent ones seems to have been introduced to prevent scrollbars from appearing. See #1128 (comment)

I can't really trigger a scrollbar even if I change the line clamping to 5 lines. I could see us changing that setting to 5 lines for all slides. This seems like an issue that could easily trip us up in the future, too.

I'll leave that call to you, @bcotrim. This simplistic solution works, too

@bcotrim
bcotrim enabled auto-merge (squash) June 24, 2026 14:03
@bcotrim

bcotrim commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

@fredrikekelund I also couldn't replicate the scrollbar, so I removed the conditional number of lines.
Let's keep an eye for any regressions.

I reverted the change back to the original text.

@bcotrim
bcotrim merged commit 3a69708 into trunk Jun 24, 2026
11 checks passed
@bcotrim
bcotrim deleted the fix-whats-new-native-php-truncation branch June 24, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants