Skip to content

Commit b3babe6

Browse files
shakyShaneShane Osbourne
andauthored
ntp: favicon fixes (#1286)
Co-authored-by: Shane Osbourne <[email protected]>
1 parent 4f6b7e2 commit b3babe6

File tree

4 files changed

+19
-19
lines changed

4 files changed

+19
-19
lines changed

special-pages/pages/new-tab/app/favorites/components/Tile.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ function ImageLoader({ faviconSrc, faviconMax, title, url }) {
9595
onError={imgError}
9696
data-src={faviconSrc}
9797
data-fallback={fallbackSrcFor(url) || DDG_FALLBACK_ICON}
98-
style={size !== DDG_DEFAULT_ICON_SIZE ? { width: size, height: size } : undefined}
9998
/>
10099
);
101100
}

special-pages/pages/new-tab/app/favorites/components/Tile.module.css

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,16 @@
5757

5858
.favicon {
5959
display: block;
60-
width: 2rem;
61-
height: 2rem;
62-
border-radius: var(--border-radius-md);
60+
max-height: calc(32 * var(--px-in-rem));
61+
max-width: calc(32 * var(--px-in-rem));
6362
background-repeat: no-repeat;
6463
background-size: contain;
6564
pointer-events: none;
6665

6766
&[data-loaded][data-did-try-fallback] {
6867
border-radius: var(--border-radius-md);
68+
height: calc(32 * var(--px-in-rem));
69+
width: calc(32 * var(--px-in-rem));
6970
}
7071
}
7172

