Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PWA download banner to mobile navigation #1207

Open
5 tasks
Tracked by #1197
annarhughes opened this issue Nov 19, 2024 · 0 comments
Open
5 tasks
Tracked by #1197

Add PWA download banner to mobile navigation #1207

annarhughes opened this issue Nov 19, 2024 · 0 comments
Labels
complexity: moderate Time needed to do this ticket will be moderate e.g. 1-2 days feature/enhancement New feature or request first-timers-friendly Appropriate for first time contributors. good first issue Good for newcomers priority: soon Should be prioritized soon.
Milestone

Comments

@annarhughes
Copy link
Member

annarhughes commented Nov 19, 2024

Overview

Bloom is a PWA app which means it can be installed/downloaded as a browser app. We currently don't promote this feature, so most users would be unaware that the app can be installed using the browser button.

This task involves adding a banner to the mobile navigation drawer to promote the PWA, with an "Install" button to trigger the download for chromium-based browsers, and further UI for iOS browsers. Note that iOS doesn't support have a function to trigger installing the app, so we instead show an extra description instructing iOS users how to install the app.

There are subsequent PWA tasks linked to the PWA epic issue.
Be aware that there is a similar task to add a banner to desktop - the banner container and text string are different, but much of the logic will remain the same, so consider making the code reusable for this second use case.

Design

This is the banner shown for all browsers

mobile_pwa_nav_banner

This is the banner shown for iOS only, after the user clicks "Install" in the previous banner

mobile_pwa_nav_ios

Note that the icons used are ios-share and add-box in material icons which is already integrated. They are 20x20px

Action Items

  • Create the UI components e.g. NavigationPWABanner in components/banner
  • Add functionality for installing the app for chromium-based browsers using beforeinstallprompt - see this and this resource
  • Add functionality/UI explaining how to install the app on iOS browsers
  • Add functionality for the "Not now" dismiss button, to hide the banner if the user clicks this button. Use a mix of cookies e.g. if (userCookiesAccepted) Cookies.set('pwaBannerDismissed', 'true') and new redux state user.pwaDismissed. See setReferralPartner for an example.
  • [Bonus] Complete the next issue(s) for this epic - Add PWA download banner for desktop course page #1209 Add PWA analytics events #1208

Resources/Instructions

See the resources below for more on PWAs.

https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps/How_to/Trigger_install_prompt
https://learn.microsoft.com/en-us/microsoft-edge/progressive-web-apps-chromium/
https://www.freecodecamp.org/news/what-are-progressive-web-apps/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity: moderate Time needed to do this ticket will be moderate e.g. 1-2 days feature/enhancement New feature or request first-timers-friendly Appropriate for first time contributors. good first issue Good for newcomers priority: soon Should be prioritized soon.
Projects
None yet
Development

No branches or pull requests

2 participants