From f78ec8283ce514110bd4c2918410ac1d5c3e08de Mon Sep 17 00:00:00 2001 From: Jacob Pierce Date: Wed, 23 Oct 2024 16:19:20 -0700 Subject: [PATCH 01/28] conditionalize SearchFiltersPanel's mode of display: accordion or not --- .../kolibri-common/components/SearchBox.vue | 5 +- .../AccordionSelectGroup.vue | 327 ++++++++++++++++++ .../components/SearchFiltersPanel/index.vue | 300 +++++++++++----- 3 files changed, 544 insertions(+), 88 deletions(-) create mode 100644 packages/kolibri-common/components/SearchFiltersPanel/AccordionSelectGroup.vue diff --git a/packages/kolibri-common/components/SearchBox.vue b/packages/kolibri-common/components/SearchBox.vue index 7b3cefbde9..b0d2297d02 100644 --- a/packages/kolibri-common/components/SearchBox.vue +++ b/packages/kolibri-common/components/SearchBox.vue @@ -25,7 +25,7 @@ class="search-input" :class="$computedClass(searchInputStyle)" dir="auto" - :placeholder="coreString(placeholder)" + :placeholder="placeholder" >
import commonCoreStrings from 'kolibri.coreVue.mixins.commonCoreStrings'; + import coreString from 'kolibri.utils.coreStrings'; export default { name: 'SearchBox', @@ -80,7 +81,7 @@ }, placeholder: { type: String, - default: 'searchLabel', + default: coreString.$tr('searchLabel'), }, value: { type: String, diff --git a/packages/kolibri-common/components/SearchFiltersPanel/AccordionSelectGroup.vue b/packages/kolibri-common/components/SearchFiltersPanel/AccordionSelectGroup.vue new file mode 100644 index 0000000000..e49b872036 --- /dev/null +++ b/packages/kolibri-common/components/SearchFiltersPanel/AccordionSelectGroup.vue @@ -0,0 +1,327 @@ + + + + + + + diff --git a/packages/kolibri-common/components/SearchFiltersPanel/index.vue b/packages/kolibri-common/components/SearchFiltersPanel/index.vue index 94e6fe83c1..7f174e3837 100644 --- a/packages/kolibri-common/components/SearchFiltersPanel/index.vue +++ b/packages/kolibri-common/components/SearchFiltersPanel/index.vue @@ -24,89 +24,165 @@ v-if="windowIsLarge || !currentCategory" :class="windowIsLarge ? '' : 'drawer-panel'" > - -

- {{ $tr('keywords') }} -

-
-

- {{ $tr('categories') }} -

- -
- + +

+ {{ $tr('keywords') }} +

+ -
-
- + {{ $tr('categories') }} + + +
+ +
+
+ +
+ + + +
+

+ {{ coreString('showResources') }} +

+
+ +
+
-
- - - -
-

- {{ coreString('showResources') }} -

-
- + +

+ {{ $tr('keywords') }} +

+ + + + + + + + + + +
@@ -127,14 +203,16 @@ diff --git a/packages/kolibri-common/components/SearchFiltersPanel/index.vue b/packages/kolibri-common/components/SearchFiltersPanel/index.vue index 82bd62bf8f..9d4ad114dd 100644 --- a/packages/kolibri-common/components/SearchFiltersPanel/index.vue +++ b/packages/kolibri-common/components/SearchFiltersPanel/index.vue @@ -139,14 +139,24 @@
- + + > + + @@ -404,6 +414,10 @@ message: 'Categories', context: 'Section header label in the Library page sidebar.', }, + chooseACategory: { + message: 'Choose a category', + context: 'Title of the category selection window', + }, }, }; From 1121761c67876e6397cc650af6c22b24e450cdc7 Mon Sep 17 00:00:00 2001 From: Jacob Pierce Date: Mon, 11 Nov 2024 13:00:00 -0800 Subject: [PATCH 16/28] toggle uncategorized button --- .../SearchFiltersPanel/AccordionSelectGroup.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/kolibri-common/components/SearchFiltersPanel/AccordionSelectGroup.vue b/packages/kolibri-common/components/SearchFiltersPanel/AccordionSelectGroup.vue index 84335a6518..89712859c7 100644 --- a/packages/kolibri-common/components/SearchFiltersPanel/AccordionSelectGroup.vue +++ b/packages/kolibri-common/components/SearchFiltersPanel/AccordionSelectGroup.vue @@ -400,7 +400,14 @@ }, methods: { noCategories() { - this.$emit('input', { ...this.value, categories: { [NoCategories]: true } }); + if (this.isCategoryActive(NoCategories)) { + // NoCategories is it's own key for the "Uncategorized" category + const categories = this.value.categories; + delete categories[NoCategories]; + this.$emit('input', { ...this.value, categories }); + } else { + this.$emit('input', { ...this.value, categories: { [NoCategories]: true } }); + } }, anySelectedFor(inputKey, values) { return values.some(value => this.isSelected(inputKey, value)); From 20602601b06e1c65059467b45ff38a8a09fb1cf5 Mon Sep 17 00:00:00 2001 From: Jacob Pierce Date: Mon, 11 Nov 2024 13:28:41 -0800 Subject: [PATCH 17/28] add hacky all_channels option --- .../AccordionSelectGroup.vue | 41 ++++++++++++++++--- 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/packages/kolibri-common/components/SearchFiltersPanel/AccordionSelectGroup.vue b/packages/kolibri-common/components/SearchFiltersPanel/AccordionSelectGroup.vue index 89712859c7..9c941f4c55 100644 --- a/packages/kolibri-common/components/SearchFiltersPanel/AccordionSelectGroup.vue +++ b/packages/kolibri-common/components/SearchFiltersPanel/AccordionSelectGroup.vue @@ -122,7 +122,9 @@ > @@ -228,7 +230,11 @@ searchableLabels, activeSearchTerms, } = injectBaseSearch(); + + const ALL_CHANNELS = 'ALL_CHANNELS'; + return { + ALL_CHANNELS, availableResourcesNeeded, activeSearchTerms, availableGradeLevels, @@ -352,11 +358,17 @@ return this.contentLevelOptions.filter(c => !c.disabled); }, channelOptionsList() { - return this.availableChannels.map(channel => ({ + const allChannels = { + value: this.ALL_CHANNELS, + disabled: false, + label: this.$tr('allChannels'), + }; + const options = this.availableChannels.map(channel => ({ value: channel.id, disabled: this.searchableLabels && !this.searchableLabels.channels.includes(channel.id), label: channel.name, })); + return [allChannels, ...options]; }, enabledChannelOptions() { return this.channelOptionsList.filter(c => !c.disabled); @@ -425,9 +437,22 @@ handleChange(field, value) { const prevFieldValue = this.value[field]; if (field === 'channels') { - // Channels are a radio button, so only when the user selects a new value - // will we emit the change - if (!prevFieldValue[value.value]) { + if (value.value === this.ALL_CHANNELS) { + // TODO This is a sort of hack-in-place as there is no handled option for "all channels" + // useBaseSearch basically treats "no channels selected" as "search all channels" - + // which works great in a non-radio-button context but it's wonky UX for a radio button + // This will be hashed out with Jessica et al + + // The user selected ALL_CHANNELS but we don't want to emit it to search it + // so we just disable the active one, which lets this component default to showing + // ALL_CHANNELS is selected + this.$emit('input', { + ...this.value, + [field]: { [prevFieldValue.value]: false }, + }); + } else if (!prevFieldValue[value.value]) { + // Channels are a radio button, so only when the user selects a new value + // will we emit the change this.$emit('input', { ...this.value, [field]: { [value.value]: true }, @@ -460,6 +485,10 @@ context: 'When user can select the categories, this is the header for the categories section', }, + allChannels: { + message: 'All channels', + context: 'A label for an option to see items from all channels', + }, }, }; From 13f4ecd63c89bf48bd7395af5bdbaebbd76b15c3 Mon Sep 17 00:00:00 2001 From: Jacob Pierce Date: Mon, 11 Nov 2024 13:38:49 -0800 Subject: [PATCH 18/28] just emit empty object for all channels selection --- .../components/SearchFiltersPanel/AccordionSelectGroup.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kolibri-common/components/SearchFiltersPanel/AccordionSelectGroup.vue b/packages/kolibri-common/components/SearchFiltersPanel/AccordionSelectGroup.vue index 9c941f4c55..dc37c96b17 100644 --- a/packages/kolibri-common/components/SearchFiltersPanel/AccordionSelectGroup.vue +++ b/packages/kolibri-common/components/SearchFiltersPanel/AccordionSelectGroup.vue @@ -448,7 +448,7 @@ // ALL_CHANNELS is selected this.$emit('input', { ...this.value, - [field]: { [prevFieldValue.value]: false }, + [field]: {}, }); } else if (!prevFieldValue[value.value]) { // Channels are a radio button, so only when the user selects a new value From d2a2b8221e50ee8d4329e23ec1c6457e85508e68 Mon Sep 17 00:00:00 2001 From: Jacob Pierce Date: Mon, 11 Nov 2024 16:32:07 -0800 Subject: [PATCH 19/28] remove channels option from searchfilterspanel accordion display --- .../AccordionSelectGroup.vue | 99 ++----------------- 1 file changed, 7 insertions(+), 92 deletions(-) diff --git a/packages/kolibri-common/components/SearchFiltersPanel/AccordionSelectGroup.vue b/packages/kolibri-common/components/SearchFiltersPanel/AccordionSelectGroup.vue index dc37c96b17..c6504c173e 100644 --- a/packages/kolibri-common/components/SearchFiltersPanel/AccordionSelectGroup.vue +++ b/packages/kolibri-common/components/SearchFiltersPanel/AccordionSelectGroup.vue @@ -116,35 +116,6 @@ - - - - - - !c.disabled); }, - channelOptionsList() { - const allChannels = { - value: this.ALL_CHANNELS, - disabled: false, - label: this.$tr('allChannels'), - }; - const options = this.availableChannels.map(channel => ({ - value: channel.id, - disabled: this.searchableLabels && !this.searchableLabels.channels.includes(channel.id), - label: channel.name, - })); - return [allChannels, ...options]; - }, - enabledChannelOptions() { - return this.channelOptionsList.filter(c => !c.disabled); - }, langId() { return Object.keys(this.value.languages)[0]; }, @@ -400,9 +346,6 @@ } return this.contentLevelOptions.find(o => o.value === this.levelId) || {}; }, - channelId() { - return Object.keys(this.value.channels)[0]; - }, selectedChannel() { if (!this.channelId && this.enabledChannelOptions.length === 1) { return this.enabledChannelOptions[0]; @@ -436,38 +379,14 @@ }, handleChange(field, value) { const prevFieldValue = this.value[field]; - if (field === 'channels') { - if (value.value === this.ALL_CHANNELS) { - // TODO This is a sort of hack-in-place as there is no handled option for "all channels" - // useBaseSearch basically treats "no channels selected" as "search all channels" - - // which works great in a non-radio-button context but it's wonky UX for a radio button - // This will be hashed out with Jessica et al - - // The user selected ALL_CHANNELS but we don't want to emit it to search it - // so we just disable the active one, which lets this component default to showing - // ALL_CHANNELS is selected - this.$emit('input', { - ...this.value, - [field]: {}, - }); - } else if (!prevFieldValue[value.value]) { - // Channels are a radio button, so only when the user selects a new value - // will we emit the change - this.$emit('input', { - ...this.value, - [field]: { [value.value]: true }, - }); - } + if (value && this.isSelected(field, value)) { + delete prevFieldValue[value.value]; + this.$emit('input', { ...this.value, [field]: prevFieldValue }); } else { - if (value && this.isSelected(field, value)) { - delete prevFieldValue[value.value]; - this.$emit('input', { ...this.value, [field]: prevFieldValue }); - } else { - this.$emit('input', { - ...this.value, - [field]: { ...prevFieldValue, [value.value]: true }, - }); - } + this.$emit('input', { + ...this.value, + [field]: { ...prevFieldValue, [value.value]: true }, + }); } }, isCategoryActive(categoryValue) { @@ -485,10 +404,6 @@ context: 'When user can select the categories, this is the header for the categories section', }, - allChannels: { - message: 'All channels', - context: 'A label for an option to see items from all channels', - }, }, }; From 8b94f83a12b7d2bd74b959d18c101a504f151561 Mon Sep 17 00:00:00 2001 From: Jacob Pierce Date: Tue, 12 Nov 2024 11:30:38 -0800 Subject: [PATCH 20/28] remove channels from all SearchFiltersPanel --- .../SearchFiltersPanel/SelectGroup.vue | 37 ------------------- 1 file changed, 37 deletions(-) diff --git a/packages/kolibri-common/components/SearchFiltersPanel/SelectGroup.vue b/packages/kolibri-common/components/SearchFiltersPanel/SelectGroup.vue index 419bc994fd..2c171f020c 100644 --- a/packages/kolibri-common/components/SearchFiltersPanel/SelectGroup.vue +++ b/packages/kolibri-common/components/SearchFiltersPanel/SelectGroup.vue @@ -24,18 +24,6 @@ :style="selectorStyle" @change="val => handleChange('grade_levels', val)" /> - Object.prototype.hasOwnProperty.call(value, k)); }, }, - showChannels: { - type: Boolean, - default: true, - }, }, computed: { selectorStyle() { @@ -151,16 +133,6 @@ enabledContentLevels() { return this.contentLevelsList.filter(c => !c.disabled); }, - channelOptionsList() { - return this.availableChannels.map(channel => ({ - value: channel.id, - disabled: this.searchableLabels && !this.searchableLabels.channels.includes(channel.id), - label: channel.name, - })); - }, - enabledChannelOptions() { - return this.channelOptionsList.filter(c => !c.disabled); - }, langId() { return Object.keys(this.value.languages)[0]; }, @@ -188,15 +160,6 @@ } return this.contentLevelsList.find(o => o.value === this.levelId) || {}; }, - channelId() { - return Object.keys(this.value.channels)[0]; - }, - selectedChannel() { - if (!this.channelId && this.enabledChannelOptions.length === 1) { - return this.enabledChannelOptions[0]; - } - return this.channelOptionsList.find(o => o.value === this.channelId) || {}; - }, }, methods: { handleChange(field, value) { From 73b85ec8d75d20cdbc4b70ab1dcb48d4a10ad4ab Mon Sep 17 00:00:00 2001 From: Jacob Pierce Date: Tue, 12 Nov 2024 14:07:34 -0800 Subject: [PATCH 21/28] fix tests to accomodate new SearchFiltersPanel usage in LibraryPage --- kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue | 2 +- kolibri/plugins/learn/assets/test/views/library-page.spec.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue b/kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue index 9b0b18ef41..3491716153 100644 --- a/kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue +++ b/kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue @@ -119,7 +119,7 @@ ref="sidePanel" v-model="searchTerms" :class="windowIsLarge ? 'side-panel' : ''" - data-test="side-panel" + data-test="side-panel-local" :width="`${sidePanelWidth}px`" /> diff --git a/kolibri/plugins/learn/assets/test/views/library-page.spec.js b/kolibri/plugins/learn/assets/test/views/library-page.spec.js index b16aabc082..f4a9b76d2d 100644 --- a/kolibri/plugins/learn/assets/test/views/library-page.spec.js +++ b/kolibri/plugins/learn/assets/test/views/library-page.spec.js @@ -140,7 +140,7 @@ describe('LibraryPage', () => { options: { stubs: ['SidePanelModal'] }, }); // not displayed by default - expect(wrapper.findComponent({ name: 'SearchFiltersPanel' }).element).toBeUndefined(); + expect(wrapper.find('[data-test="side-panel"]').element).toBeUndefined(); wrapper.find('[data-test="filter-button"]').trigger('click'); await wrapper.vm.$nextTick(); expect(wrapper.findComponent({ name: 'SearchFiltersPanel' }).element).toBeTruthy(); @@ -355,7 +355,7 @@ describe('LibraryPage', () => { windowIsLarge: true, })); const wrapper = await makeWrapper(); - expect(wrapper.find('[data-test="side-panel"').element).toBeTruthy(); + expect(wrapper.find('[data-test="side-panel-local"').element).toBeTruthy(); }); }); From dc86215dc24223141f1be314df456a3669ec2b18 Mon Sep 17 00:00:00 2001 From: Jacob Pierce Date: Tue, 12 Nov 2024 14:08:28 -0800 Subject: [PATCH 22/28] cannot call coreString in component definition, default placehodler to null --- packages/kolibri-common/components/SearchBox.vue | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/kolibri-common/components/SearchBox.vue b/packages/kolibri-common/components/SearchBox.vue index b0d2297d02..ede7f3f5f9 100644 --- a/packages/kolibri-common/components/SearchBox.vue +++ b/packages/kolibri-common/components/SearchBox.vue @@ -25,7 +25,7 @@ class="search-input" :class="$computedClass(searchInputStyle)" dir="auto" - :placeholder="placeholder" + :placeholder="placeholder || coreString('searchLabel')" >
import commonCoreStrings from 'kolibri.coreVue.mixins.commonCoreStrings'; - import coreString from 'kolibri.utils.coreStrings'; export default { name: 'SearchBox', @@ -81,7 +80,7 @@ }, placeholder: { type: String, - default: coreString.$tr('searchLabel'), + default: null, }, value: { type: String, From c1fc9177a62936b9f140b7547a238765b1e7c30b Mon Sep 17 00:00:00 2001 From: Jacob Pierce Date: Wed, 13 Nov 2024 14:19:04 -0800 Subject: [PATCH 23/28] side panel conditionals set correctly in LibraryPage --- .../assets/src/views/LibraryPage/index.vue | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue b/kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue index 3491716153..9061d26ec9 100644 --- a/kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue +++ b/kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue @@ -102,27 +102,30 @@ - +
- +
-
+ -
+
Date: Wed, 13 Nov 2024 14:19:39 -0800 Subject: [PATCH 24/28] side panel conditionals set correctly in LibraryPage pt2 --- kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue | 2 -- 1 file changed, 2 deletions(-) diff --git a/kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue b/kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue index 9061d26ec9..37d9fc6266 100644 --- a/kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue +++ b/kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue @@ -104,7 +104,6 @@
Date: Wed, 13 Nov 2024 14:28:58 -0800 Subject: [PATCH 25/28] ensure we unset the sidepanelisopen var when screensize changes --- .../plugins/learn/assets/src/views/LibraryPage/index.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue b/kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue index 37d9fc6266..d3406b4d0f 100644 --- a/kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue +++ b/kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue @@ -515,6 +515,14 @@ searchTerms() { this.mobileSidePanelIsOpen = false; }, + windowIsLarge(newVal) { + // Be sure we set the side panel closed if the screen size changes + // otherwise the watcher on mobileSidePanelIsOpen will leave the + // document stuck in `position: fixed;` so we won't see the scrollbar + if (newVal) { + this.mobileSidePanelIsOpen = false; + } + }, mobileSidePanelIsOpen() { if (this.mobileSidePanelIsOpen) { document.documentElement.style.position = 'fixed'; From d3ad0f9f132e5d0e225ca77f2d5f4a67b347111d Mon Sep 17 00:00:00 2001 From: Jacob Pierce Date: Thu, 14 Nov 2024 09:23:38 -0800 Subject: [PATCH 26/28] remove testing-only search button; hide activities in coach --- .../CreateExamPage/ResourceSelection.vue | 24 +------------------ 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/kolibri/plugins/coach/assets/src/views/quizzes/CreateExamPage/ResourceSelection.vue b/kolibri/plugins/coach/assets/src/views/quizzes/CreateExamPage/ResourceSelection.vue index dc9f3e6638..6acb17cce1 100644 --- a/kolibri/plugins/coach/assets/src/views/quizzes/CreateExamPage/ResourceSelection.vue +++ b/kolibri/plugins/coach/assets/src/views/quizzes/CreateExamPage/ResourceSelection.vue @@ -97,12 +97,6 @@ :topicsLink="topicsLink" /> - -
@@ -227,7 +221,6 @@ import BookmarkIcon from '../../lessons/LessonResourceSelectionPage/LessonContentCard/BookmarkIcon.vue'; import useQuizResources from '../../../composables/useQuizResources'; import { injectQuizCreation } from '../../../composables/useQuizCreation'; - import LessonsSearchBox from '../../lessons/LessonResourceSelectionPage/SearchTools/LessonsSearchBox.vue'; import ContentCardList from '../../lessons/LessonResourceSelectionPage/ContentCardList.vue'; import ResourceSelectionBreadcrumbs from '../../lessons/LessonResourceSelectionPage/SearchTools/ResourceSelectionBreadcrumbs.vue'; @@ -237,7 +230,6 @@ SearchFiltersPanel, ContentCardList, BookmarkIcon, - LessonsSearchBox, ResourceSelectionBreadcrumbs, }, mixins: [commonCoreStrings], @@ -930,20 +922,6 @@ count, }); }, - handleSearchTermChange(searchTerm) { - const query = { - ...this.$route.query, - search: searchTerm, - }; - this.$router.push({ query }); - }, - clearSearchTerm() { - const query = { - ...this.$route.query, - }; - delete query.search; - this.$router.push({ query }); - }, }, }; From 51f196ccd88dbda97cf3445f7b160943bb2f05e2 Mon Sep 17 00:00:00 2001 From: Jacob Pierce Date: Thu, 14 Nov 2024 13:07:09 -0800 Subject: [PATCH 27/28] pass topic ref as descendant when init'ing useBaseSearch in resourceselection; search unconditionally --- .../views/quizzes/CreateExamPage/ResourceSelection.vue | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/kolibri/plugins/coach/assets/src/views/quizzes/CreateExamPage/ResourceSelection.vue b/kolibri/plugins/coach/assets/src/views/quizzes/CreateExamPage/ResourceSelection.vue index 6acb17cce1..fcb6d40278 100644 --- a/kolibri/plugins/coach/assets/src/views/quizzes/CreateExamPage/ResourceSelection.vue +++ b/kolibri/plugins/coach/assets/src/views/quizzes/CreateExamPage/ResourceSelection.vue @@ -203,7 +203,6 @@ import get from 'lodash/get'; import uniqWith from 'lodash/uniqWith'; import isEqual from 'lodash/isEqual'; - import flatMap from 'lodash/flatMap'; import { useMemoize } from '@vueuse/core'; import { displaySectionTitle, @@ -234,11 +233,6 @@ }, mixins: [commonCoreStrings], setup(props, context) { - const { searchTerms, search } = useBaseSearch({}); - // Search if we already have search terms when we load up - if (flatMap(searchTerms.value, term => Object.keys(term)).length) { - search(); - } const store = getCurrentInstance().proxy.$store; const route = computed(() => store.state.route); const topicId = computed(() => route.value.params.topic_id); @@ -496,6 +490,9 @@ loadingMore, } = useQuizResources({ topicId, practiceQuiz: selectPracticeQuiz.value }); + const { searchTerms, search } = useBaseSearch({ descendant: topic }); + search(); + const _loading = ref(true); const channels = ref([]); From d16bebfb808be1deb1067cd83c8845b222b69427 Mon Sep 17 00:00:00 2001 From: Jacob Pierce Date: Thu, 14 Nov 2024 13:09:03 -0800 Subject: [PATCH 28/28] call search in setup, not created, in LibraryPage --- kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue b/kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue index d3406b4d0f..fde3bd3dd7 100644 --- a/kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue +++ b/kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue @@ -263,6 +263,7 @@ setCategory, currentRoute, } = useSearch(); + search(); const { resumableContentNodes, moreResumableContentNodes, @@ -534,7 +535,6 @@ created() { const welcomeDismissalKey = 'DEVICE_WELCOME_MODAL_DISMISSED'; - this.search(); if (window.sessionStorage.getItem(welcomeDismissalKey) !== 'true') { this.$store.commit('SET_WELCOME_MODAL_VISIBLE', true); }