WarUI

URL state persistence and deep links

GRID-A21-F16P1baselinePlanned

Synchronises a chosen subset of state, typically sort, filter, pagination and the active view, to the URL query string or hash using a compact, URL-safe encoding. This makes grid views linkable and bookmarkable, and lets the browser's back and forward buttons step through them.

Planned. This page shows the specification from issue #201. The live example, source for every framework and the API reference replace it when the feature ships.

Live example

A grid in an iframe with a visible, editable address bar component.

Expected behavior

Sorting updates the address bar. In push mode, Back restores the previous sort. Readable encoding shows human-legible parameters such as sort=age:desc. Compressed encoding shows a short token. Editing the URL by hand applies the new state, or reports a validation issue.

Planned API surface

urlSync: {enabled, param, include, mode:'query'|'hash', history:'push'|'replace', encoding:'readable'|'compressed'}encodeStateForUrldecodeStateFromUrlonUrlStateApplied

Acceptance criteria

  • Only the slices listed in include are written to the URL. The default is sort, filter and pagination. (pending)
  • The encoded URL state is URL-safe, and compressed mode produces output no longer than readable mode for the reference fixture. (pending)
  • Applying state from the URL goes through validation and migration. (pending)
  • Push mode creates one history entry per settled change, not one per keystroke. (pending)
  • If the URL state exceeds the configured maximum length (2000 characters by default), the grid omits it and emits a warning. (pending)