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

Persist filter parameters in URL #915

Open
nmcharlton opened this issue Nov 3, 2022 · 13 comments · May be fixed by #1010
Open

Persist filter parameters in URL #915

nmcharlton opened this issue Nov 3, 2022 · 13 comments · May be fixed by #1010
Assignees
Labels
hacktoberfest size: medium Medium-size issue tool: Capture Matching Relates to the Capture Matching tool tool: Captures Relates to the capture data tool (Captures page, formerly Trees) tool: Earnings Relates to the Earnings tool (formerly Payments) tool: Growers Relates to the Grower Management tool (Growers page, formerly Planters) tool: Stakeholders Relates to the Stakeholder Manager tool tool: Verify Relates to the capture verification tool (Verify page) type: enhancement New feature or request

Comments

@nmcharlton
Copy link
Collaborator

nmcharlton commented Nov 3, 2022

User Story

As an Admin Panel user I want to be able to bookmark (in my browser) or link directly to pre-filtered views on each of the Admin Panel tools that support filtering so that I don't have to set my preferred filters each time I open the tool, and can share direct links to other users.

Feature Description

We need to encode the current filter selection in the URL as a query string and have it update each time the user changes the filters. When navigating to a valid filter URL, the filter should be applied automatically and the values should populate the filter dialog.

This should be applied as uniformly as possible across all tools with filters:

  • Verify
  • Captures
  • Capture Matching
  • Earnings
  • Payments
  • Growers
  • Stakeholders

The mechanism should be built in a way that does not require additional maintenance when new filter parameters are added to any existing filter.

@nmcharlton nmcharlton added type: enhancement New feature or request good first issue Good for newcomers tool: Verify Relates to the capture verification tool (Verify page) tool: Growers Relates to the Grower Management tool (Growers page, formerly Planters) tool: Capture Matching Relates to the Capture Matching tool tool: Stakeholders Relates to the Stakeholder Manager tool size: medium Medium-size issue tool: Captures Relates to the capture data tool (Captures page, formerly Trees) tool: Earnings Relates to the Earnings tool (formerly Payments) labels Nov 3, 2022
@SuspenseFallback
Copy link
Contributor

Can I be assigned to this?

@nmcharlton
Copy link
Collaborator Author

Note that there is currently no requirement for a filter bookmark feature within the Admin Panel. Instead, filters in the URL would allow users to bookmark a filter using their browser.

@SuspenseFallback
Copy link
Contributor

So the user has to manually bookmark the page? Or does the filter get bookmarked via something like localStorage?

@nmcharlton
Copy link
Collaborator Author

Manual bookmarking is fine for now. The main aim of this issue is the mechanism that enables persistable filters.

Sorry for the misleading user story.

@SuspenseFallback
Copy link
Contributor

Are the active and approved parameters also supposed to persist?

@nmcharlton
Copy link
Collaborator Author

Are the active and approved parameters also supposed to persist?

The verification status needs to persist in Verify.
The active and approved parameters will soon be removed from Captures, so are less important.

@SuspenseFallback
Copy link
Contributor

What is the verification status?

@nmcharlton
Copy link
Collaborator Author

nmcharlton commented Nov 10, 2022

What is the verification status?

It's the first filter in Verify. It maps to status in the /${QUERY_API}/raw-captures query.

@nmcharlton
Copy link
Collaborator Author

Apologies, I didn't realise we were still using active and approved booleans as a proxy for status. We can remove those and use a direct mapping in the filter and everywhere we display the verification status.

@nmcharlton
Copy link
Collaborator Author

@gwynndp Can you make sure we remove active and approved from the filter models as part of the Captures migration?

@SuspenseFallback
Copy link
Contributor

Sorry, I have not been able to work on this issue for a while due to school!

@nmcharlton
Copy link
Collaborator Author

Hi @SuspenseFallback. Have you been able to make any more progress on this issue?
Could you create a draft PR to help us move it forward?

@SuspenseFallback
Copy link
Contributor

OK, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest size: medium Medium-size issue tool: Capture Matching Relates to the Capture Matching tool tool: Captures Relates to the capture data tool (Captures page, formerly Trees) tool: Earnings Relates to the Earnings tool (formerly Payments) tool: Growers Relates to the Grower Management tool (Growers page, formerly Planters) tool: Stakeholders Relates to the Stakeholder Manager tool tool: Verify Relates to the capture verification tool (Verify page) type: enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants