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

feat: clear all tags in one click button added in search page #10032

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

futoid
Copy link

@futoid futoid commented Dec 26, 2023

Fixes Issue

Closes #9839

Changes proposed

Check List (Check all the applicable boxes)

  • My code follows the code style of this project.
  • My change requires changes to the documentation.
  • I have updated the documentation accordingly.
  • All new and existing tests passed.
  • This PR does not contain plagiarized content.
  • The title of my pull request is a short description of the requested changes.

Screenshots

clearfilter.webm

@github-actions github-actions bot added the issue linked Pull Request has issue linked label Dec 26, 2023
Copy link
Contributor

@amandamartin-dev amandamartin-dev left a comment

Choose a reason for hiding this comment

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

Hello! It looks like the only file with relevant changes for this issue is search.js

Can you please remove tags and your package lock file from this PR?

@futoid
Copy link
Author

futoid commented Dec 27, 2023

Hello! It looks like the only file with relevant changes for this issue is search.js

Can you please remove tags and your package lock file from this PR?

done

Copy link
Contributor

@amandamartin-dev amandamartin-dev left a comment

Choose a reason for hiding this comment

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

Hello! During testing the clear function worked well if I used tags only. If I type in my search it would remove all values but the first word. I have created a video to illustrate what I mean.

@amandamartin-dev
Copy link
Contributor

Hello! During testing the clear function worked well if I used tags only. If I type in my search it would remove all values but the first word. I have created a video to illustrate what I mean.

testing.mov

pages/search.js Outdated
@@ -203,6 +202,31 @@ export default function Search({
);
};

const handleClearFilter = () => {
const params = new URLSearchParams({ query: searchTerm });
params.forEach((e) => {
Copy link
Member

Choose a reason for hiding this comment

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

I find e a bit ambiguous, consider renaming it to a more descriptive and meaningful name. This can enhance code readability and understanding. Choose a name that reflects the purpose or content of the variable to make the code more self-explanatory.

@futoid
Copy link
Author

futoid commented Jan 4, 2024

Hello! During testing the clear function worked well if I used tags only. If I type in my search it would remove all values but the first word. I have created a video to illustrate what I mean.

I've fixed this issue

Copy link
Member

@ThomasCode92 ThomasCode92 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

pages/search.js Outdated Show resolved Hide resolved
Copy link
Member

@eddiejaoude eddiejaoude left a comment

Choose a reason for hiding this comment

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

Thank you, works well. I left an inline comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue linked Pull Request has issue linked
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE]:Add Clear All Filters Button for User Experience
4 participants