Easteregg fix#1625
Conversation
easter egg only works on dark background. This refactor: - ensures only shows on dark background - slight refactor so that toggling between light/dark mode in dev tools (or potentially a user facing toggle in the future) will also switch logo when easter egg is on.
janriokrause
left a comment
There was a problem hiding this comment.
Really nice fix. The --fl-logo-url signal is a clever way to detect the dark nav, and the play() cleanup is a great catch for preventing expected AbortErrors from spamming Sentry. 🎉
One tiny thing (non-blocking): in activate() we remove the <img> from the default flare header, but teardown() only restores the CSS background and sizing. So after a dark→light flip the wordmark looks identical, but the original DOM node is never restored. This is fine with the current CSS, though it could become noticeable if the logo asset or background-based rendering changes later. Re-inserting the same <img> during teardown would make it a more complete inverse of activate(), but it's still totally fine to ship as-is. 😊
Instead of removing the static wordmark <img> in activate() and never restoring it, leave it in place and hide it with .fl-logo-fx:has(.fl-video-ready) img. Removing the video on teardown now reverses cleanly with no manual restore.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1625 +/- ##
==========================================
+ Coverage 87.55% 87.63% +0.08%
==========================================
Files 154 158 +4
Lines 10732 10843 +111
==========================================
+ Hits 9396 9502 +106
- Misses 1336 1341 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Fix easter egg logo on light-theme pages
The easter egg logo WebM is the white wordmark, so it only shows up on a dark nav. On light-theme pages (e.g.
/features/protection) it rendered white-on-white and disappeared.Changes
fl-logo-fxclass; leave those alone so the Firefox flame never replaces a partner logo.play()error handling. Reset state instead of rethrowing, avoiding an uncatchable unhandled rejection and a stuck-state bug.Testing