Skip to content

Display Container Publish status and confirm before publish #2186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

pomegranited
Copy link
Contributor

@pomegranited pomegranited commented Jun 17, 2025

Description

Updates the Container sidebar to display:

  • A confirmation step before publishing the container.
  • Text + a full hierarchy to better demonstrate what will be published when the container is published.

Content Library Authors are affected by this change.

Supporting information

Part of:

Depends on:

Private-ref: FAL-4178

Screenshots

New Usage tab

Screenshot 2025-07-21 at 3 27 21 PM

New "Confirm Publish" area

Screenshot 2025-07-21 at 3 28 11 PM

Testing instructions

  1. Create a content library
  2. Add a section and view its Usage tab: should see the section by itself since it has no children yet.
  3. Repeat ^ for subsection, unit, and component.
  4. Add the subsection to the section: note that the Usage tab hierarchy updates to show the child. (see designs)
  5. Repeat ^ for subsection and unit.
  6. Add multiple children to the parent containers: check that the hierarchy shows a child count instead of their titles.
  7. Publish changes to each container type -- ensure the "confirm publish" step correctly reflects the container's hierarchy and the containers' publish status. (see designs)

Other notes

  1. More backend work is needed to publish containers properly: Publishing containers currently only publishes one level of children, and there's also work that needs to be done to propagating the published_date back up through the parent containers.
  2. I was unable to show the parent container name in the publish confirmation message.
  3. If the full hierarchy API is deemed to not be performant enough, commits 72cc747 + 6363d70 can be omitted.

Settings

EDX_PLATFORM_REPOSITORY: https://github.com/open-craft/edx-platform.git
EDX_PLATFORM_VERSION: chris/FAL-4180-sections-subsections-publish

OPENEDX_EXTRA_PIP_REQUIREMENTS:
- dnspython
- git+https://github.com/openedx/openedx-learning.git@refs/pull/333/head#egg=openedx-learning

@openedx-webhooks openedx-webhooks added open-source-contribution PR author is not from Axim or 2U core contributor PR author is a Core Contributor (who may or may not have write access to this repo). labels Jun 17, 2025
@openedx-webhooks
Copy link

openedx-webhooks commented Jun 17, 2025

Thanks for the pull request, @pomegranited!

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.

@pomegranited pomegranited force-pushed the jill/FAL-4178-publish-container branch from feafb0c to 1f096b7 Compare June 18, 2025 19:44
%draft-status {
background-color: #FDF3E9;
border-color: #F4B57B !important;
color: #00262B;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Probably, yes. Shouldn't already existing paragon tokens be preferred? or is it normal for designs to contain new colors that are configured afterwards as design tokens?

@pomegranited pomegranited force-pushed the jill/FAL-4178-publish-container branch from 8557399 to 7ab9e25 Compare June 19, 2025 18:24
Copy link

codecov bot commented Jun 19, 2025

Codecov Report

❌ Patch coverage is 97.26776% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.49%. Comparing base (be82e96) to head (301b2fe).

Files with missing lines Patch % Lines
...ibrary-authoring/containers/ContainerHierarchy.tsx 96.72% 2 Missing ⚠️
...ry-authoring/containers/ContainerPublishStatus.tsx 97.61% 2 Missing ⚠️
src/library-authoring/data/api.ts 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2186      +/-   ##
==========================================
+ Coverage   94.47%   94.49%   +0.01%     
==========================================
  Files        1169     1172       +3     
  Lines       25141    25307     +166     
  Branches     5376     5542     +166     
==========================================
+ Hits        23753    23914     +161     
- Misses       1323     1328       +5     
  Partials       65       65              

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

Had to convert generic/Loading.jsx to tsx to make this work.
@mphilbrick211 mphilbrick211 moved this from Needs Triage to Product Review in Contributions Jun 20, 2025
@mphilbrick211 mphilbrick211 moved this from Product Review to Waiting on Author in Contributions Jun 20, 2025
in "Confirm Publish" box.

Refactors the ContainerPublishStatus component to use the container
hierarchy API instead of the search engine.

Plus fixes some styles.
@pomegranited pomegranited marked this pull request as ready for review July 1, 2025 11:38
@pomegranited pomegranited requested a review from DanielVZ96 July 1, 2025 11:42
@pomegranited pomegranited added the create-sandbox open-craft-grove should create a sandbox environment from this PR label Jul 2, 2025
@open-craft-grove
Copy link

Sandbox deployment failed 💥
Please check the settings and requirements.
Retry deployment by pushing a new commit or updating the requirements/settings in the pull request's description.
📜 Failure Logs
ℹ️ Grove Config, Tutor Config, Tutor Requirements

Copy link
Contributor

@DanielVZ96 DanielVZ96 left a comment

Choose a reason for hiding this comment

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

Besides the already mentioned problem with only direct children being published, LGTM. I also left some comments but nothing critical.

%draft-status {
background-color: #FDF3E9;
border-color: #F4B57B !important;
color: #00262B;
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably, yes. Shouldn't already existing paragon tokens be preferred? or is it normal for designs to contain new colors that are configured afterwards as design tokens?

@open-craft-grove
Copy link

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@bradenmacdonald bradenmacdonald added the FC Relates to an Axim Funded Contribution project label Jul 8, 2025
@open-craft-grove
Copy link

Sandbox deployment failed 💥
Please check the settings and requirements.
Retry deployment by pushing a new commit or updating the requirements/settings in the pull request's description.
📜 Failure Logs
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@rpenido rpenido force-pushed the jill/FAL-4178-publish-container branch from e8ed50d to 299f37e Compare July 23, 2025 22:07
@open-craft-grove
Copy link

Sandbox deployment failed 💥
Please check the settings and requirements.
Retry deployment by pushing a new commit or updating the requirements/settings in the pull request's description.
📜 Failure Logs
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@open-craft-grove
Copy link

Sandbox deployment failed 💥
Please check the settings and requirements.
Retry deployment by pushing a new commit or updating the requirements/settings in the pull request's description.
📜 Failure Logs
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@open-craft-grove
Copy link

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

Copy link
Contributor

@ChrisChV ChrisChV 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! 👍

  • I tested this: I followed the testing instructions and I tested with different states
  • I read through the code and considered the security, stability and performance implications of the changes.
  • I tested that the UI can be used with a keyboard only (tab order, keyboard controls).
  • Includes tests for bugfixes and/or features added.
  • Includes documentation
  • Includes fixtures that create objects required for manual testing.

@rpenido rpenido force-pushed the jill/FAL-4178-publish-container branch from 73ebb24 to b235683 Compare August 15, 2025 13:29
@open-craft-grove
Copy link

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@open-craft-grove
Copy link

Sandbox deployment failed 💥
Please check the settings and requirements.
Retry deployment by pushing a new commit or updating the requirements/settings in the pull request's description.
📜 Failure Logs
ℹ️ Grove Config, Tutor Config, Tutor Requirements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core contributor PR author is a Core Contributor (who may or may not have write access to this repo). create-sandbox open-craft-grove should create a sandbox environment from this PR FC Relates to an Axim Funded Contribution project 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.

7 participants