Skip to content

feat: add Competency Tree on the Competency Management page - #3218

Open
AShatsila wants to merge 2 commits into
openedx:masterfrom
AShatsila:ashatsila/680-feat-competency-tree
Open

feat: add Competency Tree on the Competency Management page#3218
AShatsila wants to merge 2 commits into
openedx:masterfrom
AShatsila:ashatsila/680-feat-competency-tree

Conversation

@AShatsila

@AShatsila AShatsila commented Aug 28, 2026

Copy link
Copy Markdown

Description

Adds a new read-only Competency Management page at /taxonomy/:taxonomyId/competencies. It shows a competency taxonomy's tags as a nested expand/collapse tree (taxonomy name → groups → sub-competencies), with each row's Competency ID (external_id) displayed next to it. The page is fully read-only: no editing of names or IDs, no add/edit/delete affordances anywhere, and no backend/API/data-layer changes.

This is a new page, so it doesn't change behavior for any existing role. It's intended for Platform Administrators who need to browse a taxonomy's competencies by their stable Competency ID before applying competency criteria elsewhere.

image

Supporting information

Testing instructions

  1. Enable the ENABLE_TAGGING_TAXONOMY_PAGES feature flag.
  2. Have (or create) a competency taxonomy with a nested tag tree at least 2 levels deep, where at least one tag has no external_id set.
  3. As a Platform Administrator (staff) user, navigate to /taxonomy/:taxonomyId/competencies for that taxonomy.
  4. Confirm the tree renders with the taxonomy's own name as the top row, groups below it, and sub-competencies nested under their group.
  5. Use Expand All / Collapse All and individual row toggles; confirm indentation stays correct at every level.
  6. Confirm each tag with an external_id shows it as a badge, and the tag without one shows no badge (not the literal text "undefined" or "null").
  7. Confirm there is no add/edit/delete/rename control anywhere on the page.
  8. Resize to a narrow viewport and confirm the tree and Competency IDs stay readable and correctly associated.
  9. Open the existing /taxonomy/:taxonomyId page (tag editing) and confirm it's unaffected — same table, same columns, same zebra striping as before.

Other information

  • No backend, API, or data-layer changes.
  • Entry point is URL-only for this ticket — no link was added from the taxonomy detail page or its menu, per the agreed scope.
  • The API doesn't distinguish "competency" taxonomies from other taxonomies, so this page will render whatever taxonomy id is in the URL, including system-defined ones whose tags may not be fully enumerable. Known limitation, to revisit once/if the backend exposes a competency-enabled flag.
  • Architecture note: this page does not reuse the existing table-based tag tree-table shell (src/taxonomy/tree-table/) that the editable taxonomy detail page uses. That shell is built around an HTML <table>/TanStack Table, which can't express per-row gaps or nested "card" grouping without hacky workarounds (<tr> can't take margin, and a box-shadow-based border approach bled across row boundaries). Since this page needs neither the shared shell's editing machinery nor its tabular semantics, it renders its own lightweight <ul>/<li> tree instead, reusing only the taxonomy-tag-to-tree data shaping (TagTree) from the existing tag-list feature.
  • Paragon note: the Competency ID badge's exact color (#006DAA) doesn't correspond to any existing Paragon semantic color variant in this app's theme (variant="info" resolves to teal) - it's retinted via a page-scoped CSS custom-property override on top of the real Badge component. Flagging per the standing internal reminder to surface anything not natively available in Paragon.
  • Accessibility: the disclosure chevron's clickable area is kept at the WCAG 2.2 AA minimum of 24×24px even though its visible icon is smaller (16px, per the Figma spec), via an invisible expanded hit area. The Competency ID badge also carries its own aria-label since there's no table header for screen readers to associate it with.

Best Practices Checklist

  • Any new files are using TypeScript (.ts, .tsx).

  • Avoid propTypes and defaultProps in any new or modified code.

  • Tests should use the helpers in src/testUtils.tsx (specifically initializeMocks)

  • Do not add new fields to the Redux state/store. Use React Context to share state among multiple components.

  • Use React Query to load data from REST APIs. See any apiHooks.ts in this repo for examples.

  • All new i18n messages in messages.ts files have a description for translators to use.

  • Avoid using ../ in import paths. To import from parent folders, use @src.

  • Any special concerns or limitations? For example: deprecations, migrations, security, or accessibility.

Best Practices Checklist

We're trying to move away from some deprecated patterns in this codebase. Please
check if your PR meets these recommendations before asking for a review:

  • Any new files are using TypeScript (.ts, .tsx).
  • Avoid propTypes and defaultProps in any new or modified code.
  • Tests should use the helpers in src/testUtils.tsx (specifically initializeMocks)
  • Do not add new fields to the Redux state/store. Use React Context to share state among multiple components.
  • Use React Query to load data from REST APIs. See any apiHooks.ts in this repo for examples.
  • All new i18n messages in messages.ts files have a description for translators to use.
  • Avoid using ../ in import paths. To import from parent folders, use @src, e.g. import { initializeMocks } from '@src/testUtils'; instead of from '../../../../testUtils'

SaXaPhonist and others added 2 commits August 28, 2026 16:14
@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Aug 28, 2026
@openedx-webhooks

openedx-webhooks commented Aug 28, 2026

Copy link
Copy Markdown

Thanks for the pull request, @AShatsila!

This repository is currently maintained by @bradenmacdonald.

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
🔘 Submit a signed contributor agreement (CLA)

⚠️ We ask all contributors to the Open edX project to submit a signed contributor agreement or indicate their institutional affiliation.
Please see the CONTRIBUTING file for more information.

If you've signed an agreement in the past, you may need to re-sign.
See The New Home of the Open edX Codebase for details.

Once you've signed the CLA, please allow 1 business day for it to be processed.
After this time, you can re-run the CLA check by adding a comment below that you have signed it.
If the CLA check continues to fail, you can tag the @openedx/cla-problems team in a comment for further assistance.

🔘 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.

@github-project-automation github-project-automation Bot moved this to Needs Triage in Contributions Aug 28, 2026
@AShatsila
AShatsila marked this pull request as ready for review August 28, 2026 15:13
@AShatsila AShatsila changed the title Feat add Competency Tree on the Competency Management page feat: add Competency Tree on the Competency Management page Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

[FE] Display Competency ID on the Competency Management page

3 participants