Port Bug 2051196 - Add a global [hidden] { display: none !important } rule instead of :not([hidden]) display guards
Categories
(Thunderbird :: Upstream Synchronization, defect, P5)
Tracking
(Not tracked)
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
Updated•21 days ago
|
Updated•21 days ago
|
| Assignee | ||
Comment 1•21 days ago
|
||
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
hiddenin markup and
was shown via.tls-error > .status-icon { display: unset }. Toggle
row.statusIcon.hiddenin the show-tls-error / server-connection-succeeded
handlers instead, and drop thedisplay: unsetoverride. -
Findbar: the <lazy-findbar> wrapper is a transparent
display: contents
layout passthrough; the inner <findbar> owns visibility (and hides itself via
visibility: collapseso it can animate). Stop toggling the wrapper's own
hiddenattribute in the setter and drophidden="true"from the markup, so
the global rule can'tdisplay: nonethe 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.
#brandingHeaderis
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.
| Assignee | ||
Comment 2•21 days ago
|
||
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
| Comment hidden (Intermittent Failures Robot) |
Updated•14 days ago
|
Description
•