Skip to content

Refactor session usage, link to session & loading template

Christopher Mark Fullarton requested to merge refactorSessionUsage into staging

This update removes the usage of the Session variable where it is possible. It is still used for example in the countdown or the sliders. Instead the local storage is used. The event observer will now also reconnect on a hard reload (F5). So the complete app, excluding the voting progress (where we need to add a workaround to restart the countdown with the remaining time) is now reloadable.

Since all subscriptions are now added before the route is rendered, there is now a loading template which will show a small css animation (See #176 (closed))

Also it is possible to link to a specific session. The workflow is as following:

  1. The link provided is "arsnova.click/exampleQuiz"
  2. Now, if the session exists and is currently open for members (sessionStatus 2) there will be a redirect to "/arsnova.click/exampleQuiz/nick"
  3. If the session does exist, is currently not open for members but is in the local storage the user will be identified as owner and will be redirected to "arsnova.click/exampleQuiz/questions". This is the same technique used for displaying the "Make a new one" and the "Join now" buttons.
  4. In any other cases (session does not exist, is not open and the local storage does not contain the hashtag) the user will be redirected to "arsnova.click/" - the landing page.

Merge request reports