fix: apply the row truncation Screen Option to snippet names (3.10.2) - #507
Merged
imantsk merged 3 commits intoSep 1, 2026
Merged
Conversation
The "Truncate long snippet names and descriptions" Screen Option toggles a truncate-row-values class on the list table, but only the description rule was scoped to that class. The name rule applied unconditionally, so snippet names were always clipped to min(15rem, 30vw) whether the option was on or off, and turning it off appeared to do nothing to the Name column. Scope the name rule to the same class, so the option governs both values as its label promises. (cherry picked from commit f319d66)
ramiy
approved these changes
Sep 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Retarget of #495 onto the release branch. Same commit, cherry-picked, so it applies without dragging in unrelated
core-betachanges to the test files.Reported on Discord against 3.10.1: the Truncate long snippet names and descriptions Screen Option only affects the Description column. Snippet names stay truncated whether the option is on or off, which makes long names hard to tell apart. If the Description column is hidden, toggling the option appears to do nothing at all.
The reporter identified the cause themselves, and they were right.
Cause
The option toggles a
truncate-row-valuesclass on the list table, but only the description rule was scoped to it:So names were always clipped to
min(15rem, 30vw)regardless of the setting. The class itself toggles correctly — it simply never governed the Name column.Fix
Scope the name rule to the same class, so the option governs both values as its label promises.
Testing
Measured on the same row, with a deliberately long (88 character) snippet name:
max-inline-size: 240px, clippedmax-inline-size: 240px, clippedmax-inline-size: 240px, clippedmax-inline-size: none, full name shownWith the option off the name now wraps and is fully readable; the row grows by one line, which is the same behaviour the Description column already has. With it on, nothing changes. Verified by toggling the Screen Option through the UI rather than by forcing the class, on a clean WordPress 7.1 install with the plugin installed from a built zip. stylelint clean.
Note
This covers the table view only. The card/grid view never receives the
truncate-row-valuesclass, and its truncation is structural — a long name would otherwise push the header icons out of the card. That looks deliberate, so it is left alone here.