mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-11 05:42:22 +00:00
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:
1 parent
fd9373c09c
commit
369b8e924a
2 files changed
+23
-2
No files matched your search
@@ -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\]\),/,
|
||||
);
|
||||
});
|
||||
@@ -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]),
|
||||
|
||||
Reference in new issue
Block a user