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

Offline Page "Refresh" #62

Open
emmahodcroft opened this issue Jul 9, 2023 · 3 comments
Open

Offline Page "Refresh" #62

emmahodcroft opened this issue Jul 9, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@emmahodcroft
Copy link
Member

Context

When travelling I might have a few JSONs I would like to inspect, check, or use for something. To do so dragging into auspice.us is often perfect (getting auspice to run locally sometimes is tricky). However, I have to remember to load up as many 'empty' auspice.us tabs as I think I might need beforehand, when I have internet.

Description

Would be cool if one had a button somewhere in auspice.us that clears whatever's displayed so one can drag on new JSONs without having to actually 'refresh' with internet connection.

Totally accept this is a little niche and the real solution is to figure out how to get auspice running locally more stably, but I bet I'm not the only one who relies more on auspice.us ! ;)

@emmahodcroft emmahodcroft added the enhancement New feature or request label Jul 9, 2023
@tsibley
Copy link
Member

tsibley commented Jul 18, 2023

It would actually be quite possible to make auspice.us fully capable offline with service workers. That way you'd be able to open up as many auspice.us tabs as you want, when you need them, even offline. :-)

@jameshadfield jameshadfield transferred this issue from nextstrain/auspice Aug 17, 2023
@victorlin
Copy link
Member

I started looking into this today, following Webpack's Progressive Web Application guide. Seems like it should be done on the Auspice side. Work in progress: nextstrain/auspice@19f5c2c...fe1ed19

@victorlin
Copy link
Member

Following the steps from the guide as-is does not work for Auspice. The service worker installs in the browser, but isn't accepting any network requests once the Auspice server shut down. There are two ways to approach this, which could happen simultaneously (as done today) and hopefully converge on a solution:

  1. Modify Webpack's demo app so that it stops working in the same way as Auspice. Doing this in a repo: victorlin/webpack-service-worker-demo
  2. Modify Auspice until it works. Since I'm not very familiar with this part of the project, this option feels more like shooting in the dark. This is today's shot: nextstrain/auspice@6dc1e03

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Development

No branches or pull requests

3 participants