Page MenuHomePhabricator

[web] Remove `safari-pinned-tab.svg`
ClosedPublic

Authored by atul on Jun 24 2022, 3:14 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 28, 12:24 AM
Unknown Object (File)
Wed, Nov 20, 8:17 PM
Unknown Object (File)
Wed, Nov 20, 7:22 PM
Unknown Object (File)
Wed, Nov 20, 7:17 PM
Unknown Object (File)
Wed, Nov 20, 6:27 PM
Unknown Object (File)
Wed, Nov 20, 4:06 PM
Unknown Object (File)
Wed, Nov 20, 4:06 PM
Unknown Object (File)
Tue, Nov 12, 9:38 AM
Subscribers

Details

Summary

Addresses https://linear.app/comm/issue/ENG-963/remove-old-squad-cal-favicon-on-safari

It used to be that Safari didn't display favicons for each tab and instead showed the page title. However, if a tab was pinned--or there wasn't enough space to show an abbreviated title--it would display the first letter of the page title:

reopen-historical-tabs-mac-safari.jpg (880×1 px, 175 KB)

Save-all-open-Safari-tabs-in-bookmark-folder.jpg (349×620 px, 28 KB)

Apple gave the option of providing a black square SVG (safari-pinned-tab.svg) to be displayed for "pinned" tabs and the ability to specify a tint color for "active" tabs.

However, recent versions of Safari display favicons for tabs across the board (it's no longer even possible to disable them), and including safari-pinned-tab.svg is no longer necessary... but Safari will still use it if it's provided. Based on what I've read, it seems like the only reason to specify safari-pinned-tab.svg is if you want something other than the default favicon to be displayed on just Safari. I don't think that's something we care about.

Test Plan

Ensured correct favicon displayed in Safari/Chrome after clearing cache.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

atul requested review of this revision.Jun 24 2022, 3:19 PM

see if tunnelbroker CI gets triggered

This revision is now accepted and ready to land.Jun 27 2022, 2:37 AM

However, recent versions of Safari display favicons for tabs across the board (it's no longer even possible to disable them), and including safari-pinned-tab.svg is no longer necessary... but Safari will still use it if it's provided. Based on what I've read, it seems like the only reason to specify safari-pinned-tab.svg is if you want something other than the default favicon to be displayed on just Safari. I don't think that's something we care about.

Got it. That makes sense.

Was able to reproduce this diff with the intended effects on Safari, so looks good to me! One last thing, and this is probably better suited for a future diff, but it seems like the Comm icon on Safari isn't trimmed perfectly/has white bezels:

image.png (198×410 px, 10 KB)

This isn't an issue on Chrome:
image.png (106×280 px, 8 KB)

Edit: Never mind. Looks like Safari inserts a white background by default when in Dark Mode.

Read more: https://stackoverflow.com/questions/59233531/safari-favicon-incorrectly-rendering-with-white-background

https://www.leereamsnyder.com/blog/favicons-in-2021#safari-does-not-fully-support-svg-icons

Never mind. Looks like Safari inserts a white background by default when in Dark Mode.

Thanks for looking into this!

This revision was landed with ongoing or failed builds.Jun 27 2022, 8:46 AM
This revision was automatically updated to reflect the committed changes.