Skip to content

make the role assignation wizard a full-screen modal - #283

Open
jacobo-dominguez-wgu wants to merge 1 commit into
masterfrom
jacobo/wizard-full-screen-modal
Open

jacobo-dominguez-wgu wants to merge 1 commit into
masterfrom
jacobo/wizard-full-screen-modal

Conversation

@jacobo-dominguez-wgu

@jacobo-dominguez-wgu jacobo-dominguez-wgu commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Description

The role assignation wizard was a routed page, so assigning a role navigated the admin away from the team or audit page they were working on and then back again.
It now opens as a Paragon FullscreenModal triggered from the existing Assign Role button, matching the openedx pattern used elsewhere on the platform.

Closes #240 (part of #237)

Changes

Wizard → modal

  • AssignRoleWizard renders a FullscreenModal. The Stepper wraps the modal rather than sitting inside it, because the stepper header, the steps and the per-step action rows go into three different modal slots (beforeBodyNode, the body, footerNode) and all three need the same stepper context.
  • AssignRoleWizardModal replaces AssignRoleWizardPage, keeping the roles-assignable derivation (MANAGE_TEAM_PERMISSIONS × course-authoring flag) unchanged.
  • AddRoleButton hosts the modal and owns the open/closed state.
  • Removed the assign-role route, ROUTES.ASSIGN_ROLE_WIZARD_PATH, buildWizardPath and the unused from prop. Renamed wizard.page.title to wizard.modal.title and dropped the now-dead wizard.page.breadcrumb.

Toast fixes (see Notes)

  • Raised .toast-container above the modal layer.
  • Stopped a press on a toast from reaching the document.

Testing

  • 582 unit tests pass; lint and tsc --noEmit clean.
  • New tests: modal opens/closes, closes from the header X, roles-assignable matrix carried over from the old page test, form re-seeds on open.
  • Toast regression tests verified by removing the fix and confirming they fail, so they can actually catch it.
  • Manual testing: verify assign role wizard keeps working as usual now as a fullscreen modal

Notes

The commit mixes two concerns. The subject describes the modal conversion, but the commit also contains the toast z-index and click-outside workarounds (style.scss, ToastManagerContext.tsx).

Why the toast changes are here. Converting the wizard to a modal exposed two latent bugs, both of which the Paragon maintainer predicted in openedx/paragon#3654:

  1. .toast-container sat at z-index: 1000 against the modal layer's 1050, so a toast raised from a modal painted underneath it — dimmed by the backdrop for a centred modal, and completely invisible behind a full-screen one. The existing comment claiming it cleared the modal was never true.
  2. react-focus-on watches the document for presses outside the modal to fire onClickOutside, and Paragon's #toast-root is outside it, so pressing a toast closed the modal — which for the wizard also discarded the form, including when reaching for the toast's own Retry button.

Both are workarounds pending openedx/paragon#3654. They apply to every modal in the app, so the delete-role confirmation benefits too.

Screenshots

Step 1:
image

Step 2:
image

@openedx-webhooks openedx-webhooks added open-source-contribution PR author is not from Axim or 2U core contributor PR author is a Core Contributor (who may or may not have write access to this repo). labels Oct 30, 2026
@openedx-webhooks

openedx-webhooks commented Oct 30, 2026 •

Copy link
Copy Markdown

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

codecov Bot commented Oct 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.53%. Comparing base (5fc4953) to head (1e2eb92).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #283      +/-   ##
==========================================
- Coverage   98.55%   98.53%   -0.02%     
==========================================
  Files          80       80              
  Lines        1385     1368      -17     
  Branches      468      427      -41     
==========================================
- Hits         1365     1348      -17     
  Misses         19       19              
  Partials        1        1              

☔ View full report in Codecov by Harness.
📢 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 marked this pull request as ready for review October 30, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core contributor PR author is a Core Contributor (who may or may not have write access to this repo). open-source-contribution PR author is not from Axim or 2U

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

Role assignation wizard: convert to full-screen modal

2 participants