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

open project: move tag filter state from URL hash to query params #5769

Merged
merged 2 commits into from Jun 7, 2023

Conversation

Abbe98
Copy link
Member

@Abbe98 Abbe98 commented Apr 3, 2023

The ability to filter projects by tags uses URL-hashes for managing state, this, however interferes with the home screen panel links introduced in #5597. This change therefor, moves the filtering state to query params.

Side effects:

  • you can now link to a tag filter
  • fixed some bugs caused by naming a tag "all"
  • ensured that OpenRefine's URL utility does not overwrite the native URL class.

@Abbe98 Abbe98 marked this pull request as draft April 4, 2023 07:54
@Abbe98 Abbe98 force-pushed the open-project-tags branch 2 times, most recently from 991e1b1 to b19e71e Compare April 4, 2023 09:02
@Abbe98 Abbe98 marked this pull request as ready for review April 4, 2023 09:28
Copy link
Member

@elebitzero elebitzero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, except on refresh the selected tag is not restored:

http://127.0.0.1:3333/?tag=foo#open-project
should select 'foo' and filter the projects with foo tag.

http://127.0.0.1:3333/?tag=#open-project
should select 'All' and show all projects.

Copy link
Member

@elebitzero elebitzero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

^

@wetneb
Copy link
Sponsor Member

wetneb commented May 25, 2023

@Abbe98 quick reminder about this - It looks like a good move to me so it's probably worth addressing @elebitzero's comments to avoid the PR getting stale?

@Abbe98
Copy link
Member Author

Abbe98 commented May 25, 2023

@Abbe98 quick reminder about this - It looks like a good move to me so it's probably worth addressing @elebitzero's comments to avoid the PR getting stale?

It's on my radar and I have a solution in mind.

The ability to filter projects by tags uses URL-hashes for managing state, this, however interferes with the home screen panel links introduced in OpenRefine#5597. This change therefor, moves the filtering state to query params.

Side effects:
 -  you can now link to a tag filter
 - fixed some bugs caused by naming a tag "all"
 - ensured that OpenRefine's URL utility does not overwrite the native URL class.
@elebitzero
Copy link
Member

The changes look good, OR now keeps the selected tag on refresh.

@Abbe98 Abbe98 merged commit 3402a31 into OpenRefine:master Jun 7, 2023
14 checks passed
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.

None yet

3 participants