Persist the current webDisplayTools UI state in the browser URL so a user can copy and share a link and restore the same state in another browser session or with another user. The state of a running experiment does not need to be encoded. Query parameters should be short but human readable.
Problem
Right now, the state of the website appears to live only in memory during the current session. That makes it hard to:
- share a configured view with collaborators,
- bookmark a useful working state,
- restore progress after refresh/reopen,
- reproduce bugs or user-reported setups.
Encoding the relevant state in the URL would make app state portable across users and sessions. For the cases where the webDisplayTools are actually running an experiment, the state does not need to be encoded in the URL, e.g. if an experiment is 7 trials in and the user shares that URL, it is fine if the webDisplayTools start at the beginning of the experiment / trials.
Behavior
- When the user changes relevant UI state, the URL updates to reflect it.
- Opening that URL restores the same state.
- Shared URLs should work across browsers/sessions.
- Back/forward navigation should behave sensibly with state changes.
- Default/empty state should keep the URL clean where possible.
Questions / Design Choices:
Which parts of state are worth serializing, and which are not?
- How do we handle:
- invalid/outdated URLs,
- backward compatibility as state schema evolves,
- very large state payloads,
- sensitive or non-shareable state?
DOD
- A user can configure the application, copy the URL, and open it in a new session to see the same state.
- A second user can open the shared URL and get an equivalent view.
- Refreshing the page preserves the represented state.
- Unsupported or malformed URL state fails gracefully and falls back to defaults.
- URL updates do not noticeably degrade app responsiveness.
Nice-to-have
- Versioning of serialized state.
- Compact encoding for complex state objects.
Persist the current webDisplayTools UI state in the browser URL so a user can copy and share a link and restore the same state in another browser session or with another user. The state of a running experiment does not need to be encoded. Query parameters should be short but human readable.
Problem
Right now, the state of the website appears to live only in memory during the current session. That makes it hard to:
Encoding the relevant state in the URL would make app state portable across users and sessions. For the cases where the webDisplayTools are actually running an experiment, the state does not need to be encoded in the URL, e.g. if an experiment is 7 trials in and the user shares that URL, it is fine if the webDisplayTools start at the beginning of the experiment / trials.
Behavior
Questions / Design Choices:
Which parts of state are worth serializing, and which are not?
DOD
Nice-to-have