From 23e49e68c7210b2abe1e381ddb799045a8a627fe Mon Sep 17 00:00:00 2001 From: Samson Akol Date: Thu, 29 Aug 2024 16:44:07 +0300 Subject: [PATCH 01/41] Adds translator object + strings for search recs feature --- .../strings/searchRecommendationsStrings.js | 152 ++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 contentcuration/contentcuration/frontend/shared/strings/searchRecommendationsStrings.js diff --git a/contentcuration/contentcuration/frontend/shared/strings/searchRecommendationsStrings.js b/contentcuration/contentcuration/frontend/shared/strings/searchRecommendationsStrings.js new file mode 100644 index 0000000000..d4c9ec4d09 --- /dev/null +++ b/contentcuration/contentcuration/frontend/shared/strings/searchRecommendationsStrings.js @@ -0,0 +1,152 @@ +import { createTranslator } from 'shared/i18n'; + +export const searchRecommendationsStrings = createTranslator('SearchRecommendationsStrings', { + aboutRecommendationsText: { + message: 'About Recommendations', + context: 'A title that introduces how the recommendation system works', + }, + aboutRecommendationsDescription: { + message: + 'Our recommendation system learns from the titles and descriptions of what you already have in your channel, and uses that to show you other potentially relevant resources across the Kolibri Library.\n\nInteracting with these recommendations, whether by using them or marking them as not relevant, will help us improve the quality of the recommendations you see.', + context: 'A description that explains how the recommendation system works', + }, + goToLocationText: { + message: 'Go to location', + context: 'A label for an action that takes the user to a specific location', + }, + resourcesMightBeRelevantTitle: { + message: "These resources might be relevant to '{ channelName }'", + context: + 'A title for a list of resources that might be relevant to the user for a currently viewed channel', + }, + viewMoreLink: { + message: 'View more', + context: 'A label for a link that takes the user to a page with more information', + }, + resourcesInChannelMightBeRelevantTitle: { + message: "These resources in { channelName } might be relevant to '{ topic }'", + context: + 'A title for a list of resources that might be relevant to the user for a currently viewed channel based on a specific topic', + }, + showOtherResourcesLink: { + message: 'Show other resources anyway', + context: 'A label for a link that shows the user other resources that might not be relevant', + }, + showOtherResourcesMessage: { + message: "We can show you other resources, but they might not be what you're looking for", + context: + 'A message that explains to the user that there are other resources available, but they might not be relevant to their search', + }, + tryAgainLink: { + message: 'Try again', + context: + 'A label for a link that allows the user to try loading recommended resources again after an error', + }, + problemShowingResourcesMessage: { + message: 'There was a problem showing these resources', + context: + 'A message that explains to the user that an error was encountered while loading recommended resources', + }, + noDirectMatchesMessage: { + message: + 'No direct matches found, but there are other resources that might be helpful for your curriculum', + context: + 'A message that explains to the user that there are no direct matches to their search, but there are other resources that might be helpful', + }, + showOtherRecommendationsLink: { + message: 'Show other recommendations', + context: 'A label for a link that shows the user other recommendations', + }, + markAsNotRelevantTooltip: { + message: 'Mark as not relevant', + context: 'A tooltip that explains to the user that they can mark a resource as not relevant', + }, + feedbackConfirmationMessage: { + message: 'Thank you! Your feedback will help us improve your recommendations', + context: 'A message that thanks the user for their feedback on the provided recommendations', + }, + giveFeedbackText: { + message: 'Give feedback', + context: 'A label that describes the act of providing feedback on a recommended resource', + }, + undoAction: { + message: 'Undo', + context: 'A label for an action that allows the user to undo a previous action', + }, + closeAction: { + message: 'Close', + context: 'A label for an action that closes a dialog or window', + }, + cancelAction: { + message: 'Cancel', + context: 'A label for an action that cancels a previous action', + }, + submitAction: { + message: 'Submit', + context: 'A label for an action that submits a request', + }, + feedbackSubmittedMessage: { + message: 'Feedback submitted', + context: "A message that confirms that the user's feedback has been submitted successfully", + }, + notRelevantAction: { + message: 'Not relevant', + context: 'A label for an action that marks a resource as not relevant', + }, + giveFeedbackDescription: { + message: + 'Help us understand why this resource is not relevant for you right now. Check all that apply:', + context: + 'A description that asks the user to provide feedback on why a resource is not relevant', + }, + notSuitableForCurriculumLabel: { + message: 'Not suitable for the curriculum I am using', + context: + "A label to a feedback option that explains that the resource is not suitable for the user's curriculum", + }, + notRelatedToSubjectLabel: { + message: 'Not related to the subject or knowledge area I am trying to find resources for', + context: + "A label to a feedback option that explains that the resource is not related to the user's subject or knowledge area", + }, + notSuitableForCulturalBackgroundLabel: { + message: 'Not suitable for the cultural backgrounds and experiences of learners', + context: + 'A label to a feedback option that explains that the resource is not suitable for the cultural backgrounds and experiences of learners', + }, + notSpecificLearningActivityLabel: { + message: + "Not the type of specific learning activity I'm looking for (e.g. reading text-based material, watching a video, interactive questions, etc.)", + context: + 'A label to a feedback option that explains that the resource is not the type of specific learning activity the user is looking for', + }, + tooAdvancedForLearnersLabel: { + message: "Too advanced for the knowledge level of learners I'm looking for", + context: + 'A label to a feedback option that explains that the resource is too advanced for the knowledge level of learners', + }, + tooBasicForLearnersLabel: { + message: "Too basic for the knowledge level of learners I'm looking for", + context: + 'A label to a feedback option that explains that the resource is too basic for the knowledge level of learners', + }, + resourceNotWellMadeLabel: { + message: "The resource doesn't look or sound well-made enough for use", + context: 'A label to a feedback option that explains that the resource is not well-made', + }, + alreadyUsedResourceLabel: { + message: 'I already used this resource in my channel', + context: + 'A label to a feedback option that explains that the user has already used the resource in their channel', + }, + otherLabel: { + message: 'Other', + context: + 'A label to a feedback option that explains that the resource is not relevant for another reason', + }, + enterFeedbackLabel: { + message: 'Enter your feedback', + context: + 'A label to an input that asks the user to enter their specific reason for marking a resource as not relevant', + }, +}); From 3e85347470822c4478af5a77bfd2e577326c692d Mon Sep 17 00:00:00 2001 From: Samson Akol Date: Thu, 29 Aug 2024 16:53:53 +0300 Subject: [PATCH 02/41] change SearchOrBrowserWindow from Vuetify to KDS components --- .../contentcuration/dev_settings.py | 2 +- .../views/ImportFromChannels/ChannelList.vue | 12 +- .../SearchOrBrowseWindow.vue | 132 ++++++++++-------- 3 files changed, 84 insertions(+), 62 deletions(-) diff --git a/contentcuration/contentcuration/dev_settings.py b/contentcuration/contentcuration/dev_settings.py index 439bdef8af..d81d23a993 100644 --- a/contentcuration/contentcuration/dev_settings.py +++ b/contentcuration/contentcuration/dev_settings.py @@ -5,4 +5,4 @@ ROOT_URLCONF = "contentcuration.dev_urls" -INSTALLED_APPS += ("drf_yasg", "automation") +INSTALLED_APPS += ("drf_yasg",) diff --git a/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/ChannelList.vue b/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/ChannelList.vue index 6741ffc6c2..cc12638065 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/ChannelList.vue +++ b/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/ChannelList.vue @@ -6,10 +6,10 @@ - + @@ -38,7 +38,7 @@ v-for="channel in channels" :key="channel.id" :channel="channel" - class="mb-3" + class="mb-3 mx-3" /> diff --git a/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/SearchOrBrowseWindow.vue b/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/SearchOrBrowseWindow.vue index 61fe498498..8f881b4101 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/SearchOrBrowseWindow.vue +++ b/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/SearchOrBrowseWindow.vue @@ -2,7 +2,7 @@ From fe76812f78143f5ea28b97ce4dbd3a9dba86f191 Mon Sep 17 00:00:00 2001 From: Samson Akol Date: Tue, 3 Sep 2024 18:26:04 +0300 Subject: [PATCH 03/41] add about recommendations link --- .../ImportFromChannelsModal.vue | 5 ++++- .../SearchOrBrowseWindow.vue | 19 ++++++++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/ImportFromChannelsModal.vue b/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/ImportFromChannelsModal.vue index e085b6fe7d..25e18174a0 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/ImportFromChannelsModal.vue +++ b/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/ImportFromChannelsModal.vue @@ -277,7 +277,10 @@ diff --git a/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/SearchOrBrowseWindow.vue b/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/SearchOrBrowseWindow.vue index 8f881b4101..e8259eedb3 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/SearchOrBrowseWindow.vue +++ b/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/SearchOrBrowseWindow.vue @@ -2,7 +2,7 @@