Sireesha - Peterson removed all spaces in the search input text to avoid an empty table.#4151
Sireesha - Peterson removed all spaces in the search input text to avoid an empty table.#4151peterson337 wants to merge 10 commits into
Conversation
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
kunchalasireesha
left a comment
There was a problem hiding this comment.
PR currently has merge conflicts with the base branch. Could you please rebase or merge the latest changes from development
Jaden300
left a comment
There was a problem hiding this comment.
Profile page fails to load and displays a blank/loading state when navigating to Assign Badges under View Profile.
The application throws an authorization error (“unauthorized to access resource”) and fails to retrieve the currently logged-in user email, indicating a broken API/auth flow in the current branch state.
As a result, the Assign Badge popup and profile view are not functional in the current build.
This issue appears to block core functionality and matches previously reported problems with the profile page not loading.
Requesting changes due to broken profile rendering and authentication/API failures.
amaresh2001
left a comment
There was a problem hiding this comment.
Functional Testing:
Tested locally on the branch peterson-fix-trim-input-prevent-empty-table.
Main bug fix:
- Typing badge name with trailing space → table still filters and shows correct results
- Typing badge name with multiple trailing spaces → filters correctly
Edge cases:
- Typing badge name with leading space → filters correctly
- Typing only spaces → table shows all results
- Typing badge name with extra spaces in the middle → handled correctly
- Dark mode → Assign Badges popup displays correctly
Abhi-R0211
left a comment
There was a problem hiding this comment.
Hi, here is my analysis for this PR:
What's Working Well
- Trailing space: typing a badge name with a trailing space still filters and shows the correct badge
- Leading space: typing a badge name with a leading space filters correctly
- Spaces only: typing only spaces shows all badges (no empty table)
- Assign Badges popup layout looks clean and correct in light mode
Issues That Need To Be Addressed
- Dark mode - column headers not visible in Assign Badges popup
In dark mode, the "Badge" and "Name" column headers in the popup are invisible. The header text color blends into the dark background, making the table legend unreadable. In light mode these headers display correctly. The header row styling needs a dark mode color update to ensure proper contrast.
There was a problem hiding this comment.
Hi Peterson,
I reviewed the changes in AssignBadgePopup.jsx and examined the updated search logic.
Observations:
• The new implementation normalizes both badge names and user input using .replace(/\s+/g, '') before filtering.
• This removes all whitespace, not just leading or trailing spaces.
• As a result, searches with additional spaces between words may still return matches.
Testing Performed:
• Checked out branch peterson-fix-trim-input-prevent-empty-table.
• The PR currently has merge conflicts.
• npm install initially produced an ERESOLVE dependency conflict involving @vitest/ui and vitest, but installation completed successfully using npm install --legacy-peer-deps.
• Launched the application locally and attempted to follow the testing instructions.
• I was able to access user profile pages but could not access the Assign Badges popup.
• Further investigation in Badges.jsx showed that the Assign Badges button is only rendered when the user has either the assignBadges or assignBadgeOthers permission.
• The available test account does not appear to have either permission, so I was unable to access the popup and complete the UI testing steps.
• As a result, this review is based primarily on code inspection and limited application testing.
Question:
• Was the intention to ignore only leading/trailing spaces, or should all whitespace within the search text be ignored? With the current implementation, every whitespace character is removed before comparison.
Screenshots attached.
pixelpix13
left a comment
There was a problem hiding this comment.
Hey Peterson,
Tested the Assign Badges search behavior locally.
Verified
- Searching the full badge name works correctly.
- Adding trailing spaces after the badge name does not break the search result.
- The badge table still shows the expected badge when the input has trailing whitespace.
Trailing Space Handling
The primary issue appears to be fixed. Badge search continues to work when trailing spaces are added to the search input.
Question / Clarification
Spaces in the middle of the search text are also ignored. For example, searching with additional spacing between words still returns the badge.
Please confirm whether this behavior is intentional or if only leading/trailing spaces were meant to be ignored.
Screenshot
Dark Mode
Verified that the table header remains visible and readable in dark mode.
Screenshot
Visual Checkbox Issue
The checkbox functionality appears to work correctly, but the visual state does not update properly.
Observed behavior:
- Clicking a checked checkbox functionally unchecks it.
- However, the checkbox does not clearly indicate that it has become unchecked.
- The visual state appears inconsistent with the actual selected state.
Expected behavior:
- The checkbox should clearly show both checked and unchecked states.
- Visual feedback should remain consistent in dark mode.
Summary
Verified that the trailing-space search issue is resolved.
The only remaining concern is the checkbox visual state, which appears to be a UI issue rather than a functional issue.
3268336
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…odNetworkApp into peterson-implement-three-features-on-user-management-page-2
…com:OneCommunityGlobal/HighestGoodNetworkApp into peterson-fix-trim-input-prevent-empty-table
…odNetworkApp into peterson-fix-trim-input-prevent-empty-table
|
|
Replaced by with this: #5370 |






















Description
This PR was opened to remove trailing spaces from the search input text to ensure the badge table is filtered correctly.
Related PRS (if any):
None.
Main changes explained:
The AssignBadgePopup.jsx component has been modified to fix the bug.
How to test:
npm installand...to run this PR locallyScreenshots or videos of changes:
Before my fix:
Before.my.fix.mp4
After my fix:
After.my.fix.mp4
Note:
None.