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

Implement Offline PWA Support #1704

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Daltz333
Copy link
Member

@Daltz333 Daltz333 commented Feb 2, 2022

Warning-Banner

What is PWA?

Progressive Web Applications (PWAs) are the fancy technology sponsored by Mozilla and Google several years ago that encouraged web based native style applications. This allows websites to be turned into fully offline capable applications with notification support.

Why?

Franky, it's super cool and enables a couple of benefits for us:

  • Offline mobile support. This will be extremely useful at events
  • Notifications for important FIRST/WPILib critical updates

Important Usage Information

As of currently, consider any development on this early alpha and extremely unstable. Expect that this application will drain massive amounts of your device's battery life. Expect this application to download resources infinitely and destroying your data cap. This is confusing stuff.

TODO

  • Break into it's own extension
  • Add configuration for manifest from conf.py
    • Partially implemented
  • Cache the main webpage and then cache in background, currently app will stall until resources are loaded
    • This is a biggy, the offline feature doesn't fully work because its now required to have a fetch caching strategy in-place
    • This currently is working but needs to replace localStorage with indexDB sql style database. Safari only supports >50MB via indexedDB. This is going to drastically extend the database logic. done
  • Add splash screen
    • Chrome automatically does this, Firefox has no support, and Safari requires a splash image for every single device resolution, so we are skipping iOS.
  • Miscellaneous edge cases

We also have a couple offloaded scripts that we could store locally, I think it's mathjax and jquery.

@Daltz333 Daltz333 added the Extension Needs an extension created/added label Feb 2, 2022
@Daltz333 Daltz333 force-pushed the pwa-support branch 3 times, most recently from 12a1e1d to fd5100a Compare February 3, 2022 02:29
@sciencewhiz
Copy link
Collaborator

I think you ran an old version of black

@Daltz333 Daltz333 force-pushed the pwa-support branch 2 times, most recently from e3b0d46 to beb4642 Compare February 3, 2022 04:47
@Daltz333
Copy link
Member Author

Daltz333 commented Feb 3, 2022

Currently I think there is a mismatch with the artifacts stores in the install worker, and artifacts being searched and stored in the fetch worker.

@Daltz333 Daltz333 force-pushed the pwa-support branch 4 times, most recently from 9c0dbcd to 0ed92bd Compare February 9, 2022 17:44
@Daltz333
Copy link
Member Author

Daltz333 commented Feb 9, 2022

Deployment strategy

  • Before we create a release that we're willing to test with the public (off-season and big warning letters saying beta), we have to override the beforeinstall event to give a prompt of our own with a couple of warnings.

  • Application may use extremely large amounts of data, hopefully not, but databases are wack so it's better safe than sorry

  • Application will hurt users battery life (not too horrible, but it does have to download 100+ MB of resourceS)

  • Application could randomly just break during the beta period. I don't want to make a commitment of anything. The documentation for PWA is hit or miss, and the standards are changing constantly.

@Daltz333 Daltz333 force-pushed the pwa-support branch 4 times, most recently from a4c9294 to eb1234d Compare February 13, 2022 20:58
@Daltz333
Copy link
Member Author

Further development has moved to https://github.com/ItayZiv/sphinxext-pwa. This PR will be updated to point at the extension.

@Daltz333 Daltz333 force-pushed the pwa-support branch 4 times, most recently from c5afb6b to 0a8da49 Compare February 14, 2022 22:01
@Daltz333 Daltz333 force-pushed the pwa-support branch 5 times, most recently from 809db70 to 38f14f8 Compare March 9, 2022 20:43
@Daltz333 Daltz333 marked this pull request as ready for review April 29, 2022 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Extension Needs an extension created/added
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants