Repository navigation
Conversation
Adds the API client, query hooks, types and index utilities for the CBE criteria-groups, criteria and rule-profile endpoints, and the associations context that the criteria UI builds on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Expanding a course now focuses its last bottom-tier group and rule box unless focus is already in that course, and the provider exposes whether course outlines are still loading. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ProcessingNotification takes an optional icon, threaded through showToast. The already-associated toast uses InfoOutline and the create-criterion failure toasts use Error; every other toast keeps the spinning gear. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Switching the active competency reset the expanded-course set, so a course left expanded in the content panel lost its select controls until it was collapsed and expanded again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A create request that finishes after the author switches competency no longer replaces the new competency's focus. A course expanded before the criteria groups and default profile load now gets its group and rule focus once they arrive, unless the author has picked a group or rule since. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A pending course expansion is no longer applied in the render that switches competency, where the index may already hold the new competency's cached tree. A create response is matched against a per-switch selection counter, so leaving and returning to the same competency no longer lets an old response overwrite the author's focus. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The component now renders info and error toasts as well as the saving spinner, so the name describes the generic toast, with the spinner as the default icon. The icon tests assert that the passed icon renders. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The provider exposes one status/error across groups, profile and course outlines instead of raw query objects, and the status stays successful for the rest of a competency once it settles. - Each create handles its own result through mutateAsync, the context exposes isAssociating, and the mutation stays pending until the groups refetch completes. - Competency-switch bookkeeping lives in one reducer, which also drops create responses from an earlier competency visit. - A missing default profile shows the failure toast instead of a silent no-op. - Rename index to groupsIndex and lastRealRuleKeyIn to lastRuleKeyIn, drop the archived field the groups endpoint never sends, and move the provider test fixtures into __mocks__. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds the course group, rule box and criterion chip components and wires gradeable-subsection association selection into the competency management page's course search panel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The associations panel shows its loading state until course outlines resolve, and subsection rows offer the add control only once the criteria groups and default rule profile have loaded. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nest course groups, criteria groups and rule boxes with a left accent bar on the focused item at each level. Render the subsection association as a single pill with applied and available states. Out-of-scope actions (removing a criterion or an association, editing the score threshold) are shown as inert icons. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The course group list shows its loading and error states from the context status, so the empty state appears only after a successful load. The subsection association button stays disabled until the data has loaded and while a create is in flight. The test mock provider moves to __mocks__ with the flat context shape. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The context value is a discriminated union on status, so a successful load always carries the groups tree and the default profile. An outline 403 or 404 hides that course; any other outline error is a load error, so a failed load never reads as "no associations". - When the focused rule key matches none of the group's boxes, focus moves to the group's last box, and a create always sends the focused group's id. - The subsection pill is the row's only control, with an accessible label, rendered only once the data has loaded and the course is editable, and disabled while a create is in flight. - Group headers and rule-box threshold lines are native buttons marked with aria-current; a collapsed course card reopens when focus moves into it; course card toggles name their course. - Inert remove icons, the score chevron and their unused props and branches are removed until the removal and editing tickets add them. - Stylesheets use Paragon tokens and Stack gaps, criteria-groups no longer imports from course-search, and test fixtures are shared via __mocks__, with an integration test over the real provider. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
An "Associate" click with focus outside the subsection's course now adds to that course's last group and rule box instead of creating a new group. Expanding a course reopens its collapsed card, a failed permission check shows an error, and isAssociating applies only to the selected competency. The threshold label is one ICU message with a formatted percent, the rule-box overlay uses Paragon's stretched-link, and tests are hardened. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use a bold span for the course name in the card heading, name the stale-rule-key action fields and pull their resolution into a helper, keep the chip list above the rule box's stretched link, reword a translator description, and tighten several tests and mock comments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Space the "Demonstrate Mastery For" line evenly from the label and the first card, center the competency badge on its text, tighten the course card header, and use Paragon tokens for fractional font and spacing values. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Shrink the collapse toggle to its 16px icon, align it and the body with the Figma offsets, and keep a single keyboard focus ring on it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A saved rule box's score now opens a "Competency Completion Rule" popover with Cancel and Save, and Save asks for confirmation before anything is sent. Choosing a new any/all value on a saved criteria group asks for the same confirmation right away; Cancel switches the dropdown back. A failed save keeps the dialog open with an error alert instead of a toast, so the author's edit stays on screen. Unsaved placeholder rule boxes and groups keep their inline behavior. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ility Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
When a course run's course-level group for the selected competency is archived, the expanded row in the Courses & Content panel shows a message in place of the outline, and the outline is never fetched. The archived course runs come from the groups response's archived_course_keys (openedx#840), read through the provider as isCourseGroupArchived. While the groups or profile query is loading, an expanded row shows a spinner. Keyboard focus moves to the message only when it was inside the outline at the moment the outline unmounted. Closes openedx/openedx-core#841 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Upstream master already contains the competency management work this branch was stacked on, plus a score settings popover with an editable operator. This merge takes upstream's version of every file. The edit confirmation is re-applied on top of upstream's popover in the commits that follow. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Editing a saved rule box's score or a saved criteria group's any/all value on the Competency Management page asks the author to confirm before anything is saved. The dialog states that the change applies only to future evaluations of the competency. The score settings popover has Cancel and Save buttons. On a saved rule box, Save and Enter open the confirmation, and Cancel, Escape, and a click outside discard the draft. Cancelling the confirmation reopens the popover with the unsaved operator and percentage. A failed save keeps the dialog open with an alert, so the author can retry. The unsaved placeholder rule box and group keep saving without a dialog, because no learner has been evaluated against them. DeleteModal takes an isPending prop that blocks dismissal and shows the confirm button's pending state while a save is in flight. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Brings in upstream master and the edit confirmation built on upstream's score settings popover. The archived course rules message is kept on top of upstream's blocked-course handling: an archived course shows the message in place of its outline, so the blocked-course tooltip inside the outline does not render for it. The test for an expanded row while the groups load expects the loading spinner, because the row does not know whether the course is archived until the groups arrive. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…chived message - A shown outline stays mounted while the associations data reloads, so its expanded sections survive a competency switch or a search or page change. The spinner shows only before the outline's first mount. - The "focus was inside the outline" flag survives a spinner between the outline and the archived message. - Removing the last association from its chip with the keyboard moves focus to the archived message. Chromium drops focus to the body when the remove button is disabled for the delete, so the outline remembers that focus was inside it when the delete began. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Thanks for the pull request, @bsparks! 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. DetailsWhere 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. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3411 +/- ##
========================================
Coverage 96.58% 96.59%
========================================
Files 1473 1473
Lines 37169 37210 +41
Branches 8828 9177 +349
========================================
+ Hits 35901 35942 +41
+ Misses 1227 1213 -14
- Partials 41 55 +14 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Description
Fixes openedx/openedx-core#841. On the Competency Management page, expanding a course whose rules for the selected competency were archived shows a message in place of the course's outline:
What changed:
CourseRowrenders the message, in the same place and with the same small-text markup as the existing "This course has no gradeable subsections." text, instead of mountingCourseOutlineSubtree. Because the subtree is never mounted, the outline of an archived course is never requested, and the message replaces every other state of the row: another competency's association, no write access, no gradeable subsections, and an outline error.status, the same value the Competency Criteria Associations panel uses, so the two panels agree on when the data is ready. Once it has loaded, the row shows the message or the outline without a page reload.archivedCourseKeysis a required field ofCompetencyCriteriaGroupsResponse. A response without it reads as "no course archived".Roles affected: Course Author (Competency Management page).
Screenshots
Supporting information
archived_course_keysto the criteria-groups response. It is merged and is in openedx-core 1.29.0 and later.master; the diff againstmasteris the change described here.Testing instructions
You need openedx-core 1.29.0 or later, a Competency taxonomy, and a course you can edit in Studio in which a learner has recorded progress against one of the competency's rules.
/authoring/taxonomy/<id>/competencies), select the competency. In the Courses & Content panel, expand the course. Its sections and gradeable subsections are shown.course_indexrequest was made for the course after the archive.Other information
archived_course_keys, so no course reads as archived and the page behaves as it did before.isCourseGroupArchived, notisCourseArchived, because "archived course" in this repository already means an ended Studio course run.CourseRow.test.tsx, 3 inCompetencyAssociationsContext.test.tsx, and 1 inCourseSearchBrowse.test.tsx. All 837 tests insrc/taxonomy/competency-managementpass.tsc --noEmitanddprintare clean.npx oxlint --type-awarereports oneno-floating-promiseserror inCompetencyAssociationsContext.tsx, on aqueryClient.invalidateQueriescall for blocked courses; that line is unchanged frommaster. jsdom does not move focus off a button that becomes disabled and has no assistive technology, so step 10 above covers what the focus tests cannot; the keyboard removal was also checked in headless Chromium against a devstack with openedx-core 1.30.0.Best Practices Checklist
.ts,.tsx).propTypesanddefaultPropsin any new or modified code.src/testUtils.tsx(specificallyinitializeMocks)apiHooks.tsin this repo for examples.messages.tsfiles have adescriptionfor translators to use.../in import paths. The new and changed files import siblings withinsrc/taxonomy/competency-managementwith../, matching the rest of that folder.🤖 Generated with Claude (Fable 5.2)