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

Quiz questions are not loading when using multiple tabs #304

Closed
schloerke opened this issue Nov 4, 2019 · 0 comments · Fixed by #305
Closed

Quiz questions are not loading when using multiple tabs #304

schloerke opened this issue Nov 4, 2019 · 0 comments · Fixed by #305

Comments

@schloerke
Copy link
Collaborator

reprex:

  • Open many tutorials on shinyapps.io on different tabs.
  • The first tutorial will work fine. Other tutorials will have problems advancing or saving progress (or any tutorial state) to the browser.

The tutorial tabs are all using localforage to access the indexeddb in the web browser. This DB only allows for a single connection per browser. Once the tab closes, that connection is released and the remaining tabs attempt to connect.

There is no warning or error.

This problem exists in v0.9.2, but the quiz questions would display before any answers were being restored. We could do this, but opted not to, as changing the UI after some non trivial time has passed is confusing. (The downside is that some tabs can not display their quiz questions.)

Original note:

// initialize data store. note that we simply ignore errors for interactions
// with storage since the entire behavior is a nice-to-have (i.e. we automatically
// degrade gracefully by either not restoring any state or restoring whatever
// state we had stored)

With indexeddb being widely supported (95%+), it could be used natively and localforage could be dropped as our requirements are slim (essentially key/value lookup). localstorage could also be used instead, but there is a limitation of 5mb per domain. indexeddb would be best going forward.

Known issues:

@schloerke schloerke changed the title Quiz questions are not loaded Quiz questions are not loading Nov 4, 2019
@schloerke schloerke changed the title Quiz questions are not loading Quiz questions are not loading when using multiple tabs Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant