Closed Bug 2051938 Opened 21 days ago Closed 21 days ago

Port Bug 2051196 - Add a global [hidden] { display: none !important } rule instead of :not([hidden]) display guards

Categories

(Thunderbird :: Upstream Synchronization, defect, P5)

Thunderbird 154
defect

Tracking

(Not tracked)

RESOLVED FIXED
154 Branch

People

(Reporter: intermittent-bug-filer, Assigned: john)

References

Details

(Keywords: intermittent-testcase, Whiteboard: [collect_confirm_failure])

Attachments

(2 files)

Filed by: john [at] thunderbird.net



Assignee: nobody → john
Status: NEW → ASSIGNED
Version: unspecified → Thunderbird 154

Bug 2051196 added a global :where([hidden]) { display: none !important }
rule to the shared toolkit stylesheets Thunderbird loads (global-shared.css,
in-content/common-shared.css, findbar.css). This makes the hidden attribute
authoritative: a plain (non-!important) display: rule can no longer reveal an
element that carries hidden. Several Thunderbird widgets relied on exactly
that, so they were left stuck hidden.

Fix each by letting the hidden attribute drive visibility, keeping CSS
display for layout only:

  • Folder tree TLS-error status icon: the button carries hidden in markup and
    was shown via .tls-error > .status-icon { display: unset }. Toggle
    row.statusIcon.hidden in the show-tls-error / server-connection-succeeded
    handlers instead, and drop the display: unset override.

  • Findbar: the <lazy-findbar> wrapper is a transparent display: contents
    layout passthrough; the inner <findbar> owns visibility (and hides itself via
    visibility: collapse so it can animate). Stop toggling the wrapper's own
    hidden attribute in the setter and drop hidden="true" from the markup, so
    the global rule can't display: none the wrapper and kill the findbar. The
    wrapper's open/closed state is still reported from the inner findbar.

  • Account hub branding header: no production change. #brandingHeader is
    correctly hidden by default and shown per step via showBrandingHeader(); the
    bug just made that gate actually work. The two header tests were relying on
    the previous always-visible behaviour, so they now call showBrandingHeader()
    the same way the step widgets do.

A tree-wide audit found no other instances of the anti-pattern; comm elsewhere
already uses :not([hidden]) guards or pure-attribute visibility.

See Also: → 2051406

Bug 2051196's global :where([hidden]) { display: none !important } makes the
hidden attribute win over author display rules. The account hub header relied
on the old behaviour in two spots:

  • The first-run welcome branding lives in #brandingHeader, which is shown per
    step via showBrandingHeader(). The initial email-auto-form step never called
    it -- it only appeared before because branding was always visible -- so on
    first run the welcome text stayed hidden. Call showBrandingHeader() from its
    connectedCallback, like the other steps already do.

  • The close and minimize buttons were nested inside #brandingHeader, so they
    vanished on every step that doesn't show branding (and the dialog could no
    longer be closed from those steps). Move #headerButtonsContainer out to be a
    direct child of #accountHubHeader so the window controls are always present.
    Applied to the header template and the account hub test fixtures.

The first-run header test now calls showBrandingHeader() to exercise the
branding the same way the steps do.

Pushed by john@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/51ced801b91c
Make the hidden attribute authoritative for visibility after bug 2051196's global [hidden] rule. r=freaktechnik
https://hg.mozilla.org/comm-central/rev/5c103155a04e
Restore account hub header branding and window controls after bug 2051196. r=freaktechnik

Status: ASSIGNED → RESOLVED
Closed: 21 days ago
Resolution: --- → FIXED
Target Milestone: --- → 154 Branch
See Also: → 2051196
Summary: Port Bug 2051196 → Port Bug 2051196 - Add a global [hidden] { display: none !important } rule instead of :not([hidden]) display guards
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: