Skip to content

Redesign SaveState Functionality #129

@aeschylus

Description

@aeschylus

Here is how the current saving system works:

image
This fulfils the requirements of restoring state when the user reloads the page or returns from navigating back and forth, but leaves much to be desired.

Relevant Google Draw Document for fixing this

Pain Points

  • The point at which the saving system does the saving is whimsical. Sometimes it saves before things have loaded properly, and a session is overwritten with a blank configuration object, meaning future visits will not have any manifests included.
  • Loading a new set of initialisation options from the same domain does not overwrite the existing localStorage. If it did do so, the user might be annoyed by losing their last session. Perhaps they should be prompted to save it.
  • The browser history will not reflect this distinct station in their history, because (whether the mirador instance is running from within an embedded instance, or has "taken over" the page) it is still running from within the same page. Perhaps push state should be implemented to rectify this situation. However, it would require saving a lot more states than before (which may not be a problem considering the configuration object is rather small). This may require a new pushState event for every time they add in new manifests to the existing session, presuming we make dynamic loading of manifests possible.

Having noted these things, it may help to remind oneself of the basic requirements.

Basic Requirements

  • Reloading should not lose the present state of the user's session.
  • Going back in history should not cause the user to lose work.
  • The user should be able to easily export their session, perhaps with a method to send data to a database.
  • Ability to dynamically add a manifest from a URL or the desktop, or the exterior search environment.

Nice to Haves

  • Perhaps someday, there should be a way (webRTC?) to allow multiple people to change things in the same session (Multiplayer).
  • Autosaving to the user's actual filesystem would be good at some point (on supported browsers.

In general, the redesign needs to address the realities of existing in a somewhat unpredictable host environment and adapting accordingly, with instance-level state saving and intelligently allowing the user to escape. What follows is an outline of some of these issues.

Integration/Environment Concerns

MOOCS

Individual Scholars

University Courses

Embedded Discovery/Display Viewer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions