Skip to content

fix/873: course and content section height and scroll - #3320

Draft
AShatsila wants to merge 1 commit into
openedx:masterfrom
AShatsila:ashatsila/873-fix-course-content-height
Draft

AShatsila wants to merge 1 commit into
openedx:masterfrom
AShatsila:ashatsila/873-fix-course-content-height

Conversation

@AShatsila

Copy link
Copy Markdown
Contributor

Description

Fixes openedx/openedx-core#873. On the Competency Management page, the competency tree (left column) and the course panel (right column) now have the same fixed height on desktop, at any screen size and zoom level. When the course list doesn't fit in that height, it scrolls inside the panel instead of making the panel taller.

The columns had different heights for two reasons:

  • The tree's height depended on the viewport. .competency-tree was calc(100vh - 260px), so it was 820px tall at a 1920x1080 viewport and 508px at 1366x768.
  • The course panel had no height of its own. The two columns sit in a flex row with align-items: stretch, which makes both columns as tall as the taller one. With a full page of 10 courses, the course panel was always the taller one, so it set the height of the row. Its overflow-y: auto never took effect, and expanding a course made the panel taller still.

Roles affected: Course Author (Competency Management page).

Screenshots: a 1920x1080 viewport with 10 courses on the first of 3 pages.

| Before

image image

| After

image image

Heights measured in the browser, tree column / course column, in px:

Supporting information

Testing instructions

You need a Competency taxonomy and a Studio instance with more than 10 courses, so that the course panel shows a full page and the pagination.

  1. Open the Competency Management page of a Competency taxonomy (/authoring/taxonomy/<id>/competencies) on a desktop-width window and select any competency.
  2. The tree and the course panel have the same height. Their bottom edges line up.
  3. With all courses collapsed, all 10 courses fit in the panel without a scrollbar, and the pagination is at the bottom of the panel.
  4. Expand a course. The panel does not get taller. A scrollbar appears in the course list. Scroll the list: the "Competency criteria associations" block, the "Courses & Content" label and the pagination stay in place.
  5. Click "Expand All" in the tree. The tree scrolls inside its own column, as before, and both columns keep the same height.
  6. Resize the browser window and change the browser zoom level. Both columns keep the same height. When they don't fit in the window, the whole page scrolls.
  7. Drag the divider between the columns. The column widths change and long titles wrap, but the height of both columns stays the same.
  8. Search for a course that returns fewer than 10 results, then for one that returns none. The panel keeps the same height, and the empty space stays below the list.
  9. Narrow the window below the desktop breakpoint so that the columns stack vertically. The course panel grows with its content, with no inner scrollbar, as before.

Other information

  • No new unit tests. The change is layout only, and jsdom has no layout engine, so heights and scrolling cannot be checked in Jest. The existing competency-management tests pass. The heights above were measured in a headless Chromium against a local Tutor devstack.
  • The devstack has a single course, so the screenshots and measurements use a mocked /api/contentstore/v2/home/courses response with 10 courses. The first one, "Demonstration Course", is the real demo course, so its outline loads when it is expanded.
  • 73rem fits 10 collapsed courses whose titles fit on one line. If titles wrap, for example in a narrow course column, the list shows a scrollbar even with 10 collapsed courses. The issue allows this case: content that doesn't fit the panel's height scrolls inside the panel.

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, e.g. import { initializeMocks } from '@src/testUtils'; instead of from '../../../../testUtils'

🤖 Generated with Claude Code

@codecov

codecov Bot commented Oct 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.20%. Comparing base (de0c6ad) to head (bd49e49).

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #3320    +/-   ##
========================================
  Coverage   96.20%   96.20%            
========================================
  Files        1446     1446            
  Lines       35384    35386     +2     
  Branches     8179     8476   +297     
========================================
+ Hits        34041    34043     +2     
+ Misses       1301     1285    -16     
- Partials       42       58    +16     

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

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Oct 21, 2026
@openedx-webhooks

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

🔘 Update the status of your PR

Your 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:

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

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.

[Bug] Competency Management page: the course panel doesn't match the competency tree's height and grows with its content

2 participants