fix: updated topic sorting for discussions MFE - #31124
Merged
Merged
Conversation
AhtishamShahid
force-pushed
the
ahtisham/fix-topics-sorting
branch
from
October 7, 2022 07:02
6fb6236 to
c919006
Compare
asadazam93
suggested changes
Oct 7, 2022
|
|
||
| return sorted(category_list, key=alphanum_key) | ||
|
|
||
| for category in sort_categories(xblocks_by_category.keys()): |
Contributor
There was a problem hiding this comment.
This will sort the topics in alphabetical order which is not required. The expectation is that the topics should have the same order as they have in the course which will not always be alphabetical.
Contributor
There was a problem hiding this comment.
Alpha numeric seems to be a better approach. Let put this on prod and see feedback.
asadazam93
approved these changes
Oct 11, 2022
saadyousafarbi
approved these changes
Oct 13, 2022
saadyousafarbi
left a comment
Contributor
There was a problem hiding this comment.
We might need more test cases for this, we can do that after rolling out and basing the test cases on feedback received!
Contributor
|
EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production. |
Contributor
|
EdX Release Notice: This PR has been deployed to the production environment. |
arbrandes
pushed a commit
that referenced
this pull request
Dec 8, 2022
* fix: updated topic sorting for discussions MFE * feat: updated topic sorting test case
awais786
pushed a commit
that referenced
this pull request
Jan 13, 2023
* fix: updated topic sorting for discussions MFE * feat: updated topic sorting test case
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Topics that have alphanumeric categories were being sorted in weird ways i.e
Created new key mapping that would sort it as expected
Like this :
## returns ['week 1', 'week 2', 'week 9', 'week 10']