Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

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

Merged

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

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 👍

@eddiejaoude eddiejaoude changed the base branch from main to contributions June 8, 2024 10:13
@eddiejaoude eddiejaoude merged commit 70d0a3c into EddieHubCommunity:contributions Jun 8, 2024
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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