Skip to content

Conversation

@ChrisChV
Copy link
Contributor

@ChrisChV ChrisChV commented Apr 23, 2025

Description

  • Adds the sync button in unit cards in the course outline.
  • Opens the compare previews.
  • Functionality to sync units.
  • Functionality to decline sync units.
  • Which edX user roles will this change impact? "Course Author".

https://www.loom.com/share/70a14ccdb2ae487ea769be340d6ba845?sid=752e2e84-3553-4306-ad71-d21e40e4a682

Supporting information

Testing instructions

  • Go to the library home of a library
  • Create a unit
  • Create a component and add it to the unit
  • Publish the unit.
  • Use this branch: feat: Add unit from library in course [FC-0083] #1829 and follow the testing instructions to add the unit to a course.
  • On the library home, edit the unit title and add another component.
  • Publish the unit.
  • Return to the course outline (refresh the page) and verify that the sync button appears on the unit card.
  • Click on the sync button. Verify the compare previews modal.
  • Click on the Accept changes button.
  • Verify that the unit title has been changed and that the new components have been added. Also, verify that the sync button is gone.
  • On the library home, edit the unit title.
  • Publish the unit.
  • Return to the course outline (refresh the page) and click in the sync button.
  • Click on the Ignore changes button.
  • Verify that the sync button is gone and there are no changes in the unit

Other information

  • The "Preview not available" message has been added to the preview comparator. This will be addressed in a later task.

@openedx-webhooks
Copy link

openedx-webhooks commented Apr 23, 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 23, 2025
@github-project-automation github-project-automation bot moved this to Needs Triage in Contributions Apr 23, 2025
@ChrisChV ChrisChV marked this pull request as draft April 23, 2025 01:54
@mphilbrick211 mphilbrick211 moved this from Needs Triage to Waiting on Author in Contributions Apr 23, 2025
@codecov
Copy link

codecov bot commented Apr 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.77%. Comparing base (9824502) to head (c13806a).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1850      +/-   ##
==========================================
- Coverage   93.77%   93.77%   -0.01%     
==========================================
  Files        1146     1146              
  Lines       23881    23903      +22     
  Branches     5134     5042      -92     
==========================================
+ Hits        22394    22414      +20     
- Misses       1411     1421      +10     
+ Partials       76       68       -8     

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

@ChrisChV ChrisChV changed the title feat: Add sync button in unit in course feat: Add sync button in unit in course [FC-0083] Apr 23, 2025
@ChrisChV ChrisChV marked this pull request as ready for review April 23, 2025 20:17
@ChrisChV ChrisChV changed the title feat: Add sync button in unit in course [FC-0083] feat: Sync units in course outline [FC-0083] Apr 23, 2025
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 @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
  • User-facing strings are extracted for translation

@bradenmacdonald
Copy link
Contributor

@ChrisChV Can you please rebase this or update it with master?

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.

LGTM, and is working, though I couldn't test it with all the other changes that recently merged. Please rebase / merge master, then do a quick test of the functionality before you merge.

@ChrisChV
Copy link
Contributor Author

Sure

@ChrisChV
Copy link
Contributor Author

@bradenmacdonald I can confirm that it works! 🎉

@ChrisChV ChrisChV enabled auto-merge (squash) April 24, 2025 19:53
@bradenmacdonald
Copy link
Contributor

bradenmacdonald commented Apr 24, 2025

This doesn't make sense - the coverage of this PR is 100% but it's complaining that it reduces the project coverage?

Maybe rebase and squash?

Edit: Oh, it's because of "indirect changes" to src/import-page/data/thunks.js : https://app.codecov.io/gh/openedx/frontend-app-authoring/pull/1850/indirect-changes

@ChrisChV
Copy link
Contributor Author

This doesn't make sense - the coverage of this PR is 100% but it's complaining that it reduces the project coverage?

Maybe rebase and squash?

Yes, it has happened to me a few times, I'm going to do the rebase and squash

@ChrisChV ChrisChV force-pushed the chris/FAL-4075-sync-changes-unit branch from e4e4b66 to 8557ccb Compare April 24, 2025 20:05
@ChrisChV ChrisChV force-pushed the chris/FAL-4075-sync-changes-unit branch from 8557ccb to c13806a Compare April 24, 2025 20:08
@ChrisChV ChrisChV merged commit d62c4cf into openedx:master Apr 24, 2025
7 checks passed
@github-project-automation github-project-automation bot moved this from Waiting on Author to Done in Contributions Apr 24, 2025
@bradenmacdonald bradenmacdonald deleted the chris/FAL-4075-sync-changes-unit branch April 24, 2025 20:30
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

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants