Skip to content
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

feat: Add tags count for v2 library components #33979

Conversation

yusuf-musleh
Copy link
Member

Description

Includes content tags counts (including implicit) for Library V2 components in their metadata response.

Supporting information

Related Tickets:

Testing instructions

Follow the testing instructions on openedx-unsupported/frontend-app-library-authoring#400, specifically make sure the tags counts appear correctly.


Private-ref: FAL-3599

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Dec 28, 2023
@openedx-webhooks
Copy link

openedx-webhooks commented Dec 28, 2023

Thanks for the pull request, @yusuf-musleh! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

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 👍

Only a nit while replacing lib:

openedx/core/djangoapps/content_libraries/api.py Outdated Show resolved Hide resolved
@yusuf-musleh yusuf-musleh force-pushed the yusuf-musleh/get-library-components-tags-count branch from 3efde87 to 9766937 Compare December 31, 2023 15:01
@yusuf-musleh yusuf-musleh force-pushed the yusuf-musleh/get-library-components-tags-count branch 2 times, most recently from 49c6fa5 to 3dc1047 Compare January 8, 2024 08:01
@yusuf-musleh
Copy link
Member Author

@bradenmacdonald This is ready for CC review.

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 to me. Just need to wait for that version bump and then we can merge this.

"""
# Create a pattern to match the IDs of the library components, e.g. "lb:org:id*"
library_key_pattern = str(library_key).replace("lib:", "lb:", 1) + "*"
# TODO: add count_implicit=False when new tagging API version released
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't you mean count_implicit=True ?
I opened a version bump PR here: openedx/openedx-learning#140

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup, I've update the PR with the new openedx-learning version and added the count_implicit=True to it, working as expected now.

@yusuf-musleh yusuf-musleh force-pushed the yusuf-musleh/get-library-components-tags-count branch from 3dc1047 to 89a8be9 Compare January 9, 2024 14:33
@bradenmacdonald bradenmacdonald merged commit 8d2ddd7 into openedx:master Jan 9, 2024
64 checks passed
@bradenmacdonald bradenmacdonald deleted the yusuf-musleh/get-library-components-tags-count branch January 9, 2024 18:23
@openedx-webhooks
Copy link

@yusuf-musleh 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

1 similar comment
@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

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.

5 participants