Skip to content

Sync todo filters with the URL

Paul Gascou-Vaillancourt requested to merge 483052-todos-filters-url-sync into master

What does this MR do and why?

Sync todo filters with the URL

Implements URL syncing when selecting filters in the Vue todos app.

This is backward compatible with old URLs. More specifically, setting the Label priority sort order previously resulted in the ?sort=label_priority search param (without the _desc suffix), the new Vue app properly translates this to the correct sort order. When setting this sort order from the UI, the search param is set to the more up-to-date ?sort=LABEL_PRIORITY_DESC.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Selecting filters updates the URL. Upon refreshing the page, filters are preserved
url_sync
The legacy label_priority search param is properly handled.
label_priority

How to set up and validate locally

  1. Enable the todos_vue_application feature flag: echo "Feature.enable(:todos_vue_application)" | rails c.
  2. Navigate to the Vue todos app: http://gdk.test:3000/dashboard/todos/vue.
  3. Filter out todos using the filtered search component.

Related to #483052 (closed)

Edited by Paul Gascou-Vaillancourt

Merge request reports

Loading