fix(news): show the News panel in the phone Context sheet only

Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
Mazeyar Moeini FeizabadiandClaude Fable 5.2 committed 2026-11-10 21:26:48 +01:00
1 parent fd9373c09c
commit 369b8e924a
2 files changed
+23 -2

No files matched your search

+17
View File
@@ -977,3 +977,20 @@ test('a slow downward pull is claimed before Android native scroll takes ownersh
assert.equal(shell.getSheet(), null);
shell.destroy();
});
test('on phones the News panel shows in the Context sheet only, like Weather', () => {
const css = readFileSync(
new URL('./styles/mobile-shell.css', import.meta.url),
'utf8',
);
// Hidden by id: the rail's own `#news-panel:not(.collapsed)` rule outranks
// the generic `#right-context-rail > *` hiding rule.
assert.match(
css,
/body\.mobile-shell #right-context-rail > #news-panel,\n[^{}]*\{\s*display: none;/,
);
assert.match(
css,
/body\.mobile-shell\[data-mobile-sheet='context'\]\s+#right-context-rail\s+> #news-panel:not\(\[hidden\]\),/,
);
});
+6 -2
View File
@@ -156,9 +156,10 @@ body.mobile-shell[data-mobile-sheet='more'] #right-context-rail {
body.mobile-shell #left-panel-stack > *,
body.mobile-shell #right-context-rail > *,
/* Rail rules show expanded Weather and Recent Imagery by id; on phones they
belong to the Context sheet only. */
/* Rail rules show expanded Weather, News and Recent Imagery by id; on phones
they belong to the Context sheet only. */
body.mobile-shell #right-context-rail > #weather-panel,
body.mobile-shell #right-context-rail > #news-panel,
body.mobile-shell #right-context-rail > #recent-imagery-panel {
display: none;
}
@@ -182,6 +183,9 @@ body.mobile-shell[data-mobile-sheet='context']
body.mobile-shell[data-mobile-sheet='context']
#right-context-rail
> #weather-panel:not([hidden]),
body.mobile-shell[data-mobile-sheet='context']
#right-context-rail
> #news-panel:not([hidden]),
body.mobile-shell[data-mobile-sheet='context']
#right-context-rail
> #recent-imagery-panel:not([hidden]),