Repository navigation
Conversation
AShatsila
force-pushed
the
ashatsila/709-delete-criteria-groups
branch
from
October 13, 2026 10:06
60530c9 to
5ddf424
Compare
7 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Implements Delete Competency Course & Rule Groups (openedx/openedx-core#709). It builds on <link to the openedx#671 PR>. Until that PR merges, this PR's diff also shows its changes. To review only this PR's own changes, open the last commit, "feat: add delete hooks for group and courses".
Each Course Group and each Rule Group on the Competency Management page's associations panel now has a trash icon. A click deletes the group right away, with no confirmation dialog. openedx/openedx-core#786 adds that dialog later.
Data layer (
data/):deleteCompetencyCriteriaGroupsendsDELETE /api/cbe/v1/competencies/<tag_id>/criteria-groups/<group_id>/.useDeleteCompetencyCriteriaGrouprefetches the criteria groups after every delete, whether it succeeds or fails. It stays pending until that refetch lands, so the panel only ever shows what the server holds.Trash controls (
criteria-groups/):Focus after a delete (
utils.ts,CompetencyAssociationsContext.tsx): before sending the request, the provider records the page order. Once the refetch lands, the pure helperfocusTargetAfterRemovalpicks the new focus from that order and the refreshed data:The newly focused Rule Group's first rule box is the target for the next subsection the author selects. When the deleted group took the browser's keyboard focus with it, keyboard focus moves to the new Rule Group's header, or to the empty-state message when the panel is empty. A collapsed Course Group expands when focus moves into it.
Roles affected: Course Author (Competency Management page).
Supporting information
Testing instructions
These steps need a Studio instance with the openedx-core CBE API, including the DELETE endpoint from ufedaseyeuconsultant/openedx-core#4, and openedx/openedx-platform#39099 applied.
Other information
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. To import from parent folders, use@src, e.g.import { initializeMocks } from '@src/testUtils';instead offrom '../../../../testUtils'🤖 Generated with Claude Code