Fix truncated native PHP copy in What's New modal - #3946
Conversation
📊 Performance Test ResultsComparing fd1d70e vs trunk app-size
site-editor
site-startup
Results are median values from multiple test runs. Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff) |
fredrikekelund
left a comment
There was a problem hiding this comment.
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
|
@fredrikekelund I also couldn't replicate the scrollbar, so I removed the conditional number of lines. I reverted the change back to the original text. |
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
npm start).Pre-merge Checklist