[General guidance: Product issues should describe the feature, but are not actually technically specced for dev work.]
Overview
Following-up from #12759 - there is no longer a need for the ContentNode API to provide a list of labels for the channels as we have removed the ability to select a Channel to search by through the filters interface. The user's search will be filtered instead, automatically, by scoping to the channel (or topic) they're currently in.
Guidance
We need to be sure that the channel labels are still made available through the public API so that older Kolibris which do have the option to search by a particular Channel will not run into any issues.
For searching the user's local Kolibri, however, from here on the labels are unnecessary data and processing.
It could perhaps be as simple as adding a flag use_deprecated_channels_labels=False to that class, then handling the True case within the existing OptionalContentNodePagination class -- then subclassing it and setting that subclass's field to True to pass it into the public content node viewset's pagination_class field.
Acceptance criteria
[ ] Channel labels are no longer returned by the ContentNodeViewset API - specifically for the non-public API
[ ] The public API still provides the channel labels
[ ] You can navigate and search an 0.18.x Kolibri's library remotely from Kolibri 0.17.x and filter by Channels
[General guidance: Product issues should describe the feature, but are not actually technically specced for dev work.]
Overview
Following-up from #12759 - there is no longer a need for the ContentNode API to provide a list of labels for the channels as we have removed the ability to select a Channel to search by through the filters interface. The user's search will be filtered instead, automatically, by scoping to the channel (or topic) they're currently in.
Guidance
We need to be sure that the channel labels are still made available through the public API so that older Kolibris which do have the option to search by a particular Channel will not run into any issues.
For searching the user's local Kolibri, however, from here on the labels are unnecessary data and processing.
A good place to start might be:
https://github.com/learningequality/kolibri/blob/458bd6032e918f3b1405a40f83df5893fb7ffaaa/kolibri/core/content/utils/search.py#L140
and the
_get_available_channels
function there.Additionally, you'll see that the labels are generated in a method in the
OptionalContentNodePagination
class:https://github.com/learningequality/kolibri/blob/458bd6032e918f3b1405a40f83df5893fb7ffaaa/kolibri/core/content/api.py#L841
which is used both in the public and private APIs'
pagination_class
field.It could perhaps be as simple as adding a flag
use_deprecated_channels_labels=False
to that class, then handling theTrue
case within the existingOptionalContentNodePagination
class -- then subclassing it and setting that subclass's field toTrue
to pass it into the public content node viewset'spagination_class
field.Acceptance criteria