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

Show confirmation when all assets have been pre-downloaded #1382

Closed
BenHenning opened this issue Jun 22, 2020 · 0 comments · Fixed by #1636
Closed

Show confirmation when all assets have been pre-downloaded #1382

BenHenning opened this issue Jun 22, 2020 · 0 comments · Fixed by #1636
Assignees
Labels
Priority: Essential This work item must be completed for its milestone. Z-ibt Temporary label for Ben to keep track of issues he's triaged.

Comments

@BenHenning
Copy link
Member

We should show a brief confirmation after all automatically downloaded assets have finished in the pre-alpha. This should only show if caching is enabled.

@BenHenning BenHenning added Type: Improvement Priority: Essential This work item must be completed for its milestone. labels Jun 22, 2020
@BenHenning BenHenning added this to the Alpha milestone Jun 22, 2020
@BenHenning BenHenning self-assigned this Jun 22, 2020
BenHenning added a commit that referenced this issue Aug 17, 2020
…line support (#1636)

* Show a dialog when preloading assets for offline support.

This does a bunch of refactoring & hacky workarounds to keep asset
priming support fully isolated (just a few files now need to be deleted
to clean things up). This also:
1. Fixes actual asset downloading (the GCS asset path templates have
changed, so priming didn't actually work anymore).
2. Disables audio file caching since we can't play audio when offline,
anyway (there's a dialog that prevents this in-player).
3. Fixes #1340 and #1341 by accounting for error cases when trying to
play audio. It turns out that playing audio crashes if you didn't have
internet access when going into an exploration (the no connectivity
dialog only appears if you lose connectivity within a lesson). There's
also some issues with existing view model code that wrongly assumed
audio couldn't be in a failure state at that point. This has been fixed.
4. Moves the list of topics to cache to be in the same position as the
flag enabling/disabling this functionality.

The download experience isn't perfect, but it's meant to be a helper for
user study coordinators so that they know when lessons can be brought
offline.

Note that the UI aspects of this change are really hacky. This is by
design--I didn't want to overcomplicate the solution, and I wanted to
keep the priming changes fully isolated to make future cleanup easier.

Finally, no new tests were added. I clarified in StateFragmentTest that
the edge cases fixed in this PR need to have corresponding tests, but
I'm actually not sure offhand how to test that audio's playing. I think
this will require additional work. I prefer to push this off to #388,
but I will follow up with tests if anyone wants to push back on this.

* Lint fixes.

* Introduce new caching module to simplify tests, and fix app module
tests.

* Lint fixes.
@BenHenning BenHenning added the Z-ibt Temporary label for Ben to keep track of issues he's triaged. label Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Essential This work item must be completed for its milestone. Z-ibt Temporary label for Ben to keep track of issues he's triaged.
1 participant