Skip to content

Conversation

@navinkarkera
Copy link
Contributor

@navinkarkera navinkarkera commented Mar 18, 2025

It allows us to track components that were created independently and components that were created under a container like unit or subsection.

Related to: #284

Private-ref: FAL-4107

Test instructions:

  • Read code and make sure tests are passing
  • You can verify the new field by checking this PR out and running tutor images build openedx-dev && tutor dev launch -I --skip-build
  • Include "openedx_learning.apps.authoring.units" in INSTALLED_APPS in both cms/envs/common.py and lms/envs/common.py files.
  • Open studio admin and check publishable entity table.

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

openedx-webhooks commented Mar 18, 2025

Thanks for the pull request, @navinkarkera!

This repository is currently maintained by @axim-engineering.

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.

@github-project-automation github-project-automation bot moved this to Needs Triage in Contributions Mar 18, 2025
@navinkarkera navinkarkera marked this pull request as ready for review March 18, 2025 14:28
@navinkarkera
Copy link
Contributor Author

This PR simply adds can_stand_alone flag to publishable entity. The actual implementation of using this flag to distinguish components will be part of openedx/frontend-app-authoring#1706

@navinkarkera navinkarkera force-pushed the navin/fal-4107/stand-alone-flag branch from e02cad8 to 35b338a Compare March 18, 2025 14:46
It allows us to track components that were created independently and
components that were created under a container like unit or subsection.
@navinkarkera navinkarkera force-pushed the navin/fal-4107/stand-alone-flag branch from 35b338a to b68d8ea Compare March 18, 2025 14:53
Copy link
Contributor

@rpenido rpenido left a comment

Choose a reason for hiding this comment

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

LGTM 👍
Thank you for your work, @navinkarkera!

  • I tested this using the instructions from the PR
  • I read through the code
  • I checked for accessibility issues
  • Includes documentation

Should we also bump the version here, or should we wait for more changes since it is not being used yet?

@ChrisChV
Copy link
Contributor

Should we also bump the version here, or should we wait for more changes since it is not being used yet?

Maybe we can bump the version together with #287. CC @pomegranited

null=True,
blank=True,
)
can_stand_alone = models.BooleanField(default=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

@navinkarkera I think we need to add a comment to explain this field. What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes please -- could you put it in the field help_text so it's visible in Django Admin too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

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.

Requested some more documentation on this new field, but the code is working as expected. Thank you @navinkarkera !

@ormsbee could you take a look to make sure this came through as intended? I admit I don't really understand the use case for this field, so want to make sure we're doing what is needed.

null=True,
blank=True,
)
can_stand_alone = models.BooleanField(default=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

Yes please -- could you put it in the field help_text so it's visible in Django Admin too?

@navinkarkera navinkarkera changed the title feat: add can_stand_alone flag to publishable entity feat: add can_stand_alone flag to publishable entity [FC-0083] Mar 19, 2025
@mphilbrick211 mphilbrick211 added the FC Relates to an Axim Funded Contribution project label Mar 19, 2025
@mphilbrick211 mphilbrick211 moved this from Needs Triage to In Eng Review in Contributions Mar 19, 2025
@rpenido
Copy link
Contributor

rpenido commented Mar 19, 2025

I admit I don't really understand the use case for this field, so want to make sure we're doing what is needed.

Reading the Slack thread took me a while, so I want to summarize and check if my understanding is correct. 😬

For Containers (different from Collections), we can create an Item inside it that is not used anywhere else. So, if we delete the container, we will probably also want to remove these items.
We can also have some items created originally in the library and added later to the container, which we won't want to remove if we delete it.
The can_stand_alone field should be set on creation to reflect that.

@ormsbee
Copy link
Contributor

ormsbee commented Mar 19, 2025

To clarify, the current product stance (at least for the Teak timeline) is that deleting a container never deletes its children. There is a concern that even if it seems more intuitive in certain situations, it will add too much user-side complexity. This will be reevaluated after some user testing. On the technical side, we're just recording this so that we have the necessary model data stored to make this distinction later if it becomes relevant.

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.

👍 Perfect, thank you @navinkarkera

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

@pomegranited pomegranited merged commit 0c72e8e into openedx:main Mar 19, 2025
9 checks passed
@github-project-automation github-project-automation bot moved this from In Eng Review to Done in Contributions Mar 19, 2025
@pomegranited pomegranited deleted the navin/fal-4107/stand-alone-flag branch March 19, 2025 19:34
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.

7 participants