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

Đang mở
#48 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
72/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript, vite
Lĩnh vực
frontend, mobile-dev

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
TypeScript
Star
3
Fork
3
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của TMHSDigital/GH-Arcade

Tất cả issue của TMHSDigital/GH-Arcade

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.