special-pages/pages/new-tab/app/favorites/mocks/favorites.data.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,22 @@ export const favorites = {
1919
// prettier-ignore
2020
/** @type {Favorite[]} */
2121
favorites: [
22-
{ id: 'id-many-1', url: 'https://example.com?id=id-many-1', title: 'Amazon', favicon: { src: './company-icons/amazon.svg', maxAvailableSize: 64 } },
22+
{ id: 'id-many-1', url: 'https://example.com?id=id-many-1', title: 'Amazon', favicon: { src: './company-icons/amazon.svg', maxAvailableSize: 16 } },
2323
{ id: 'id-many-2', url: 'https://example.com?id=id-many-2', title: 'Adform', favicon: null },
24-
{ id: 'id-many-3', url: 'https://a.example.com?id=id-many-3', title: 'Adobe', favicon: { src: './this-does-note-exist', maxAvailableSize: 64 } },
25-
{ id: 'id-many-4', url: 'https://b.example.com?id=id-many-3', title: 'Adobe', favicon: { src: './this-does-note-exist', maxAvailableSize: 64 } },
26-
{ id: 'id-many-31', url: 'https://b.example.com?id=id-many-4', title: 'A Beautiful Mess', favicon: { src: './this-does-note-exist', maxAvailableSize: 64 } },
24+
{ id: 'id-many-3', url: 'https://a.example.com?id=id-many-3', title: 'Adobe', favicon: { src: './this-does-note-exist', maxAvailableSize: 16 } },
25+
{ id: 'id-many-4', url: 'https://b.example.com?id=id-many-3', title: 'Adobe', favicon: { src: './this-does-note-exist', maxAvailableSize: 16 } },
26+
{ id: 'id-many-31', url: 'https://b.example.com?id=id-many-4', title: 'A Beautiful Mess', favicon: { src: './this-does-note-exist', maxAvailableSize: 16 } },
2727
{ id: 'id-many-5', url: 'https://222?id=id-many-3', title: 'Gmail', favicon: null },
28-
{ id: 'id-many-6', url: 'https://example.com?id=id-many-5', title: 'TikTok', favicon: { src: './company-icons/bytedance.svg', maxAvailableSize: 64 } },
29-
{ id: 'id-many-7', url: 'https://example.com?id=id-many-6', title: 'DoorDash', favicon: { src: './company-icons/d.svg', maxAvailableSize: 64 } },
30-
{ id: 'id-many-8', url: 'https://example.com?id=id-many-7', title: 'Facebook', favicon: { src: './company-icons/facebook.svg', maxAvailableSize: 64 } },
31-
{ id: 'id-many-9', url: 'https://example.com?id=id-many-8', title: 'Beeswax', favicon: { src: './company-icons/beeswax.svg', maxAvailableSize: 64 } },
32-
{ id: 'id-many-10', url: 'https://example.com?id=id-many-9', title: 'Adobe', favicon: { src: './company-icons/adobe.svg', maxAvailableSize: 64 } },
33-
{ id: 'id-many-11', url: 'https://example.com?id=id-many-10', title: 'Beeswax', favicon: { src: './company-icons/beeswax.svg', maxAvailableSize: 64 } },
34-
{ id: 'id-many-12', url: 'https://example.com?id=id-many-11', title: 'Facebook', favicon: { src: './company-icons/facebook.svg', maxAvailableSize: 64 } },
35-
{ id: 'id-many-13', url: 'https://example.com?id=id-many-12', title: 'Gmail', favicon: { src: './company-icons/google.svg', maxAvailableSize: 64 } },
36-
{ id: 'id-many-14', url: 'https://example.com?id=id-many-13', title: 'TikTok', favicon: { src: './company-icons/bytedance.svg', maxAvailableSize: 64 } },
37-
{ id: 'id-many-15', url: 'https://example.com?id=id-many-14', title: 'yeti', favicon: { src: './company-icons/d.svg', maxAvailableSize: 64 } }
28+
{ id: 'id-many-6', url: 'https://example.com?id=id-many-5', title: 'TikTok', favicon: { src: './company-icons/bytedance.svg', maxAvailableSize: 16 } },
29+
{ id: 'id-many-7', url: 'https://example.com?id=id-many-6', title: 'DoorDash', favicon: { src: './company-icons/d.svg', maxAvailableSize: 16 } },
30+
{ id: 'id-many-8', url: 'https://example.com?id=id-many-7', title: 'Facebook', favicon: { src: './company-icons/facebook.svg', maxAvailableSize: 16 } },
31+
{ id: 'id-many-9', url: 'https://example.com?id=id-many-8', title: 'Beeswax', favicon: { src: './company-icons/beeswax.svg', maxAvailableSize: 16 } },
32+
{ id: 'id-many-10', url: 'https://example.com?id=id-many-9', title: 'Adobe', favicon: { src: './company-icons/adobe.svg', maxAvailableSize: 16 } },
33+
{ id: 'id-many-11', url: 'https://example.com?id=id-many-10', title: 'Beeswax', favicon: { src: './company-icons/beeswax.svg', maxAvailableSize: 16 } },
34+
{ id: 'id-many-12', url: 'https://example.com?id=id-many-11', title: 'Facebook', favicon: { src: './company-icons/facebook.svg', maxAvailableSize: 16 } },
35+
{ id: 'id-many-13', url: 'https://example.com?id=id-many-12', title: 'Gmail', favicon: { src: './company-icons/google.svg', maxAvailableSize: 16 } },
36+
{ id: 'id-many-14', url: 'https://example.com?id=id-many-13', title: 'TikTok', favicon: { src: './company-icons/bytedance.svg', maxAvailableSize: 16 } },
37+
{ id: 'id-many-15', url: 'https://example.com?id=id-many-14', title: 'yeti', favicon: { src: './company-icons/d.svg', maxAvailableSize: 16 } }
3838
],
3939
},
4040
two: {

special-pages/pages/new-tab/app/telemetry/telemetry.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export class Telemetry {
1212
eventTarget = new EventTarget();
1313
/** @type {any[]} */
1414
eventStore = [];
15-
storeEnabled = true;
15+
storeEnabled = false;
1616

1717
/**
1818
* @param now

0 commit comments

Comments
 (0)