#4540 (963b01ff5) already lets a board be opened pre-filtered from
`?assignee=johndoe`/`?member=janedoe`/`?label=urgent`, read once on board
load. #319 additionally asked for the other direction: applying a filter
from the sidebar should update the URL too, so a manually filtered view is
itself bookmarkable/shareable without hand-typing the query string.
Adds `client/lib/filterQueryParams.js`'s `resolveIdsToUsernames`,
`resolveIdsToLabelNames` and `buildBoardFilterQueryParams` - the exact
inverse of the existing parser, reusing the same `assignee`/`member`/`label`
token vocabulary - and a reactive `list()` getter on `SetFilter`
(`client/lib/filter.js`) so its current selection can be read outside the
sidebar template. `boardBody.js`'s new `syncFilterQueryParams`, run from a
separate `Tracker.autorun`, resolves `Filter.assignees`/`members`/`labelIds`
back to names and writes them via `FlowRouter.setQueryParams` wrapped in
`FlowRouter.withReplaceState`, so toggling a filter replaces the current
history entry instead of piling up a new one per click.
Covered by tests/filterQueryParams319.test.cjs: the id->name resolvers, the
query-param builder (including empty selections clearing their param and
unknown ids being dropped), a full round trip through #4540's own
`parseBoardFilterQueryParams` proving both directions agree, and source
checks pinning how boardBody.js wires it up.
Thanks to netei and xet7 !
Closes#319,
?assignee=johndoe, ?member=janedoe and ?label=urgent now pre-filter a board
on load, reusing the existing Filter sidebar object/API rather than a new
filtering engine - useful for embedding a pre-filtered board view in another
tool (e.g. an iframe). Query params are parsed once, when the board
subscription becomes ready (client/components/boards/boardBody.js), and
resolved to member/assignee ids by username and to label ids by name via
client/lib/filterQueryParams.js, a pure module covered by
tests/filterQueryParams4540.test.cjs. This only reads params on load; it does
not sync the URL back as filters change.
Thanks to thrademaker and xet7 !
Closes#4540,