Skip to content

Conversation

@ChrisChV
Copy link
Contributor

@ChrisChV ChrisChV commented Nov 19, 2025

Description

  • Implements all the states for the Import Course Details
  • Which user roles will this change impact? "Course Author"

Partial

image

Failed

image

Success

image

In Progress

image

Supporting information

Testing instructions

Other information

TODO:

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'

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Nov 19, 2025
@openedx-webhooks
Copy link

openedx-webhooks commented Nov 19, 2025

Thanks for the pull request, @ChrisChV!

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.


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 Nov 19, 2025
@ChrisChV ChrisChV marked this pull request as draft November 19, 2025 00:45
@codecov
Copy link

codecov bot commented Nov 19, 2025

Codecov Report

❌ Patch coverage is 98.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.87%. Comparing base (0c1554b) to head (58acdb2).
⚠️ Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
...rary-authoring/import-course/ImportDetailsPage.tsx 97.65% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2664      +/-   ##
==========================================
+ Coverage   94.86%   94.87%   +0.01%     
==========================================
  Files        1233     1232       -1     
  Lines       27940    28065     +125     
  Branches     6337     6200     -137     
==========================================
+ Hits        26505    26627     +122     
- Misses       1364     1380      +16     
+ Partials       71       58      -13     

☔ View full report in Codecov by Sentry.
📢 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.

@mphilbrick211 mphilbrick211 moved this from Needs Triage to Waiting on Author in Contributions Nov 19, 2025
@ChrisChV ChrisChV changed the title feat: Import Course Details Page feat: Import Course Details Page [FC-0112] Nov 20, 2025
@ChrisChV ChrisChV marked this pull request as ready for review November 21, 2025 01:55
Copy link
Contributor

@navinkarkera navinkarkera left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ChrisChV I pushed two commits:

  • Replace button with link in course card, to navigate user to import details page - Link allows user to see url before clicking and use other options like open in new window/tab.
  • The block info was not being fetched in production mode after the import process is completed in async mode. You need to run cms-worker locally and set CELERY_EAGER_MODE=False to test this. It takes a lot of time to set it up so I just fixed the issue and committed it here.

Other than the above issues (should be fixed now), everything looks good. Thanks for the great work!

Comment on lines 91 to 95
<IconButton
src={ArrowForwardIos}
alt={intl.formatMessage(messages.courseImportNavigateAlt)}
onClick={() => navigate(`${courseImport.source.key}/${courseImport.taskUuid}`)}
/>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having a link is better if the button is only doing navigation, allows user to see url before clicking, open in a new tab etc.

Suggested change
<IconButton
src={ArrowForwardIos}
alt={intl.formatMessage(messages.courseImportNavigateAlt)}
onClick={() => navigate(`${courseImport.source.key}/${courseImport.taskUuid}`)}
/>
<Link
// window.location.href is required due to browser mistaking course id and taskUuid
// combination as an external link to be opened with an external application.
to={`${window.location.href}/${courseImport.source.key}/${courseImport.taskUuid}`}
aria-label={intl.formatMessage(messages.courseImportNavigateAlt)}
className="text-primary-500"
>
<Icon src={ArrowForwardIos} />
</Link>

PS: You'll need to remove useNavigate, IconButton etc. as they will be unused after above change.

@ChrisChV
Copy link
Contributor Author

ChrisChV commented Dec 3, 2025

@navinkarkera Thanks!

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: Waiting on Author

Development

Successfully merging this pull request may close these issues.

3 participants