Closed Bug 2042138 Opened 11 days ago Closed 14 hours ago

Chat Accounts: window has no minimum size and content does not stretch (regression from bug 1889422)

Categories

(Thunderbird :: Instant Messaging, defect)

Thunderbird 151
defect

Tracking

(thunderbird_esr140 wontfix, thunderbird152 wontfix)

RESOLVED FIXED
153 Branch
Tracking Status
thunderbird_esr140 --- wontfix
thunderbird152 --- wontfix

People

(Reporter: rautyrauty, Assigned: rautyrauty)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

Steps to reproduce:

Chat Accounts window has no minimum size enforced and its content
does not stretch when the window is enlarged. Both regressions came
in together with the XUL <window> → XHTML <html> migration in
bug 1889422.

STR — A: no min size

  1. Chat → Show Accounts; add an account.
  2. Drag the window border smaller.

STR — B: no stretch

  1. Show Accounts; enlarge the window.

Actual: content stays at the top-left at its intrinsic size;
empty strips on the right of rows and below the buttons.
Expected: content fills the chrome window.

Background

Downstream users also report buttons clipped at first open. Seen
once during triage; could not reliably reproduce on a clean
profile.

Cause

Before bug 1889422 the root was a XUL <window style="width: 41em; height: 27em;"> (from the
accountsWindow2.style DTD entity). On a XUL window style
sets the initial chrome window size, the window resists
shrinking past intrinsic content, and flex="1" on inner XUL
boxes works natively. Bug 1889422 rewrote the root as XHTML
<html> and dropped the DTD entity. On XHTML style on the root
is a CSS size on the html element (not the window), <html:body>
renders as block, and the inner <xul:hbox flex="1"> cannot grow
inside a block parent. Neither the min size nor the flex
behaviour was carried over.

Fix

  • imAccounts.xhtml: inline style="min-width: 41em; min-height: 27em;"
    on the html root (form matches abSearchDialog.xhtml).
  • imAccounts.css: #accountManager and > body become flex
    columns sized to 100vw/100vh; explicit flex: 1 1 auto on the
    middle hbox:has(#accountlist) (XUL flex="1" does not map to
    CSS flex-grow inside an HTML flex container).

Patch attached.

Actual results:

Window shrinks past the content; Create Account / Close
buttons clip off, no in-dialog way back.

Expected results:

A min size that keeps the button row visible.

This is a regression from bug 1889422, which migrated imAccounts.xhtml
from a XUL <window> to an XHTML <html> root. Two things were lost:

  1. The accountsWindow2.style DTD entity that supplied the default
    "width: 41em; height: 27em;". Without it the dialog opens at the
    intrinsic minimum of its content, clipping the bottom button row
    (Create Account / Close).

  2. Flex layout on the root. The inner <xul:hbox flex="1"> holding the
    account list cannot grow: html:body renders as block, XUL flex="1"
    on a block parent has no effect, and the content stays at its
    intrinsic size no matter how large the window becomes.

Reintroduce the default size via min-width/min-height on the XHTML
root (matching abSearchDialog.xhtml) so the chrome window can still
grow past it, and make #accountManager and its body a flex column so
the middle hbox stretches.

Assignee: nobody → rautyrauty
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

It would be from bug 1703164

Regressed by: 1703164
No longer regressed by: 1889422
Attachment #9589374 - Attachment is obsolete: true
Target Milestone: --- → 153 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/93e6e125255a
Restore default size and flex layout of the chat Accounts window. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 14 hours ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: