Closed Bug 1636558 Opened 5 years ago Closed 5 years ago

Attachment pane layout breaks upon toggling pane and/or resizing in message reader with many attachments, covered/hidden by grey area, unusable

Categories

(Thunderbird :: Mail Window Front End, defect, P1)

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 78.0

People

(Reporter: thomas8, Assigned: aleca)

References

(Regression)

Details

(Keywords: regression, useless-UI)

Attachments

(7 files, 1 obsolete file)

Is anyone seeing this?

Seen on Windows 10, TB 78.0a1 (2020-05-08) (64-bit)
Completely unusable for me (see screenshot).

  • some more attachments in a draft, save draft (not sure if draft matters, guess not)
  • look at draft in message reader
  • use attachment pane twisty and/or resize the attachment pane vertically

actual result

  • as you drag splitter upwards, grey area follows from bottom and covers attachments instead of revealing them in the bigger space
  • grey area will not go away even when you close twisty

expected

  • see more attachments

I'm seeing this on Linux as well.
Definitely a regression.

Alice, pretty please!!!

Perhaps something wrong with scrollbar/scrollbox, which doesn't appear to be flex.

The attachmentList has a max-height set. I remember there was a bug about hiding attachments when where are too much.

Probably a regression from bug 1610180.

Guess this is major because it's so prominent and hazardous effect. Might be easy to fix. Feel free to change the rating.

Severity: -- → S2
Priority: -- → P2
See Also: → 1610180, 1606027

Thank you so much Alice, as usual you're absolutely the best!

Regressed by: 1610180, 1631198
See Also: 1610180

I identified 2 bugs which caused this regression.

  • Bug 1610180 implemented the max-height in the attachmentList to fix the overflow issue, but also removed those attributes from the attachmentView which are necessary to properly handle the resize of that area when the splitter is moved.
  • Bug 1631198 introduced an extra vbox for the OpenPGP key, which the splitter prioritizes when resizing, consequentially ignoring the Attachment pane.

I also identified another substantial issue, which is the face that in the messenger view we started listing a lot of boxes underneath the message header, including the imip-bar.

That shouldn't happen as the body of the message should only contain the content and the attachment box, in order for the splitter to be able to resize only these 2 elements accordingly.

Most of these extra boxes have a fixed height, so we never noticed the interference they were causing.
As a follow up patch, I will convert all those extra boxes into NotificationBox elements, as the behaviour and UI is pretty identical.

Assignee: nobody → alessandro
Status: NEW → ASSIGNED
Priority: P2 → P1

If you can, test this by looking at message with a different amount of attachments, from 1 to multiple.

Try to resize the attachment area, which it shouldn't be draggable beyond the maximum amount of attachments listed, and the scrollbar should appear.

Attachment #9146932 - Flags: ui-review?(richard.marti)
Attachment #9146932 - Flags: review?(mkmelin+mozilla)
Comment on attachment 9146932 [details] [diff] [review] 1636558-attachment-regression.diff ui-r- because it has still size issues. With one attachment it works perfectly but I have a message with four attachments, which have enough place on one row, and it shows a second blank row below which I can't reduce the pane size with dragging down the splitter. It only collapses. On a message with 13 attachments it shows a grey box below the attachment list. It seems the size of this grey box is missing on the notifications bar height. Playing some more doesn't show the grey bar at the bottom anymore and the notification bar has the correct height. But when I hide the attachment pane in a drafts folder and then switch to a other folder I get a grey bar there the notification bar was. Very tricky. I'll add some screenshots.
Attachment #9146932 - Flags: ui-review?(richard.marti) → ui-review-
Attached image 4-attachments.png

Screenshot of the too tall attachment list.

Attached image 13-attachments.png

Screenshot of the grey box below and the too small notification bar. This isn't because I shrunk the message to make the image smaller. It was the same when I had the message taller.

Attached image grey-bar-on-top.png

The grey box where the notifications are but with a message without notification.

Very tricky indeed.
Thanks for the detailed review, I'll see if I can reproduce these scenarios.

This was strangely annoying to figure out.
I was able to fix it by mostly using CSS and converting those elements into flex containers.

Also, we were doing a lot of calculations for the height that we can avoid by using the preferredHeight method for the richlist element.
Overall, adding an inline style of max-height to the #attachmentList is wrong as that element should always expand for the maximum available height of the its container.

The only thing I'm not happy about, is the Add 3px to account for item's margin in the preferredHeight method, but without it, we would get a visible scrollbar just because of those 3 missing pixels.

Attachment #9146932 - Attachment is obsolete: true
Attachment #9146932 - Flags: review?(mkmelin+mozilla)
Attachment #9146969 - Flags: ui-review?(richard.marti)
Attachment #9146969 - Flags: review?(mkmelin+mozilla)
Comment on attachment 9146969 [details] [diff] [review] 1636558-attachment-regression.diff Works now much better. The attachment pane works now as it should when dragging. I still have the grey notification bar remnant when I hide the attachment pane in a draft folder and then switch to a other folder but I have this too on Daily without the patch - I'll file a new bug for this.
Attachment #9146969 - Flags: ui-review?(richard.marti) → ui-review+

Filed bug 1636667 for the grey notification bar remnant.

Comment on attachment 9146969 [details] [diff] [review] 1636558-attachment-regression.diff Review of attachment 9146969 [details] [diff] [review]: ----------------------------------------------------------------- LGTM, r=mkmelin
Attachment #9146969 - Flags: review?(mkmelin+mozilla) → review+

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/73be5343da88
Fix attachment pane height regression in message pane. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 78.0

I think this is causing test failures:
https://treeherder.mozilla.org/#/jobs?repo=comm-central&selectedTaskRun=RwN4gEyjQfi3sfIbX42LFg-0

TEST-UNEXPECTED-FAIL | comm/mail/test/browser/folder-display/browser_openingMessages.js | messages box height (1080) not equal to the sum of displayDeck height (0) and message pane box wrapper height (1079) and message notification box height (0) - 1080 == 1079 - JS frame :: chrome://mochitests/content/browser/comm/mail/test/browser/folder-display/browser_openingMessages.js :: check_message_pane_in_tab_full_height :: line 201

Flags: needinfo?(alessandro)

Ah, shoot, sorry.
I'll fix this.

Flags: needinfo?(alessandro)

This should do the trick.
Apparently, getBoundingClientRect() can't properly handle CSS borders.
Here's a try run: https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=1e1a937c89a641901c4f221922e0e0b920d2d319

Attachment #9147798 - Flags: review?(mkmelin+mozilla)
Attachment #9147798 - Flags: review?(mkmelin+mozilla) → review+
Pushed by geoff@darktrojan.net: https://hg.mozilla.org/comm-central/rev/5e8adf8205d5 Fix failing test for attachment pane height regression in message pane. r=darktrojan

We have now a unneeded border on the bottom of the message pane. This patch removes it.
r+ from aleca through Matrix.

Attachment #9148045 - Flags: review+
Pushed by richard.marti@gmail.com: https://hg.mozilla.org/comm-central/rev/79a064e00626 Remove the unneeded messagepaneboxwrapper bottom border. r=aleca
See Also: → 1789283
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: