Skip to content

Conversation

@ChrisChV
Copy link
Contributor

@ChrisChV ChrisChV commented Apr 18, 2025

Description

  • Adds the Use unit from library button in the subsection card in the Course Outline
  • Adds a new param showOnlyHomeTab in ComponentPicker to only show the home tab to avoid showing collections or components tabs in the unit picker.
  • Feature to add a unit from a library in the course.
  • Which edX user roles will this change impact? "Course Author".

https://www.loom.com/share/1133a3dfbbd349b18c7cf4aca2023e78?sid=068b4d45-88af-4eef-8e78-a070cbe01325

Supporting information

Testing instructions

  • As it depends on two different branches of edx-platform, use this branch which already contains both branches together
  • Run make requirements on cms and lms shells to install the new version of opaque-keys
  • Run make migrate on cms-shell.
  • Run tutor dev exec cms ./manage.py cms reindex_studio --experimental
  • Go to the library home of a library.
  • Create a new unit. Add some components to the unit. Publish the Unit.
  • Go to the course outline of a course.
  • On a subsection, click on Use unit from library.
  • On the unit picker, choose your library and your unit.
  • Wait for the unit outline of the added unit to open.
  • Return to the course outline and verify that the unit is added in the subsection.

Other information

  • Wait for all dependencies to merge this PR

@openedx-webhooks
Copy link

openedx-webhooks commented Apr 18, 2025

Thanks for the pull request, @ChrisChV!

This repository is currently maintained by @openedx/2u-tnl.

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.

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.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Apr 18, 2025
@ChrisChV ChrisChV marked this pull request as draft April 18, 2025 01:53
@github-project-automation github-project-automation bot moved this to Needs Triage in Contributions Apr 18, 2025
@ChrisChV ChrisChV changed the title feat: Add unit from library in course feat: Add unit from library in course [FC-0083] Apr 18, 2025
@codecov
Copy link

codecov bot commented Apr 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.74%. Comparing base (74d7d66) to head (cc950a3).
Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1829      +/-   ##
==========================================
+ Coverage   93.68%   93.74%   +0.06%     
==========================================
  Files        1142     1146       +4     
  Lines       23479    23824     +345     
  Branches     5050     5127      +77     
==========================================
+ Hits        21996    22334     +338     
- Misses       1407     1414       +7     
  Partials       76       76              

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

@bradenmacdonald
Copy link
Contributor

Adds a new param showOnlyHomeTab in ComponentPicker to only show the home tab to avoid showing collections or components tabs in the unit picker.

Wouldn't we want to show only the "Units" tab instead of "Home"?

@bradenmacdonald
Copy link
Contributor

@ChrisChV Since we might not be able to merge this for another couple days, until the backend PRs are ready, could you make a video demo of it and post that on the issue, so the UX team can start reviewing it based on the video?

Copy link
Contributor

@pomegranited pomegranited left a comment

Choose a reason for hiding this comment

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

👍 Works great thank you @ChrisChV !

  • I tested this using the PR test instructions
  • I read through the code
  • I checked for accessibility issues by using my keyboard to navigate
  • Includes documentation N/A
  • User-facing strings are extracted for translation

@bradenmacdonald
Copy link
Contributor

Adds a new param showOnlyHomeTab in ComponentPicker to only show the home tab to avoid showing collections or components tabs in the unit picker.

Wouldn't we want to show only the "Units" tab instead of "Home"?

It's not a blocker, but I didn't get an answer to this question?

Copy link
Contributor

@bradenmacdonald bradenmacdonald left a comment

Choose a reason for hiding this comment

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

Looks good and seems to work well, thanks! Tested with openedx/openedx-platform#36553

I just pushed one little comment-only documentation about Vertical: 6ac9094

@ChrisChV
Copy link
Contributor Author

Adds a new param showOnlyHomeTab in ComponentPicker to only show the home tab to avoid showing collections or components tabs in the unit picker.

Wouldn't we want to show only the "Units" tab instead of "Home"?

It's not a blocker, but I didn't get an answer to this question?

@bradenmacdonald Yes, it's possible, I'm on it, I'll have it ready in 10 minutes

@bradenmacdonald
Copy link
Contributor

@ChrisChV We can also do it in a follow-up PR if you want - this one is ready to merge and I'm about to merge the platform PR it needs :)

@ChrisChV
Copy link
Contributor Author

ChrisChV commented Apr 24, 2025

@ChrisChV We can also do it in a follow-up PR if you want - this one is ready to merge and I'm about to merge the platform PR it needs :)

@bradenmacdonald Sorry, I had it almost done :) It's on cc950a3, you can check it. It's a simple refactor

image

@ChrisChV ChrisChV force-pushed the chris/FAL-4070-add-unit-course branch from c41e4ea to cc950a3 Compare April 24, 2025 18:45
@bradenmacdonald
Copy link
Contributor

Nice, thanks @ChrisChV! 👍🏻

@bradenmacdonald bradenmacdonald merged commit d6b51ec into openedx:master Apr 24, 2025
7 checks passed
@github-project-automation github-project-automation bot moved this from In Eng Review to Done in Contributions Apr 24, 2025
@bradenmacdonald bradenmacdonald deleted the chris/FAL-4070-add-unit-course branch April 24, 2025 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FC Relates to an Axim Funded Contribution project open-source-contribution PR author is not from Axim or 2U

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants