Skip to content

Amaan taking over for Sireesha - Peterson implemented a toast message when no user is found in Project. - #4746

Merged
one-community merged 6 commits into
developmentfrom
peterson-implement-toast-when-no-user-found
Jul 6, 2026
Merged

Amaan taking over for Sireesha - Peterson implemented a toast message when no user is found in Project. #4746
one-community merged 6 commits into
developmentfrom
peterson-implement-toast-when-no-user-found

Conversation

@peterson337

Copy link
Copy Markdown
Contributor

Description

This PR was opened to implement a toast when the filter finds no users.

Related PRS (if any):

None.

Main changes explained:

The Members.jsx component has been modified to fix the bug.

How to test:

  1. check into current branch
  2. do npm install and ... to run this PR locally
  3. Clear site data/cache
  4. log as admin user
  5. other links→ project
  6. A red toast should appear when the entered username does not exist.

Screenshots or videos of changes:

Uploading After my fix.mp4…

Note:

None.

@peterson337 peterson337 added the do not review Do not review or look at code without full context label Jan 21, 2026
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
C Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@netlify

netlify Bot commented Jan 21, 2026

Copy link
Copy Markdown

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit d44a561
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/6a46e392f42f3500075a2e7b
😎 Deploy Preview https://deploy-preview-4746--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@kunchalasireesha kunchalasireesha changed the title Peterson implemented a toast message when no user is found. Sireesha - Peterson implemented a toast message when no user is found. Jun 26, 2026

@DeepighaJ DeepighaJ left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

  • The error toast appears when user not found as expected.
  • When filtering the values the layout shows empty white space below the result table. Does this comes under scope? PFA screenshot.
  • The Search and Filter By label is in white background and text need contrast improvement in the dark mode.
Image Image

@kzou55 kzou55 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi Sireesha,

I ran and tested the PR locally.

Issue/Concerns

  • Is the testing instruction correct? It says to go to the /projects page. I see that the red toast appears when the searched project/username is not found. But it is different from the one where I saw in the "files changed". As currently I see "Could not find user or project, please try again.". And in the file it says "No matching users found".
    Image

    Image
  • This leads me to my other confusion. I see the same red toast message that you had in the code. But it's at the /project/members/[projectid] page when I enter a name. Correct me if I'm wrong but I just clicked on a project so I'm assuming the number means the project id. So did you mean for reviewers to test the /projects or /project/members/[projectid] page
    Image

    • If so, could you clarify why the check only checks for the first name of the user?
    Image

@HemanthNidamanuru HemanthNidamanuru left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi Sireesha,

I tested this PR locally.

The "Search" and "Filter By" labels have a white background, and the text needs better contrast in dark mode.
When filtering values, the layout leaves empty white space below the result table.
The error toast appears correctly when a user is not found, as expected.

Image

@one-community one-community added High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible and removed do not review Do not review or look at code without full context labels Jul 1, 2026
@AmaanSyed09 AmaanSyed09 changed the title Sireesha - Peterson implemented a toast message when no user is found. Amaan taking over for Sireesha - Peterson implemented a toast message when no user is found. Jul 2, 2026
@AmaanSyed09 AmaanSyed09 changed the title Amaan taking over for Sireesha - Peterson implemented a toast message when no user is found. Amaan taking over for Sireesha - Peterson implemented a toast message when no user is found in Project. Jul 2, 2026
@AmaanSyed09

Copy link
Copy Markdown
Contributor

Thank you for the review.

This PR focuses on improving the “Find User” functionality in the Members section of the HGN Software Handover flow, specifically fixing search behavior, API triggering, and toast handling.

Changes implemented:

  1. Controlled search behavior (removed auto-search while typing)

    • Previously, the search API was being triggered while typing due to input change handling and debounce-like behavior.
    • Updated the flow so that typing only updates local state (searchText/query).
    • The API call is now executed only when the user explicitly clicks the “Find” button.
    • This ensures predictable search behavior and prevents unnecessary API calls during typing.
  2. Fixed toast notification logic for “No matching users found”

    • Added proper conditional handling so that the error toast only appears after a completed search action.
    • Toast is shown only when:
      • A search is triggered via “Find”
      • The result set is empty
      • The input is non-empty
    • Prevented toast from appearing on page refresh or intermediate state updates.
  3. Improved search state handling

    • Introduced/adjusted validation state (isValid) to ensure search results are processed only after API completion.
    • Ensured foundUsers updates are properly consumed before rendering results.
    • Prevented premature UI updates during input changes.
  4. UI behavior fixes

    • Search input now behaves as a controlled field without side effects.
    • “Find” action is the single source of truth for triggering search execution.
    • “All” / reset behavior remains unaffected.
  5. Dark mode UI fix (secondary improvement)

    • Fixed inconsistent background styling for:
      • “Search”
      • “Filter By”
    • Ensured consistent dark mode appearance using shared module styling.

Behavior after changes:

  • Typing in the search field does not trigger API calls.
  • Clicking “Find” triggers a search correctly.
  • Toast appears only when no matching users are found after a valid search.
  • No toast appears on refresh or empty state transitions.
  • UI labels are consistent in both light and dark modes.

Note:
The spacing/layout behavior observed on the Projects page appears unrelated to this PR scope and is not modified here.

Please let me know if any additional adjustments are required.

Before:

image
Screen.Recording.2026-07-02.at.1.51.29.PM.mov

After:

image image
Screen.Recording.2026-07-02.at.4.19.08.PM.mov

- Disable auto-search while typing
- Trigger search only via Find button
- Fix 'no users found' toast timing and prevent refresh trigger
- Improve state handling for foundUsers/isValid flow
- Fix dark mode contrast for Search and Filter labels
- Apply UI consistency updates across Projects/Members search flow
@sonarqubecloud

sonarqubecloud Bot commented Jul 2, 2026

Copy link
Copy Markdown

@DeepighaJ DeepighaJ left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Tested the PR locally and error toast works as expected and the dark mode Search Filter by issue is fixed.
Since the layout issue is out of scope for this PR, approving this.

Image Image

@HemanthNidamanuru HemanthNidamanuru left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi Amaan,

I retested this PR locally.

The Search and Filter By label styling has been improved, and the empty space below the result table is no longer an issue.

The error toast also appears correctly when a user is not found.

Image Image

@one-community

Copy link
Copy Markdown
Member

Thank you all, merging!

@one-community
one-community merged commit 6ef7329 into development Jul 6, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants