Skip to content
This repository has been archived by the owner. It is now read-only.

feat(topsites): Set Top Site card image source to high-res icon when available #3395

Merged
merged 1 commit into from Sep 11, 2017

Conversation

@sarracini
Copy link
Contributor

@sarracini sarracini commented Sep 8, 2017

Fix #3327. Generalize the icons so that it's just a rich icon instead of a screenshot

@Mardak
Copy link
Member

@Mardak Mardak commented Sep 10, 2017

The m-c change to provide favicon size has landed, and even without nan's fetch high resolution icons, some sites already put a large icon as their usual favicon (<link rel="icon"/>):

Before:
screen shot 2017-09-10 at 9 07 34 am

After:
screen shot 2017-09-10 at 9 07 46 am

So this PR seems like it can be reviewed now. (Looks like we want to set a background when using icons in case they're transparent. Or maybe hide the letter fallback.)

@@ -129,7 +129,7 @@
}
}

.tippy-top-icon {
.rich-icon {
position: absolute;

This comment has been minimized.

@Mardak

Mardak Sep 10, 2017
Member

Might be okay to just put a background-color: white here?

image

Or use $background-primary (grey-10 #f9f9fa):
image

As long as it hides the fallback ;)
screen shot 2017-09-10 at 9 07 46 am

@aaronrbenson ?

This comment has been minimized.

@aaronrbenson

aaronrbenson Sep 11, 2017
Collaborator

I lean towards the grey-10 option here just in case there's a white icon. It's not perfect but at least you could make out that something is there.

Copy link
Member

@k88hudson k88hudson left a comment

R+ one comment

let imageClassName;
let imageStyle;
if (tippyTopIcon) {
imageClassName = "tippy-top-icon";
if (tippyTopIcon || faviconSize >= 96) {

This comment has been minimized.

@k88hudson

k88hudson Sep 11, 2017
Member

Maybe make this a constant like MIN_FAVICON_SIZE

@sarracini sarracini force-pushed the sarracini:gh3327 branch from 4bd6727 to 7357c19 Sep 11, 2017
@sarracini sarracini merged commit 221836f into mozilla:master Sep 11, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@sarracini sarracini deleted the sarracini:gh3327 branch Jan 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants