Skip to content

fix: restore sender copy-to-clipboard and fix thread subject alignment#12966

Open
sturlan wants to merge 1 commit into
nextcloud:mainfrom
sturlan:fix/thread-view-regressions-12946-12952
Open

fix: restore sender copy-to-clipboard and fix thread subject alignment#12966
sturlan wants to merge 1 commit into
nextcloud:mainfrom
sturlan:fix/thread-view-regressions-12946-12952

Conversation

@sturlan
Copy link
Copy Markdown
Contributor

@sturlan sturlan commented May 21, 2026

Summary

Follow-up to #12666, fixing two regressions it introduced.

#12952 — Lost ability to copy sender email to clipboard

Before #12666 the sender email was rendered as a RecipientBubble (contact popover with Reply / Add to Contact / Copy to clipboard). #12666 replaced it with a plain <button> or <p> — no popover in either case.

Fix:

  • Replace <p class="sender__email"> with RecipientBubble for the no-recipients case (sender email always clickable when expanded)
  • Add a From: row with RecipientBubble at the top of the expanded recipients section, restoring the contact popover when To/Cc/Bcc are present

#12946 — Regressed thread subject alignment

#mail-thread-header-fields had padding-inline-start: 66px, computed assuming envelope__header had 8 px of left padding. #12666 changed that padding from --border-radius-element (8 px) to --border-radius-container (12 px),
leaving the sticky header 4 px short.

Fix:

  padding-inline-start: calc(var(--default-grid-baseline) * 14 + var(--border-radius-container) + 2px);
  // 4×14 + 12 + 2 = 70 px — matches actual sender name position

Test plan

  • Expand a message with To/Cc → click toggle → From: row appears with clickable bubble → popover shows Copy to clipboard
  • Expand a message with no Cc/Bcc → sender email shown as RecipientBubble inline → click → popover works
  • Scroll thread → sticky subject header left-aligns with sender name in expanded envelope
  • npm run lint && npm run stylelint pass

Fixes #12946
Fixes #12952

- Replace <p class="sender__email"> with RecipientBubble when expanded
  and hasRecipients is false, so clicking the sender email always opens
  the contact popover (reply, add to contact, copy to clipboard)
- Add a From: row with RecipientBubble at the top of the expanded
  recipients section, restoring copy-to-clipboard for the sender when
  To/Cc/Bcc recipients are present (fixes nextcloud#12952)
- Fix #mail-thread-header-fields padding-inline-start from the hardcoded
  66px to calc(var(--default-grid-baseline)*14 + var(--border-radius-container) + 2px)
  to account for the --border-radius-container header padding introduced
  in PR nextcloud#12666 (fixes nextcloud#12946)

Follows up on PR nextcloud#12666.

AI-assisted: Claude Code (claude-sonnet-4-6)
Signed-off-by: Darko Sturlan <darko.sturlan@gmail.com>
@welcome
Copy link
Copy Markdown

welcome Bot commented May 21, 2026

Thanks for opening your first pull request in this repository! ✌️

Copy link
Copy Markdown
Member

@jancborchardt jancborchardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the screenshots, the alignment is not fully fixed:

  • The people chips of "To" and "Cc" should have same indentation as those of "From"
  • The horizontal whitespace between the chips should be the same as the vertical whitespace between the chips
  • There's very little padding on the right of the inside of the chips

@nimishavijay for review as well

@ChristophWurst
Copy link
Copy Markdown
Member

/backport to stable5.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lost ability to copy sender email address to clipboard Regressed element alignment in thread view

3 participants