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

Trim the query string in all pages with search #1703

Merged
merged 4 commits into from
Oct 24, 2023

Conversation

peoray
Copy link
Contributor

@peoray peoray commented Oct 17, 2023

Changes proposed ✍️

Fixes #1592

What

🤖 Generated by Copilot at fe588f7

This pull request sanitizes the user input for various search filters in the frontend by trimming and reducing spaces. It adds and uses a new utility function trimAndReduceSpaces in the utils/string module.

🤖 Generated by Copilot at fe588f7

trimAndReduceSpaces
Sanitizes user input
A clean spring cleaning

Why

How

🤖 Generated by Copilot at fe588f7

  • Add trimAndReduceSpaces function to utils/string.js to sanitize user input for search filters (link)
  • Import and use trimAndReduceSpaces function in apiFilterRenderer functions of activitySearchFilter, memberSearchFilter, and organizationSearchFilter objects in frontend/src/modules/activity/config/filters/main.ts, frontend/src/modules/member/config/filters/main.ts, and frontend/src/modules/organization/config/filters/main.ts respectively (link, link, link, link, link, link)

Checklist ✅

  • Label appropriately with Feature, Improvement, or Bug.
  • Add screehshots to the PR description for relevant FE changes
  • New backend functionality has been unit-tested.
  • API documentation has been updated (if necessary) (see docs on API documentation).
  • Quality standards are met.

Copy link
Contributor

@joanagmaia joanagmaia left a comment

Choose a reason for hiding this comment

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

Can you also update this in Conversation's module?

@peoray
Copy link
Contributor Author

peoray commented Oct 19, 2023

@joanagmaia updated :)

Copy link
Contributor

@joanagmaia joanagmaia left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@joanagmaia joanagmaia merged commit 3997d10 into CrowdDotDev:main Oct 24, 2023
6 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.

Member search doesn't work if there is a space added
2 participants