Show offline-ready and update notices, and install guidance on iOS

Offen
#48 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
72/100
Issue-Typ
Feature
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
typescript, vite
Bereich
frontend, mobile-dev

Rechercherichtung

Start with shared/pwa.ts, src/hub/main.ts, and shared/toast.ts to trace service worker registration, the install control, and toast styling. Run npm run dev to inspect the hub, then use npm run typecheck and npm run build to verify the changes. Done when the hub announces offline readiness and updates, and iOS Safari users outside standalone mode receive the install hint.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

enhancement severity: medium

Summary

Offline play is a headline feature, but a player never learns when the arcade is safe to use offline or that an update arrived. The install button only appears in browsers that fire beforeinstallprompt, so Safari and Firefox users get no guidance.

Where

  • shared/pwa.ts:7-13 (registerSW({ immediate: true }) with no callbacks)
  • src/hub/main.ts:19-33 (install button)
  • shared/toast.ts:8

Proposal

  • Pass onOfflineReady and show the existing toast ("Ready to play offline"). The toast styles need to load on the hub.
  • On an update, show a "New version, reload" toast or a small hub badge.
  • On iOS Safari outside standalone mode, show a one-time "Share, then Add to Home Screen" hint next to the install control.

Acceptance criteria

  • First visit shows a notice once caching completes
  • A deployed update is announced on the next visit

Getting started

  • Relevant files: shared/pwa.ts, shared/toast.ts, src/hub/main.ts
  • Run locally: npm install, then npm run dev
  • Checks: npm run typecheck and npm run build (there is no test suite yet)
  • Related docs: README.md

Filed by repo-audit/full-audit at b001f5d. Severity: medium. Effort: M. audit-key: enhancement|shared/pwa.ts|registerOffline

Vorherrschende Sprache
TypeScript
Sterne
3
Forks
3
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus TMHSDigital/GH-Arcade

Alle Issues in TMHSDigital/GH-Arcade

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.