Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Additional search views path parameters with query parameters #3864

Closed
obulat opened this issue Mar 3, 2024 · 0 comments · Fixed by #3866
Closed

Replace Additional search views path parameters with query parameters #3864

obulat opened this issue Mar 3, 2024 · 0 comments · Fixed by #3866
Assignees
Labels
💻 aspect: code Concerns the software code in the repository ✨ goal: improvement Improvement to an existing user-facing feature 🟧 priority: high Stalls work on the project or its dependents 🧱 stack: frontend Related to the Nuxt frontend

Comments

@obulat
Copy link
Contributor

obulat commented Mar 3, 2024

Problem

Additional search views on the frontend should use the query parameters instead of the path parameters.

Description

The following changes are necessary:

  • replace /pages/<mediaType>/tag/_tag.vue and /pages/<mediaType>/source/_.vue pages with /pages/<mediaType>/collection.vue. The page should be similar to _tag.vue, using the collection middleware. It should not be setting the collection state in the setup function
  • update collection.ts middleware to extract the collection parameters from the route name and query parameters. It should also check that the source name is valid, and should update the search store state.
  • replace path-related functions in the search store to parse or set the collection query parameters.

Additional context

Temporarily, until the API changes are added, we can use the current full-text search query parameters for the query: tags for tag view, creator and source for the creator and source. The unstable__collection parameter will be ignored by the API for now.

The changes were discussed in Rethinking additional search views URLs

@obulat obulat added 🟧 priority: high Stalls work on the project or its dependents ✨ goal: improvement Improvement to an existing user-facing feature 💻 aspect: code Concerns the software code in the repository 🧱 stack: frontend Related to the Nuxt frontend labels Mar 3, 2024
@obulat obulat self-assigned this Mar 3, 2024
@openverse-bot openverse-bot moved this to 📋 Backlog in Openverse Backlog Mar 3, 2024
@openverse-bot openverse-bot moved this from 📋 Backlog to 🏗 In Progress in Openverse Backlog Mar 3, 2024
@openverse-bot openverse-bot moved this from 🏗 In Progress to 📋 Backlog in Openverse Backlog Mar 3, 2024
@openverse-bot openverse-bot moved this from 📋 Backlog to 🏗 In Progress in Openverse Backlog Mar 3, 2024
@openverse-bot openverse-bot moved this from 🏗 In Progress to ✅ Done in Openverse Backlog Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💻 aspect: code Concerns the software code in the repository ✨ goal: improvement Improvement to an existing user-facing feature 🟧 priority: high Stalls work on the project or its dependents 🧱 stack: frontend Related to the Nuxt frontend
Projects
Archived in project
1 participant