-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
[FC-0059] feat: Add order
query param to lib v2 API
#35005
[FC-0059] feat: Add order
query param to lib v2 API
#35005
Conversation
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:
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. |
b4baee6
to
2198608
Compare
6e3c9a3
to
e3ef443
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yusuf-musleh This PR is working great as-is, but I've replied to your commend about evaluating the query string, and added a couple nits of my own. Feel free to push back, or I'm happy to re-review with changes.
👍
- I tested this on my tutor dev stack with [FC-0059] feat: Add filters/sorting for lib v2 tab frontend-app-authoring#1117
- I read through the code
-
I checked for accessibility issuesN/A - Includes documentation
-
User-facing strings are extracted for translationN/A
7e117e6
to
cfb9f55
Compare
9b56378
to
f400aa5
Compare
order
query param to lib v2 APIorder
query param to lib v2 API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @yusuf-musleh!
LGTM 👍 Great work! (Now in the right PR!)
- I tested this on my tutor dev stack using the testing instructions
- I read through the code
-
I checked for accessibility issues N/A - Includes documentation
@@ -115,6 +115,7 @@ class BaseFilterSerializer(serializers.Serializer): | |||
""" | |||
text_search = serializers.CharField(default=None, required=False) | |||
org = serializers.CharField(default=None, required=False) | |||
order = serializers.CharField(default=None, required=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer a default here (in the serializer/rest api level) so we always return a sorted list, but is up to you.
order = serializers.CharField(default=None, required=False) | |
order = serializers.CharField(default='title', required=False) |
@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. |
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
2U Release Notice: This PR has been deployed to the edX production environment. |
1 similar comment
2U Release Notice: This PR has been deployed to the edX production environment. |
Description
This PR adds the
order
query param to the/api/libraries/v2/
endpoint to specify the ordering of the queried content libraries.Supporting information
Related Tickets:
Testing instructions
Check that the tests cover the functionality and follow the testing instructions in openedx/frontend-app-authoring#1117
Private-ref: FAL-3752