Update sorting of channel items and fix erroneous use of sortBy#3592
Merged
rtibbles merged 3 commits intolearningequality:unstablefrom Aug 31, 2022
Merged
Update sorting of channel items and fix erroneous use of sortBy#3592rtibbles merged 3 commits intolearningequality:unstablefrom
sortBy#3592rtibbles merged 3 commits intolearningequality:unstablefrom
Conversation
This was referenced Sep 15, 2022
Merged
Member
|
@rtibbles do you think that this fix should be applied to the "Import from other channels" modal as well? |
Member
Author
|
I'll investigate to see how sorting is happening there - I did update all the code errors in this PR, but it might need another tweak there. |
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.
Summary
Description of the change(s) you made
sortBywas being used under the assumption that it could be passed field names prefixed with-to reverse the ordering. This is not the case.sortByto useorderBywith an additional array ofasc/descto specify the order of sorting.nameparameter.Manual verification steps performed
Checked sorting by
modifiedtime on My Channels page.Checked sorting on Catalog list page.
Screenshots (if applicable)
Update to my channels - all channels shown in descending order of last modified:

Update to catalog list - all channels now properly sorted by name when displayed:

References
Fixes #3559
Fixes #3294