feat: add step 2 for the role assignment wizard #111
feat: add step 2 for the role assignment wizard #111bra-i-am wants to merge 9 commits intoopenedx:masterfrom
Conversation
…ation improvements
…e user role management messages
… and aggregate scope options
|
Thanks for the pull request, @bra-i-am! This repository is currently maintained by 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 approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo 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:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. 🔘 Update the status of your PRYour PR is currently marked as a draft. After completing the steps above, update its status by clicking "Ready for Review", or removing "WIP" from the title, as appropriate. 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:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
… states and navigation guards
9ff96b8 to
b193f35
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #111 +/- ##
==========================================
+ Coverage 95.18% 96.79% +1.61%
==========================================
Files 45 51 +6
Lines 913 1281 +368
Branches 181 302 +121
==========================================
+ Hits 869 1240 +371
+ Misses 42 39 -3
Partials 2 2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Caution
This PR is blocked by #109. Once that PR is closed, only the changes related to this PR will be shown
This PR implements the Define Application Scope step of the Assign Role Wizard, completing the scope-selection UI
What's included:
API layer (
data/api.ts)getScopes()— paginated endpoint withsearch,org,context_type,and
management_permission_onlyfilters.getOrganizations()— fetches available organizations for the filter dropdown.Hooks (
data/hooks.ts)useScopes— infinite-query hook with cursor-based pagination (parsespagefrom the
nextURL).useOrganizations— standard query with 30-min stale time.useManagedScopeOrgs— derives the set of orgs the current user can manage,used to gate aggregate scope items.
DefineApplicationScopeStep (
wizard/DefineApplicationScopeStep.tsx)OrgSection(collapsible).org:<slug>— "All courses/libraries in this organization" (per-org managers).*— "All courses/libraries in Platform" (platform managers only).IntersectionObserver; loading spinners for initial loadand paginated fetch.
LibrariesUserManager
AssignNewRoleTriggercomponent with a directnavigation button (
/authz/assign-role?scope=<libraryId>&users=<username>).Additional Information
Resolves #92
Screenshot