Closed Bug 1836818 Opened 11 months ago Closed 11 months ago

Fix FOUC issues encountered when using an external stylesheet in the about:logins timeline component

Categories

(Core :: CSS Parsing and Computation, defect)

defect

Tracking

()

RESOLVED FIXED
116 Branch
Tracking Status
firefox116 --- fixed

People

(Reporter: hjones, Assigned: emilio)

References

Details

Attachments

(2 files)

There is work being done in Bug 1834533 to move away from inline styles in login-timeline.mjs in favour of using an external stylesheet. We now have consensus that using an external stylesheet is the preferred approach for styling new components, but that login timeline bug is still blocked by an FOUC caused by that approach, since loading the stylesheet doesn't block the paint of the shadow root.

A similar issue was encountered when we were implementing the moz-toggle element, and was fixed in Bug 1799200 via a patch to sync-load stylesheets for shadow trees in chrome documents. We're curious if the same kind of platform level fix might be possible in this case. If not we may have to try a different approach.

Attached image fouc.gif

Hey :emilio curious if you have time to take a look at this since your implemented the platform workaround that enabled us to use external stylesheets with our Lit based web components elsewhere. To reproduce the issue you can:

  • Apply this patch locally: https://phabricator.services.mozilla.com/D178962
  • Navigate to about:logins and create a couple of login items if your list is empty
  • Refresh the page a few times with one of those login items selected and observe the timeline element. An noticeable FOUC seems to reproduce pretty consistently, anecdotally more consistently if you hard refresh. It tends to manifest as a flash of a big black SVG circle - I've attached a super slowed down GIF of this for context.

I've filed this as a separate bug, but some of the discussion in Bug 1834533 might also be relevant, in particular :mstriemer's comment here (the tl;dr on the rest of the discussion is that everyone has agreed to use external stylesheets as long as the FOUC issue is addressable).

Flags: needinfo?(emilio)
Assignee: nobody → emilio
Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/78f4ea7de456
Tweak chrome document check so that it also applies to about:logins. r=smaug
Status: NEW → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 116 Branch
Component: about:logins → CSS Parsing and Computation
Product: Firefox → Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: