Closed Bug 1596582 Opened 5 years ago Closed 4 years ago

[autoconfig] Account creation dialog window is too small when addons are offered [TB 68 only]

Categories

(Thunderbird :: Account Manager, defect)

defect
Not set
minor

Tracking

(thunderbird_esr68 fixed)

VERIFIED FIXED
Thunderbird 68.0
Tracking Status
thunderbird_esr68 --- fixed

People

(Reporter: BenB, Assigned: aleca)

References

Details

(Keywords: platform-parity)

Attachments

(3 files, 1 obsolete file)

See screenshot https://bugzilla.mozilla.org/attachment.cgi?id=9104934 . This screenshot is for TB 68 on Windows. Bug may be Windows only. TB trunk has a different dialog layout, but double-check there as well.

Not sure why that happens, because we make window.sizeToContent() calls. Maybe there's one missing after an async operation?

Keywords: platform-parity

I asked Neil to look into this.

This appears to be caused by an interaction with the ordering of the CSS @-rules. In particular, the Windows version of accountCreation.css wants to declare the html namespace so that it can change the placeholder font style. However, with the @-rules in the order given, the entire accountCreation.css import fails to apply for some reason, however I don't know CSS well enough to know why.

I since noticed that bug 1527003 already switched the two @-rules, thus fixing the bug on trunk. (It also added parallel @-rules to the other platforms, although they seem unnecessary.) This suggests that this is indeed the correct fix. (My Windows PC doesn't want to build for some reason, but I was able to verify that switching the @-rules on the Linux build exhibits the same problem.)

Attachment #9112844 - Flags: review?(alessandro)

Obviously we want the shared accountCreation.css on all platforms anyway, but there's also the underlying reason of why the window doesn't resize correctly. What happens here is that without the shared CSS, all of the parts of the extension display want to take up as much width as they can. In the case of the icon though it hasn't started loading yet, so it doesn't know its width. Shortly after the window is resized, the icon loads, and realises that it needs 32px of width, so it unceremoniously shoves everything else out of the way.

With the shared CSS properly included, the parts of the extension display are limited in the width that they can take up, which means that there's room for the icon once it's loaded.

An alternative approach to using max-width on the <column> elements would have been to use flex="1" width="1" which prevents the column from affecting the sizeToContent width instead requiring it to size itself to the remaining width after deducting size for the icon and button (which themselves would always acquire as much width as they need).

Really hideous bug: Namespace declaration clashes and sort order of imports - pfft! Good analysis and patch! Thanks.

I'll leave the review to aleca, because I'm sure he'll find this bug and patch interesting as well.

With the shared CSS properly included, the parts of the extension display are limited in the width that they can take up, which means that there's room for the icon once it's loaded.

In addition, the shared CSS also defines the icon size, which means that the correct amount of space is calculated in the first place anyway.

See #result_addon_install image.icon in https://searchfox.org/comm-central/source/mail/themes/shared/mail/accountCreation.css#282
This patch makes these CSS rules actually apply.

Comment on attachment 9112844 [details] [diff] [review]
Proposed patch for ESR

This is not the right solution, I think.
The problem is most likely due to a wrong max-width in the addon description.
I'm uploading a patch which fixed the issue on Linux.

For future reference, be sure to upload the file with a `.patch` extension and write the commit message with the current format:
`Bug XXXXXXX - Message. r=reviewer`
Attachment #9112844 - Flags: review?(alessandro) → review-
Attached patch 1596582-account-creation.patch (obsolete) — Splinter Review
Assignee: neil → alessandro
Attachment #9112844 - Attachment is obsolete: true
Attachment #9114677 - Flags: review?(ben.bucksch)

@aleca: I think you're talking about a different issue. This bug is about a Windows-specific problem. We don't see it on Linux, only on Windows. Neil found that the shared CSS file doesn't apply correctly on Windows. Did you test this on Windows, with and without the patch?

Comment on attachment 9112844 [details] [diff] [review]
Proposed patch for ESR

Could you please re-test on Windows?
FWIW, .diff is the correct file extension for patches.
Attachment #9112844 - Attachment is patch: true
Attachment #9112844 - Flags: review- → review?(alessandro)
Attachment #9112844 - Attachment is obsolete: false
Comment on attachment 9112844 [details] [diff] [review]
Proposed patch for ESR

This issue happens also on Linux, and I still think that reordering CSS hierarchy is not the right solution.
Asking Richard to review this.
Attachment #9112844 - Flags: review?(alessandro) → review?(richard.marti)
Attachment #9114677 - Flags: review?(ben.bucksch) → review?(richard.marti)
Comment on attachment 9112844 [details] [diff] [review]
Proposed patch for ESR

This is for ESR only, true? C-C has this already.

Yes, the @import has to be before the @namespace.
Attachment #9112844 - Flags: review?(richard.marti) → review+
Assignee: alessandro → neil

Thanks Richard, if the first patch fixes the issue you can disregard mine.

Comment on attachment 9114677 [details] [diff] [review]
1596582-account-creation.patch

This wouldn't work without Neil's patch and is no more needed.
Attachment #9114677 - Flags: review?(richard.marti) → review-
Comment on attachment 9112844 [details] [diff] [review]
Proposed patch for ESR

[Approval Request Comment]
Regression caused by (bug #): 
User impact if declined: 
Testing completed (on c-c, etc.): 
Risk to taking this patch (and alternatives if risky):
Attachment #9112844 - Flags: approval-comm-esr68?

This is for ESR only, true? C-C has this already

Indeed (which shows that the fix was correct):
https://searchfox.org/comm-central/source/mail/themes/windows/mail/accountCreation.css

Needs landing on ESR

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Attachment #9112844 - Attachment description: Proposed patch → Proposed patch for ESR
Target Milestone: --- → Thunderbird 68.0
Attachment #9114677 - Attachment is obsolete: true

The commit message is incorrect, it should be updated to something like: Bug 1596582 - Fix incorrect CSS import hierarchy in accountCreation.css. r=Paenglab

This issue is still present on Linux.
I'm gonna submit a patch for it.

Assignee: neil → alessandro
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
OS: Windows 10 → All

Richard, how is this looking on macos?

Flags: needinfo?(richard.marti)

This fixes the problem for Linux.

Attachment #9115543 - Flags: review?(mkmelin+mozilla)

FWIW, it works fine here on Linux for me. I'm a little puzzled that you still have the problem after Neil's patch.

Would be nice for Richard to review this. Maybe he has a hunch what's going on.

It's pretty weird indeed. I asked a review to Magnus because I know he's on an Ubuntu system as well, and if I'm not wrong Richard is on Windows and macos.
Let's see what they both report.

Tried on Mac and Linux Mint too - no cut off text or buttons. Could this be a scaling issue as you use a HiDPI screen?

Flags: needinfo?(richard.marti)
Attachment #9115543 - Attachment is patch: true

You're going to put this into TB 68.4 ESR? Pretty bad UI if we don't, IMHO.

Flags: needinfo?(mkmelin+mozilla)
Comment on attachment 9115543 [details] [diff] [review]
1596582-account-creation_Linux-follow-up.patch

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

I don't see this problem either. But if it fixes it for you, shouldn't hurt
Attachment #9115543 - Flags: review?(mkmelin+mozilla) → review+
Flags: needinfo?(mkmelin+mozilla)
Attachment #9112844 - Flags: approval-comm-esr68? → approval-comm-esr68+
Comment on attachment 9115543 [details] [diff] [review]
1596582-account-creation_Linux-follow-up.patch

> I don't see this problem either. But if it fixes it for you, shouldn't hurt

Did you build or patch 68? Both are 68-only patches?

I did build 68 yes. Both are 68-only afaik.

Comment on attachment 9115543 [details] [diff] [review]
1596582-account-creation_Linux-follow-up.patch

OK, then let's stick the flag on here as well. BTW, I've never built 68, it won't work since you need other rust, etc. I do try builds or unpack omni.ja which works nicely.
Attachment #9115543 - Flags: approval-comm-esr68+

At least on linux I can build both just by updating to the right m-c and c-c revisions.

Lucky you :-) - I have all the necessary repositories, but building 68 just fails miserably, mostly due to wrong rust version, etc.

Geoff, you missed landing this bug and hence the panel still looks bad. This is part of the overall improvement package for Exchange detection.

Flags: needinfo?(geoff)
Status: REOPENED → RESOLVED
Closed: 4 years ago4 years ago
Resolution: --- → FIXED

Perhaps you should not set the milestone until the bug is fixed.

Umm, how would the BMO query work then? You want to query all bugs with the approval bit set? The query I used to use qualified on the target milestone and the flags. Bugs with no target milestone set were missed for sure. Feel free to organise it differently in the future.

Looks good in TB 68.4 on Windows.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: