changing how the feedback message is displayed for adding team members #42
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR is intended to improve the feedback process and have a better feedback system for user's input in the add team member modal.
Closes #14.
What it changes:
Improved Toast Feedback System
Before: Single generic toast message for all scenarios
After: Separate toast messages for each status type:
✅ Successfully added users
❌ User already has the assigned role
❌ User not found
❌ Generic errors
This provides clearer, more actionable feedback to users.
Enhanced Message Clarity
Added user identification: Toast messages now include the specific userId that triggered each status
Example:
The user already has the role (jon@mail.com)Benefit: Users can easily identify which specific user caused each message when multiple toasts are displayed
Visual Error Indicators
Extended red text functionality: Previously only "user not found" errors showed red text in the input textarea
Now applies to all error types: Any user causing an error will appear in red in the textarea
Improved UX: Users can quickly identify problematic entries and fix them
Better Error Handling Flow
Modal behavior: The "Add Team Member" modal no longer auto-closes when errors occur
Why: Allows users to immediately correct typos or invalid entries without reopening the modal
Result: Smoother error recovery workflow
Dynamic Toast Duration
Adaptive timing: Toast display duration now scales with the number of messages
Formula: 5 seconds × number of toast messages displayed
Rationale: Gives users adequate time to read multiple concurrent messages (up to 4 different toast types)
Code Quality Improvements
Better maintainability: Separated error handling logic by error type
Improved readability: Clear separation of concerns between different feedback scenarios
Demo video
Grabacion.de.pantalla.2025-11-20.a.la.s.4.08.25.p.m.mov