Skip to content

fix(edit-content): align comment char count right and validation error left (#36629) - #36926

Open
adrianjm-dotCMS wants to merge 2 commits into
mainfrom
36629-comment-section-align-counter-and-error
Open

fix(edit-content): align comment char count right and validation error left (#36629)#36926
adrianjm-dotCMS wants to merge 2 commits into
mainfrom
36629-comment-section-align-counter-and-error

Conversation

@adrianjm-dotCMS

@adrianjm-dotCMS adrianjm-dotCMS commented Aug 6, 2026

Copy link
Copy Markdown
Member

Proposed Changes

  • Merge the character counter and the validation error of the comment section into a single row: error on the left, {n}/500 Characters on the right. Previously they were two stacked, left-aligned rows.
  • The counter is pushed right with flex-1 on dot-field-validation-message + shrink-0 on the counter, not justify-between. When the field is valid the validation message renders no content but its host element stays in the DOM, so justify-between would collapse and drag the counter back to the left.
  • min-h-4 on the row with matching leading-4 on both children keeps the row height constant. This preserves the reason the previous fixed-height h-3.5 slot existed: activities-footer is sticky bottom-0, so a row that grows when the error mounts would push the textarea upward.
  • min-w-0 on the message so a long error wraps instead of squeezing the counter out of the row.

Fixes #36629

Checklist

  • Tests
  • Translations — none needed, reuses existing edit.content.sidebar.activities.* keys
  • Security Implications Contemplated — none, template-only change

Additional Info

Layout-only follow-up to #36372. No TypeScript or Language.properties changes.

Tests updated in dot-edit-content-sidebar-activities.component.spec.ts:

  • The fixed-height test now targets activities-meta-row / min-h-4 instead of the removed activities-error-slot / h-3.5, keeping the same three-state assertion (no error → error → cleared).
  • New test asserting both elements share the row, error first and counter last, with the flex-1 / shrink-0 pairing that pins the counter right.

pnpm nx test edit-content → 40/40 pass. pnpm nx lint edit-content → 0 errors.

Note for review: removing the separate error row shortens the sticky footer by ~26px (the h-3.5 row plus its gap-3), so Clear/Send sit slightly higher than before. This looks like the intent of the issue, but flagging it since it is a visible side effect beyond the alignment itself.

Screenshots

Original Updated
Original Screenshot 2026-08-06 at 3 59 29 PM

…r left (#36629)

The comment section of the new Edit Contentlet stacked the character
counter and the required-message error on two separate left-aligned
rows. Merge them into a single row with the error on the left and the
counter on the right.

The counter is pushed right with flex-1 on the validation message plus
shrink-0 on the counter rather than justify-between: when the field is
valid dot-field-validation-message renders no content but its host
element stays in the DOM, so justify-between would drag the counter back
to the left. min-h-4 with matching leading-4 keeps the row height
constant, preserving the reason the previous fixed-height slot existed —
activities-footer is sticky bottom-0, so a row that grows when the error
mounts would shift the textarea upward.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@adrianjm-dotCMS
adrianjm-dotCMS marked this pull request as ready for review August 6, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Comment section: align character count right and validation error left (Edit Contentlet)

2 participants