Stories: phone entry, centred framing, review follow-ups

- On GEV's phone layout, where neither the style readout nor the account
  avatar shows, the Stories button goes icon-only under the corner-actions
  column instead of covering the top row of icon buttons.
- Explore frames its start view and a picked story in the middle of the
  map it leaves visible (beside the feed, above the phone sheet), with one
  short correction if that area moved during the flight.
- The share icon stays visible in icon-only header buttons.
- A world clock nothing moved while Stories was open (no jump, same mode
  and rate) is left alone on Close.
- Card images use the globe's own Esri tile URL; the credit list keeps the
  application's full-screen placement on phones.
- Tests cover the live and playing clock restores, the clock coming back
  after the share state, the tile-settling hold being released (settled,
  10 s, Close), the visible-map aim, and the near-end Play fix in the
  director's real order. One changelog fragment covers the PR.
This commit is contained in:
Manjunath committed 2026-11-16 21:08:23 +05:30
1 parent 8a0953c35d
commit 472cc35c47
13 files changed
+351 -38

No files matched your search

+11
View File
@@ -146,4 +146,15 @@ test('the Stories button sits left of whatever is in the top-right corner', () =
);
// Nothing there yet.
assert.deepEqual(entryPlacement([null, null], 1960), { top: 14, right: 14 });
// GEV's phone layout: no readout or avatar; icon-only under the corner
// actions column, aligned with its right edge.
assert.deepEqual(
entryPlacement([box(0, 0, 0, 0), null], 639, box(594, 60, 33, 70)),
{ top: 138, right: 12, compact: true },
);
// A visible readout still wins over the column.
assert.deepEqual(
entryPlacement([box(400, 24, 200, 40), null], 639, box(594, 60, 33, 70)),
{ top: 24, right: 249 },
);
});
+10
View File
@@ -241,3 +241,13 @@ body.ui-clean-view #gev-stories .gs-pop {
#gev-stories .gs-hosted-toast {
background: rgba(12, 12, 20, 0.95);
}
/* GEV's phone layout: icon-only, the size of the icon buttons beside it. */
#gev-stories .gs-entry.gs-entry-compact {
width: 36px;
padding: 0;
justify-content: center;
}
#gev-stories .gs-entry.gs-entry-compact span {
display: none;
}
+14 -6
View File
@@ -379,7 +379,7 @@
padding: 0;
justify-content: center;
}
#gev-stories .scr-story .s-head .h-right .tbtn span {
#gev-stories .scr-story .s-head .h-right .tbtn span:not(.share-icon) {
display: none;
}
}
@@ -3562,7 +3562,12 @@
border-radius: 50%;
border-color: var(--glass-border-hover);
}
#gev-stories #scrExplore .s-head .h-right .tbtn.hide-m:not(.accent) span {
#gev-stories
#scrExplore
.s-head
.h-right
.tbtn.hide-m:not(.accent)
span:not(.share-icon) {
display: none;
}
#gev-stories #scrExplore .s-head .h-right .tbtn.hide-m:not(.accent) svg {
@@ -3805,10 +3810,13 @@ body.stories-mode:not(#gs-a):not(#gs-b) #gev-credits {
bottom: var(--gs-credit-bottom, 36px) !important;
left: var(--gs-credit-left, 36px) !important;
}
/* The application's credit list opens just above its line, wherever that is. */
body.stories-mode:not(#gs-a):not(#gs-b) .gev-credits-panel {
bottom: calc(var(--gs-credit-bottom, 36px) + 24px);
left: var(--gs-credit-left, 36px);
/* The application's credit list opens just above its line, wherever that is;
on a phone it keeps the application's full-screen list. */
@media (min-width: 576px) {
body.stories-mode:not(#gs-a):not(#gs-b) .gev-credits-panel {
bottom: calc(var(--gs-credit-bottom, 36px) + 24px);
left: var(--gs-credit-left, 36px);
}
}
/* On a phone the line wraps and shrinks to stay on screen, as the phone
shell does outside recording mode. */
+7 -2
View File
@@ -39,11 +39,14 @@ const reduceMotion = () =>
// GEV has its ACTIVE STYLE readout there; GEV Hosted adds the account
// avatar, which can come after Stories mounts (sign-in).
const CORNER = ['style-indicator', 'account-control'];
// GEV's phone layout shows neither; the button then sits under this column.
const COLUMN = 'corner-actions';
const entry = ref({ top: 14, right: 14 });
function placeEntry() {
entry.value = entryPlacement(
CORNER.map((id) => document.getElementById(id)?.getBoundingClientRect()),
innerWidth,
document.getElementById(COLUMN)?.getBoundingClientRect() ?? null,
);
}
let entryTries = 0;
@@ -63,7 +66,7 @@ function watchCorner() {
});
}
if (globalThis.ResizeObserver) cornerObserver ??= new ResizeObserver(placeEntry);
for (const id of CORNER) {
for (const id of [...CORNER, COLUMN]) {
const el = document.getElementById(id);
if (el && cornerObserver && !observed.has(el)) {
cornerObserver.observe(el);
@@ -71,7 +74,7 @@ function watchCorner() {
}
}
// Keep looking for a while for a control that mounts late.
if (observed.size < CORNER.length && ++entryTries < 20)
if (observed.size < CORNER.length + 1 && ++entryTries < 20)
entryTimer = setTimeout(watchCorner, 1000);
}
@@ -298,7 +301,9 @@ watch([mode, storyId], () => nextTick(watchCredit));
<button
id="hStories"
class="tbtn accent gs-entry"
:class="{ 'gs-entry-compact': entry.compact }"
type="button"
:aria-label="entry.compact ? t('Stories') : undefined"
:style="{ top: `${entry.top}px`, right: `${entry.right}px` }"
@click="openExplore"
>