Skip to content

Conversation

@jacobo-dominguez-wgu
Copy link
Contributor

@jacobo-dominguez-wgu jacobo-dominguez-wgu commented Nov 24, 2025

Description

Backport for #42

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 ([email protected])
    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)

Demo video

Grabacion.de.pantalla.2025-11-20.a.la.s.4.08.25.p.m.mov

How to test it

We can test all the error cases described here, but also the next case scenarios covers most of the error and success cases:

Test scenario 1 (success)

Add a role to an existing user which role is not already set.
Expected: It should show the success toast message for 5 seconds and the modal automatically closes.

Test scenario 2 (already set error)

Add a role to an existing user which role is already set.
Expected: It should show the already set toast message for 5 seconds and the modal does not close.

Test scenario 3 (two usernames, one successful and one error)

Type the username of an existing user and one nonexisting and asign a role not already set.
Expected: It should show the success toast message and the non existing user message for 10 seconds. The modal does not closes and the username of the nonexisting and input text area should be in error state.

Test scenario 4 (three usernames, one successful and two errors)

Type the username of an existing user, one nonexisting user and one existing user with a role asigned (user3), asign the role of the user 3.
Expected: It should show the success toast message, the non existing user message and the already set role error message for 15 seconds. The modal does not closes and the usernames of the nonexisting user and the already set user should be in error state.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Nov 24, 2025
@openedx-webhooks
Copy link

Thanks for the pull request, @jacobo-dominguez-wgu!

This repository is currently maintained by @openedx/committers-frontend.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@codecov
Copy link

codecov bot commented Nov 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (release/ulmo@3a1cafa). Learn more about missing BASE report.

Additional details and impacted files
@@               Coverage Diff               @@
##             release/ulmo      #44   +/-   ##
===============================================
  Coverage                ?   94.95%           
===============================================
  Files                   ?       44           
  Lines                   ?      912           
  Branches                ?      155           
===============================================
  Hits                    ?      866           
  Misses                  ?       44           
  Partials                ?        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jacobo-dominguez-wgu jacobo-dominguez-wgu added the mao-onboarding Reviewing this will help onboard devs from an Axim mission-aligned organization (MAO). label Nov 24, 2025
@jacobo-dominguez-wgu jacobo-dominguez-wgu moved this from Needs Triage to Ready for Review in Contributions Nov 24, 2025
@mphilbrick211 mphilbrick211 added the backport PR backports a change from main to a named release. label Dec 3, 2025
@MaferMazu MaferMazu moved this to In Progress in RBAC AuthZ Board Dec 4, 2025
@dcoa dcoa changed the title [backport] changing how the feedback message is displayed for adding team members fix(ulmo-backport): changing how the feedback message is displayed for adding team members Dec 28, 2025
@openedx-webhooks openedx-webhooks added the core contributor PR author is a Core Contributor (who may or may not have write access to this repo). label Dec 28, 2025
@dcoa dcoa changed the title fix(ulmo-backport): changing how the feedback message is displayed for adding team members fix(ulmo): backport changing how the feedback message is displayed for adding team members Dec 28, 2025
@dcoa
Copy link
Contributor

dcoa commented Dec 30, 2025

@jacobo-dominguez-wgu could you please update this, so I can merge? I think there is a change that is not integrated here compared with the master version.

@jacobo-dominguez-wgu
Copy link
Contributor Author

@jacobo-dominguez-wgu could you please update this, so I can merge? I think there is a change that is not integrated here compared with the master version

It is updated now to include the same changes as the master version.

@dcoa dcoa merged commit a77878c into openedx:release/ulmo Jan 2, 2026
6 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in RBAC AuthZ Board Jan 2, 2026
@github-project-automation github-project-automation bot moved this from Ready for Review to Done in Contributions Jan 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport PR backports a change from main to a named release. core contributor PR author is a Core Contributor (who may or may not have write access to this repo). mao-onboarding Reviewing this will help onboard devs from an Axim mission-aligned organization (MAO). open-source-contribution PR author is not from Axim or 2U

Projects

Status: Done
Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants