Closed Bug 1667602 Opened 4 years ago Closed 4 years ago

Compose window UI overflows horizontally when long string/multiple csv addresses are pasted after existing pills

Categories

(Thunderbird :: Message Compose Window, defect, P2)

Tracking

(thunderbird_esr78+ fixed, thunderbird82 fixed)

RESOLVED FIXED
83 Branch
Tracking Status
thunderbird_esr78 + fixed
thunderbird82 --- fixed

People

(Reporter: thomas8, Assigned: aleca)

References

Details

(Keywords: useless-UI)

Attachments

(2 files, 2 obsolete files)

+++ This bug was initially created as a clone of Bug #1667173 +++

STR

  1. Compose and have a few pills in To.
  2. Paste multiple comma-separated addresses into the address input after existing pills.

Actual result

  • Broken UI with an unwanted horizontal overflow beyond window width with lots of invisible addresses
  • It's very hard for the user to figure out the next step, because focus/cursor are also hidden in the overflow.

Expected

  • No horizontal overflow
  • ideally, make the input multi-line for this scenario
  • otherwise, overflow inside the input and keep the cursor position visible.

This is a regression (perhaps also from bug 1663057)

(In reply to Thomas D. (:thomas8) from Bug 1666463 Comment 13)

Also there's a variant of bug 1667173 which isn't covered yet: Pasting
string of CSV which is longer than the rest of the addressing row will
expand the row horizontally beyond the screen. Guess they could share the
same resizing code in a function. Or maybe we could just listen for input
event on the input and attach the resizing there, which hopefully also
covers the drop.

Not sure if this was regressed by bug 1663057, so let's make that see-also.

No longer regressed by: 1663057
See Also: → 1663057
Summary: Recipient container grows horizontally when multiple comma-separated addresses are pasted after existing pills → Compose window UI overflows horizontally when long string/multiple csv addresses are pasted after existing pills
Assignee: nobody → alessandro
Status: NEW → ASSIGNED

Unfortunately this is not a regression as it always had this issue since first implementation.
Fix coming up!

No longer blocks: 1666463, 1667173
Keywords: regression
See Also: → 1667173
Attached patch 1667602-input-size.diff (obsolete) — Splinter Review

This should do it, and it shouldn't interfere with any other scenario.

Attachment #9178601 - Flags: review?(bugzilla2007)

Comment on attachment 9178601 [details] [diff] [review]
1667602-input-size.diff

Redirecting this review to Magnus since Thomas is busy with other tasks.

Attachment #9178601 - Flags: review?(bugzilla2007) → review?(mkmelin+mozilla)
See Also: → 1666463
Comment on attachment 9178601 [details] [diff] [review]
1667602-input-size.diff

Review of attachment 9178601 [details] [diff] [review]:
-----------------------------------------------------------------

::: mail/base/content/mailWidgets.js
@@ +2128,5 @@
> +          // We need to be sure the new size of the input field doesn't exceed
> +          // its container width. This might happen if the user pastes a very
> +          // long string with multiple addresses when pills are already present.
> +          if (
> +            input.getAttribute("size") > 1 &&

do we ever set it to 0 or minus values?

No, we always reset this to 1 after a pill is created as we need to force its size to properly stay inline the recipients container, otherwise the default sizing coming from toolkit will create visual inconsistencies (eg. a tall recipients container even if all the pills fit in a single row).

I guess then I'm asking does that line do anything useful?

Mh, I guess not, and we can solely rely on the width condition.
Let me check if it works as expected.

Attached patch 1667602-input-size.diff (obsolete) — Splinter Review

Yup, that works.

Attachment #9178601 - Attachment is obsolete: true
Attachment #9178601 - Flags: review?(mkmelin+mozilla)
Attachment #9179354 - Flags: review?(mkmelin+mozilla)

I don't seem to reproduce this bug for paste.
For dragging such text there's still at least a temporary issue that the field grows a lot, then shrinks back again after pill creation

(In reply to Magnus Melin [:mkmelin] from comment #10)

I don't seem to reproduce this bug for paste.

Maybe this?

  • condition 1: pasted string must be longer than the available total width of the addressing row. Easier to see on reduced/small window width.
  • condition 2: paste must occur in a line which is almost filled with pills, so the address input is on the far right of the address row.
  • strange: does not occur for pasting on the far left, even when the string is longer than the address row.

Here's a sample string for pasting (you can paste two times):

Jane Doe <jane.doe@example.com>, John Doe <john.doe@example.com>, Susi Sommer <suso@example.com>, peter@example.com, paul@example.com, Jane Doe <jane.doe@example.com>, John Doe <john.doe@example.com>, Susi Sommer <suso@example.com>, Peter Petermann-Neufeld <petermann@example.com>, Paul public <paul.public@example.com>

Mind that somehow when pasting too many duplicate addresses, there seems to be some filtering going on.

Comment on attachment 9179354 [details] [diff] [review]
1667602-input-size.diff

Review of attachment 9179354 [details] [diff] [review]:
-----------------------------------------------------------------

The case of drag'n'dropping instead of pasting still need fixing.
Attachment #9179354 - Flags: review?(mkmelin+mozilla) → feedback+

This should take care of all the scenarios.

Attachment #9179354 - Attachment is obsolete: true
Attachment #9179737 - Flags: review?(mkmelin+mozilla)
Comment on attachment 9179737 [details] [diff] [review]
1667602-input-size.diff

Review of attachment 9179737 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks! r=mkmelin
Attachment #9179737 - Flags: review?(mkmelin+mozilla) → review+
Target Milestone: --- → 83 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/17b4cd755c55
Fix recipient input field not updating size when a straing is pasted. r=mkmelin DONTBUILD

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED

Comment on attachment 9179737 [details] [diff] [review]
1667602-input-size.diff

[Approval Request Comment]
Pills polish

Attachment #9179737 - Flags: approval-comm-esr78?
Attachment #9179737 - Flags: approval-comm-beta?

Comment on attachment 9179737 [details] [diff] [review]
1667602-input-size.diff

[Triage Comment]
Approved for beta

Attachment #9179737 - Flags: approval-comm-beta? → approval-comm-beta+

Looks good to me testing the 82.0b3 release candidate on Ubuntu 18.04 LTS.

Comment on attachment 9179737 [details] [diff] [review]
1667602-input-size.diff

[Triage Comment]
Approved for esr78

Attachment #9179737 - Flags: approval-comm-esr78? → approval-comm-esr78+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: