Skip to content

UVE: Clamp contentlet titles to two lines in the palette#35878

Merged
fmontes merged 10 commits into
mainfrom
copilot/show-full-content-names
Jun 5, 2026
Merged

UVE: Clamp contentlet titles to two lines in the palette#35878
fmontes merged 10 commits into
mainfrom
copilot/show-full-content-names

Conversation

Copilot AI commented Jun 1, 2026

Copy link
Copy Markdown
Contributor
longer-text.mp4

Proposed Changes

  • Replace single-line truncation in the Page Editor palette with a two-line clamp so more of each contentlet title is visible without allowing rows to grow indefinitely
  • Keep the fixed row height, move the hover affordance to a PrimeNG tooltip on the clamped title text only, and update the focused component spec to cover the new title styling and tooltip behavior

Checklist

  • Tests
  • Translations
  • Security Implications Contemplated (UI-only styling and spec updates; no new security impact)

Additional Info

This PR now uses a two-line truncated title instead of fully wrapping contentlet names. That keeps similarly prefixed items easier to distinguish while preserving the existing row layout.

The full title is now exposed through the PrimeNG tooltip directive on the clamped text itself rather than through the browser-default tooltip on the whole contentlet box.

Validated with:

  • npx nx lint portlets-edit-ema-portlet
  • npx nx test portlets-edit-ema-portlet

Screenshots

Original Updated
** original screenshot ** ** updated screenshot **

This PR fixes: #35876

Copilot AI changed the title [WIP] Restore multi-line wrapping for content names in search panel [Page Editor] Show full contentlet titles in the palette Jun 1, 2026
Copilot AI requested a review from fmontes June 1, 2026 16:34
Copilot AI changed the title [Page Editor] Show full contentlet titles in the palette [Page Editor] Clamp contentlet titles to two lines in the palette Jun 1, 2026
Copilot AI requested a review from fmontes June 1, 2026 16:53
Copilot AI requested a review from fmontes June 1, 2026 19:06
@fmontes fmontes marked this pull request as ready for review June 1, 2026 22:13
@fmontes fmontes changed the title [Page Editor] Clamp contentlet titles to two lines in the palette UVE: Clamp contentlet titles to two lines in the palette Jun 1, 2026
@KevinDavilaDotCMS

KevinDavilaDotCMS commented Jun 1, 2026

Copy link
Copy Markdown
Member

Can we add the same tooltip to the URL in uve iframe?
Now is only truncated

Not related to ticket, but are the same tailwind classes, so 2x1 😅

@KevinDavilaDotCMS KevinDavilaDotCMS linked an issue Jun 1, 2026 that may be closed by this pull request
@claude

claude Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Claude finished @fmontes's task in 1m 5s —— View job


Code Review

  • Read changed files
  • Analyze changes
  • Post review

Two things worth flagging:

1. Tooltip fires unconditionally — noise for short titles

In dot-uve-palette-contentlet.component.html:23, [pTooltip]="contentlet.title" is bound unconditionally. If the title fits within two lines, hovering the text pops up a tooltip that just repeats what's already fully visible. This is a common pragmatic tradeoff, but it's technically incorrect — the tooltip should only appear when line-clamp is actually truncating. A signal-based isTruncated approach (comparing scrollHeight > clientHeight) would be more precise, but adds complexity. Worth a deliberate decision either way.

2. tooltipPosition="top" has no auto-flip fallback declared

For items near the top of the palette list, tooltipPosition="top" will try to render above the element, potentially off-screen. PrimeNG's tooltip directive does attempt auto-repositioning internally, but explicitly passing [tooltipOptions]="{ autoHide: false }" or a different default position (right or bottom) would be safer for top-of-list rows.

Otherwise clean. The removal of the host title attribute, scoping pTooltip to the title element only, and the line-clamp-2 wrap-break-word combination are all correct. The spec covers the key behaviors (class presence, tooltip directive binding, no native title on host).

@github-actions github-actions Bot added the Area : Frontend PR changes Angular/TypeScript frontend code label Jun 2, 2026
@rjvelazco rjvelazco enabled auto-merge June 2, 2026 16:39
@rjvelazco rjvelazco added this pull request to the merge queue Jun 2, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 2, 2026
@fmontes fmontes enabled auto-merge June 4, 2026 12:59
fmontes and others added 4 commits June 4, 2026 14:25
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@fmontes fmontes added this pull request to the merge queue Jun 5, 2026
Merged via the queue into main with commit 8af3111 Jun 5, 2026
34 checks passed
@fmontes fmontes deleted the copilot/show-full-content-names branch June 5, 2026 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area : Frontend PR changes Angular/TypeScript frontend code

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Upgrade VERSION number of SDKS UVE: Show full content names in content search/list panel (multi-line wrapping)

7 participants