Skip to content

Commit 7e8432f

Browse files
authored
ntp: ensure cross-window sections collapse (#1387)
* ntp: ensure cross-window sections collapse * style regression
1 parent 4110c05 commit 7e8432f

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const ROW_CAPACITY = 6;
2323
/**
2424
* Note: These values MUST match exactly what's defined in the CSS.
2525
*/
26-
const ITEM_HEIGHT = 90;
26+
const ITEM_HEIGHT = 96;
2727
const ROW_GAP = 8;
2828

2929
/**

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,9 +116,7 @@ export function FavoritesProvider({ children }) {
116116
(cb) => {
117117
if (!service.current) return;
118118
return service.current.onConfig((event) => {
119-
if (event.source === 'manual') {
120-
cb(event.data);
121-
}
119+
cb(event.data);
122120
});
123121
},
124122
[service],

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

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
outline: none;
99
padding-left: var(--sp-3);
1010
padding-right: var(--sp-3);
11+
height: 96px;
1112

1213
&:focus-visible .icon {
1314
box-shadow: var(--focus-ring);
@@ -33,7 +34,7 @@
3334
justify-items: center;
3435
width: var(--icon-width);
3536
height: var(--icon-width);
36-
margin-bottom: 4px;
37+
margin-bottom: 6px;
3738
border-radius: var(--border-radius-lg);
3839
}
3940

@@ -88,13 +89,25 @@
8889
height: calc(32 * var(--px-in-rem));
8990
width: calc(32 * var(--px-in-rem));
9091
}
92+
93+
/*&[data-state="loading favicon-src"] {*/
94+
/* outline: 1px solid blue;*/
95+
/*}*/
96+
97+
/*&[data-state="did load favicon-src"] {*/
98+
/* outline: 1px solid green;*/
99+
/*}*/
100+
101+
/*&[data-state="did load fallback"] {*/
102+
/* outline: 1px dotted orange;*/
103+
/*}*/
91104
}
92105

93106
.text {
94107
width: var(--icon-width);
95108
text-align: center;
96109
font-size: calc(10 * var(--px-in-rem));
97-
line-height: 1.1;
110+
line-height: calc(13 * var(--px-in-rem));
98111
font-weight: 400;
99112
overflow: hidden;
100113
text-overflow: ellipsis;

0 commit comments

Comments
 (0)