diff --git a/docs/CURRENT-STATE.md b/docs/CURRENT-STATE.md index aa140e9c2..35ed46791 100644 --- a/docs/CURRENT-STATE.md +++ b/docs/CURRENT-STATE.md @@ -779,7 +779,8 @@ Inside an inline embed Stories is not offered: the URL and history are the host's. The Stories button sits left of whatever holds GEV's top-right corner: the -ACTIVE STYLE readout, or GEV Hosted's account avatar. On GEV's phone layout, +ACTIVE STYLE readout, or an element placed in that corner (`#account-control`, +with or beside the readout). On GEV's phone layout, where neither shows, it is icon-only under the corner-actions column (`#corner-actions`), aligned with its right edge. The first-visit popup is a labelled region that does not take focus. The story page's rail offers diff --git a/src/stories/boot.test.mjs b/src/stories/boot.test.mjs index 5a3c1b7dc..0ab000097 100644 --- a/src/stories/boot.test.mjs +++ b/src/stories/boot.test.mjs @@ -171,7 +171,7 @@ test('a failed load is reported and the next open tries again', async () => { test('a Stories link that cannot load is reported too', async () => { setActivePinia(createPinia()); - history.replaceState(null, '', '/?story=worldfx%3Afire-tracker'); + history.replaceState(null, '', '/?story=other%3Afire-tracker'); const store = useStoriesStore(); let failures = 0; bootStories({ diff --git a/src/stories/controller.js b/src/stories/controller.js index 1ae41e709..604a2f632 100644 --- a/src/stories/controller.js +++ b/src/stories/controller.js @@ -918,7 +918,7 @@ export function createStoriesController({ director.styleManager?.setPanelCollapsed?.('scene-panel', false, { explicit: true, }); - store.hostedToast = { + store.openedToast = { id: story.id, title: story.title, atMs, diff --git a/src/stories/controller.test.mjs b/src/stories/controller.test.mjs index d89d11f2b..75ccc1494 100644 --- a/src/stories/controller.test.mjs +++ b/src/stories/controller.test.mjs @@ -258,7 +258,7 @@ test('reopening while a scene tears down keeps the view from before Stories', as controller.open(); controller.openStory('gev:bhote-koshi-nepal-scene'); director.running = true; - const toast = store.hostedToast; + const toast = store.openedToast; const closing = controller.openInGev(); // The scene has moved the camera; the person opens Stories again at once. camera.position = { x: 9, y: 9, z: 9 }; @@ -267,7 +267,7 @@ test('reopening while a scene tears down keeps the view from before Stories', as await closing; assert.deepEqual(director.selected, []); assert.deepEqual(director.styleManager.panels, []); - assert.equal(store.hostedToast, toast); + assert.equal(store.openedToast, toast); assert.equal(camera.views.length, 0, 'no restore under the reopened Stories'); await controller.close(); const { x, y, z } = camera.views.at(-1).destination; diff --git a/src/stories/format.js b/src/stories/format.js index 16af0f1e4..20a99bed3 100644 --- a/src/stories/format.js +++ b/src/stories/format.js @@ -32,8 +32,8 @@ export function creditPlacement({ map, feed, width, height }) { /** * Where the Stories button sits: just left of the leftmost visible control - * in GEV's top-right corner — the ACTIVE STYLE readout in GEV, the account - * avatar (with or beside the readout) in GEV Hosted — top-aligned with it. + * in GEV's top-right corner — the ACTIVE STYLE readout, or an element placed + * in that corner (with or beside the readout) — top-aligned with it. * Where none of those shows (GEV's phone layout, whose top row of icon * buttons spans the corner), it goes icon-only just under the right-hand * column of corner actions, aligned with its right edge. diff --git a/src/ui/stores/stories.js b/src/ui/stores/stories.js index 2d9186046..9a0f71274 100644 --- a/src/ui/stores/stories.js +++ b/src/ui/stores/stories.js @@ -41,7 +41,7 @@ export const useStoriesStore = defineStore('stories', { /** Hints and toasts */ hint: '', toast: '', - hostedToast: null, + openedToast: null, popSeen: false, hintSeen: false, sheetHintSeen: false, diff --git a/src/ui/storiesCredit.test.mjs b/src/ui/storiesCredit.test.mjs index 177216c7e..c77accb01 100644 --- a/src/ui/storiesCredit.test.mjs +++ b/src/ui/storiesCredit.test.mjs @@ -134,19 +134,19 @@ test('the Stories button sits left of whatever is in the top-right corner', () = top: 24, right: 270, }); - // GEV Hosted: the account avatar beside the readout; the leftmost wins. + // An element placed beside the readout; the leftmost wins. assert.deepEqual( entryPlacement([box(1650, 24, 220, 60), box(1898, 22, 38, 38)], 1960), { top: 24, right: 320 }, ); - // Hosted with the readout hidden: the avatar alone. + // The readout hidden: that element alone. assert.deepEqual( entryPlacement([box(0, 0, 0, 0), box(1898, 22, 38, 38)], 1960), { top: 22, right: 72 }, ); // 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 + // GEV's phone layout: nothing in the corner; 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)), diff --git a/src/ui/styles/stories-entry.css b/src/ui/styles/stories-entry.css index f141d55c4..76c216f3e 100644 --- a/src/ui/styles/stories-entry.css +++ b/src/ui/styles/stories-entry.css @@ -202,7 +202,7 @@ body.ui-clean-view #gev-stories .gs-pop { z-index: 1201; left: auto; } -#gev-stories .gs-hosted-toast { +#gev-stories .gs-opened-toast { position: fixed; z-index: 1201; bottom: 110px; @@ -230,7 +230,7 @@ body.ui-clean-view #gev-stories .gs-pop { software WebGL): the closed-state pieces use a near-opaque fill instead. */ #gev-stories .gs-entry, #gev-stories .gs-pop, -#gev-stories .gs-hosted-toast { +#gev-stories .gs-opened-toast { -webkit-backdrop-filter: none; backdrop-filter: none; } @@ -238,7 +238,7 @@ body.ui-clean-view #gev-stories .gs-pop { background: rgba(6, 24, 34, 0.92); } #gev-stories .gs-pop, -#gev-stories .gs-hosted-toast { +#gev-stories .gs-opened-toast { background: rgba(12, 12, 20, 0.95); } diff --git a/src/ui/views/StoriesView.vue b/src/ui/views/StoriesView.vue index d72622310..e3740402e 100644 --- a/src/ui/views/StoriesView.vue +++ b/src/ui/views/StoriesView.vue @@ -30,14 +30,14 @@ const StoryScreen = defineAsyncComponent( * Story page. Both show GEV's own Cesium globe through their map areas. */ const store = useStoriesStore(); -const { mode, storyId, toast, hostedToast } = storeToRefs(store); +const { mode, storyId, toast, openedToast } = storeToRefs(store); const story = computed(() => (storyId.value ? store.byId(storyId.value) : null)); const reduceMotion = () => globalThis.matchMedia?.('(prefers-reduced-motion: reduce)').matches; // ── Entry: in GEV's top-right row, left of what sits in the corner ── -// GEV has its ACTIVE STYLE readout there; GEV Hosted adds the account -// avatar, which can come after Stories mounts (sign-in). +// GEV has its ACTIVE STYLE readout there; an element placed in that corner +// (#account-control, with or beside the readout) can come after Stories mounts. const CORNER = ['style-indicator', 'account-control']; // GEV's phone layout shows neither; the button then sits under this column. const COLUMN = 'corner-actions'; @@ -53,8 +53,8 @@ let entryTries = 0; let entryTimer = 0; let cornerObserver = null; const observed = new Set(); -// GEV Hosted moves the corner by body class (signed in, guest) without -// resizing it, which a ResizeObserver does not see. +// A body class can move the corner without resizing it, which a +// ResizeObserver does not see. let bodyObserver = null; function watchCorner() { placeEntry(); @@ -151,17 +151,17 @@ function openExplore() { } // ── Opened in GEV: a toast that leads back to the story ── -let hostedTimer = 0; -watch(hostedToast, (v) => { - clearTimeout(hostedTimer); - if (v) hostedTimer = setTimeout(() => (hostedToast.value = null), 6000); +let openedTimer = 0; +watch(openedToast, (v) => { + clearTimeout(openedTimer); + if (v) openedTimer = setTimeout(() => (openedToast.value = null), 6000); }); function backToStory() { - const v = hostedToast.value; - hostedToast.value = null; + const v = openedToast.value; + openedToast.value = null; if (v) store.controller.openStory(v.id, { atMs: v.atMs }); } -const hostedWhen = computed(() => hostedToast.value?.when ?? ''); +const openedWhen = computed(() => openedToast.value?.when ?? ''); // ── Card-to-map morph: Play grows the card into the story; Back folds it home ── const appEl = ref(null); @@ -272,7 +272,7 @@ onMounted(() => { }); onBeforeUnmount(() => { clearTimeout(entryTimer); - clearTimeout(hostedTimer); + clearTimeout(openedTimer); cancelAnimationFrame(creditFrame); cornerObserver?.disconnect(); bodyObserver?.disconnect(); @@ -340,9 +340,9 @@ watch([mode, storyId], () => nextTick(watchCredit)); -
+
{{ t('Opened in GEV') }} - {{ hostedToast.title }} · {{ hostedWhen }} + {{ openedToast.title }} · {{ openedWhen }}