PublicDataWorks / verdad-frontend

MIT License
0 stars 0 forks source link

As a user, I want the filter settings to be saved in the URL parameters so that I can return to the same page with my chosen filters applied #110

Open nlgthuan opened 3 hours ago

nlgthuan commented 3 hours ago

Background:

To enhance user experience and provide seamless navigation, it is important to allow users to save their filter settings in the URL parameters. This functionality enables users to return to the same page with their chosen filters applied, making it convenient to access previously viewed content without having to reapply filters. This feature is particularly useful for users who frequently revisit specific content configurations.

Description:

As a user,

I want the filter settings to be saved in the URL parameters,

So that I can return to the same page with my chosen filters applied.

Acceptance Criteria

Scenario 1: Saving Filter Settings in URL

Given I am a user who has applied filters on a page
When I apply or update the filters
Then the URL should be updated to include the current filter settings as parameters

Scenario 2: Returning to a Page with Saved Filters

Given I have a URL with saved filter parameters
When I navigate to this URL
Then the page should load with the filters applied as per the parameters in the URL

Scenario 3: Modifying Filters and Updating URL

Given I am on a page with filters applied via URL parameters
When I change the filter settings
Then the URL should update to reflect the new filter settings

Scenario 4: Clearing Filters

Given I am on a page with filters applied via URL parameters
When I clear all filters
Then the URL should update to remove any filter parameters
And the page should load with default content (no filters applied)

Tasks:

  1. Implement functionality to encode current filter settings as URL parameters when filters are applied or updated.
  2. Ensure the page reads and applies filters from URL parameters upon loading.
  3. Update the URL dynamically as filters are modified by the user.
  4. Implement logic to clear URL parameters when filters are reset or cleared.
linear[bot] commented 3 hours ago

VER-155 As a user, I want the filter settings to be saved in the URL parameters so that I can return to the same page with my chosen filters applied