Skip to content

fix: apply the truncation screen option to snippet descriptions - #573

Merged
TallblokeUK merged 3 commits into
core-betafrom
fix/description-truncation/core
Oct 5, 2026
Merged

TallblokeUK merged 3 commits into
core-betafrom
fix/description-truncation/core

Conversation

@TallblokeUK

Copy link
Copy Markdown
Contributor

Fixes #556.

Turning off "Truncate long snippet names and descriptions" expanded snippet names but left descriptions clipped with an ellipsis.

Two rules targeted the description cell at equal specificity, so source order decided between them: one in common/list-table/_layout.scss applied only while the option was on, and one in manage/_snippets-table.scss clamped the cell to two lines for every row regardless of the option. The later, unconditional rule won, so the description stayed clamped whatever the option said.

That clamp is now scoped to the option, alongside the rule governing names. Appearance with the option on is unchanged.

Verification

  • New end-to-end test asserts the rendered result rather than the class: the computed line clamp is 2 while the option is on and none once it is off, and the description no longer hides any of its own height. It fails without the change.
  • The existing truncation tests only assert that the class is applied, which is why this went unnoticed; the class was always correct.
  • lint:styles and lint:js pass.

…into fix/description-truncation/core

# Conflicts:
#	CHANGELOG.md
@TallblokeUK
TallblokeUK merged commit 746b317 into core-beta Oct 5, 2026
18 checks passed
@TallblokeUK
TallblokeUK deleted the fix/description-truncation/core branch October 5, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-tests Trigger automated tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disabling truncation does not expand snippet descriptions

2 participants