Skip to content

Store current query in context and append to add-on links - #1437

Open
dnass wants to merge 4 commits into
mainfrom
949-addon-query-context
Open

dnass wants to merge 4 commits into
mainfrom
949-addon-query-context

Conversation

@dnass

@dnass dnass commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Closes #949.

Introduces a new context that tracks the current query on document browser routes. The add-on sidebar section and add-on list page consume this context and append the query onto add-on links, so that the user's search context is preserved when navigating to an add-on.

Before this, navigating from search results or a project page to the add-ons list and then to a single add-on would reset the view to the unfiltered list of documents. Now the filtered list is restored.

@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 53.89% 4298 / 7975
🔵 Statements 52.52% 5062 / 9638
🔵 Functions 48.05% 1643 / 3419
🔵 Branches 50.63% 2208 / 4361
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/lib/components/addons/AddOnListItem.svelte 100% 50% 100% 100%
src/lib/components/addons/tests/AddOnListItem.demo.svelte 0% 0% 0% 0%
src/lib/components/layouts/DocumentLayout.svelte 0% 0% 0% 0% 35-64
src/lib/components/layouts/Project.svelte 0% 100% 0% 0% 40-61
src/lib/components/sidebar/AddOns.svelte 94.87% 50% 93.33% 96.42% 78
src/lib/components/sidebar/tests/AddOns.demo.svelte 0% 0% 0% 0%
src/lib/components/storybook/DocumentQueryDecorator.svelte 0% 0% 0% 0%
src/lib/state/query.svelte.ts 100% 100% 100% 100%
src/routes/(app)/documents/+page.svelte 0% 100% 0% 0% 43-71
Generated in workflow #1437 for commit ec90316 by the Vitest Coverage Report Action

@github-actions

Copy link
Copy Markdown

Preview deployed: https://preview-1437.staging.documentcloud.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ResultsList query is forgotten between page renders

3 participants