From 35d11a10184cc74e71e28425294c265bf43be12c Mon Sep 17 00:00:00 2001 From: Prashant-thakur77 Date: Sun, 9 Nov 2025 03:06:01 +0530 Subject: [PATCH 01/24] Basic addition to upate the side filter panel --- .../views/Channel/CatalogFilters.vue | 276 +++++++++++++----- 1 file changed, 201 insertions(+), 75 deletions(-) diff --git a/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilters.vue b/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilters.vue index f2e92dc894..8ce5ff8bcb 100644 --- a/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilters.vue +++ b/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilters.vue @@ -1,60 +1,127 @@ @@ -137,32 +199,41 @@ import { mapGetters } from 'vuex'; import debounce from 'lodash/debounce'; + import useKResponsiveWindow from 'kolibri-design-system/lib/composables/useKResponsiveWindow'; import { RouteNames } from '../../constants'; import CatalogFilterBar from './CatalogFilterBar'; import { catalogFilterMixin } from './mixins'; import LanguageFilter from './components/LanguageFilter'; import MultiSelect from 'shared/views/form/MultiSelect'; import { constantsTranslationMixin } from 'shared/mixins'; - import Checkbox from 'shared/views/form/Checkbox'; import HelpTooltip from 'shared/views/HelpTooltip'; import { ContentKindsNames } from 'shared/leUtils/ContentKinds'; + import SidePanelModal from 'shared/views/SidePanelModal'; + const excludedKinds = new Set([ContentKindsNames.TOPIC, ContentKindsNames.H5P]); export default { name: 'CatalogFilters', components: { LanguageFilter, - Checkbox, HelpTooltip, MultiSelect, CatalogFilterBar, + SidePanelModal, }, mixins: [constantsTranslationMixin, catalogFilterMixin], + setup() { + const { windowIsLarge } = useKResponsiveWindow(); + return { + windowIsLarge, + }; + }, data() { return { - drawer: false, + mobileSidePanelIsOpen: false, keywordInput: '', + leLogoSrc: require('shared/images/le-logo.svg'), }; }, computed: { @@ -176,9 +247,6 @@ faqLink() { return { name: RouteNames.CATALOG_FAQ }; }, - menuProps() { - return { offsetY: true, maxHeight: 270 }; - }, kindOptions() { return (window.publicKinds || []) .map(kind => { @@ -202,6 +270,24 @@ setKeywords() { return debounce(this.updateKeywords, 500); }, + // LE logo aspect ratio (90x60 = 3:2) + getLogoAspectRatio() { + return '3:2'; + }, + logoStyles() { + return { + width: '90px', + height: '60px', + margin: '0 auto 8px auto', + }; + }, + mobileLogoStyles() { + return { + width: '80px', + height: '53px', + margin: '0 auto 8px auto', + }; + }, }, watch: { keywords() { @@ -224,7 +310,7 @@ licenseLabel: 'Licenses', formatLabel: 'Formats', includesLabel: 'Display only channels with', - searchText: 'Search', + FilterText: 'Filter', coachDescription: 'Resources for coaches are only visible to coaches in Kolibri', frequentlyAskedQuestionsLink: 'Frequently asked questions', copyright: '© {year} Learning Equality', @@ -236,12 +322,40 @@ From f3b5c443d12e79a3bb8fa1361477f70ad8e5509b Mon Sep 17 00:00:00 2001 From: Prashant-thakur77 Date: Fri, 14 Nov 2025 11:05:28 +0530 Subject: [PATCH 02/24] added ktextbox --- .../views/Channel/CatalogFilters.vue | 268 +++++------------- 1 file changed, 69 insertions(+), 199 deletions(-) diff --git a/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilters.vue b/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilters.vue index 8ce5ff8bcb..a0bdc20bec 100644 --- a/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilters.vue +++ b/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilters.vue @@ -1,114 +1,40 @@ @@ -199,41 +133,32 @@ import { mapGetters } from 'vuex'; import debounce from 'lodash/debounce'; - import useKResponsiveWindow from 'kolibri-design-system/lib/composables/useKResponsiveWindow'; import { RouteNames } from '../../constants'; import CatalogFilterBar from './CatalogFilterBar'; import { catalogFilterMixin } from './mixins'; import LanguageFilter from './components/LanguageFilter'; import MultiSelect from 'shared/views/form/MultiSelect'; import { constantsTranslationMixin } from 'shared/mixins'; + import Checkbox from 'shared/views/form/Checkbox'; import HelpTooltip from 'shared/views/HelpTooltip'; import { ContentKindsNames } from 'shared/leUtils/ContentKinds'; - import SidePanelModal from 'shared/views/SidePanelModal'; - const excludedKinds = new Set([ContentKindsNames.TOPIC, ContentKindsNames.H5P]); export default { name: 'CatalogFilters', components: { LanguageFilter, + Checkbox, HelpTooltip, MultiSelect, CatalogFilterBar, - SidePanelModal, }, mixins: [constantsTranslationMixin, catalogFilterMixin], - setup() { - const { windowIsLarge } = useKResponsiveWindow(); - return { - windowIsLarge, - }; - }, data() { return { - mobileSidePanelIsOpen: false, + drawer: false, keywordInput: '', - leLogoSrc: require('shared/images/le-logo.svg'), }; }, computed: { @@ -247,6 +172,9 @@ faqLink() { return { name: RouteNames.CATALOG_FAQ }; }, + menuProps() { + return { offsetY: true, maxHeight: 270 }; + }, kindOptions() { return (window.publicKinds || []) .map(kind => { @@ -270,24 +198,6 @@ setKeywords() { return debounce(this.updateKeywords, 500); }, - // LE logo aspect ratio (90x60 = 3:2) - getLogoAspectRatio() { - return '3:2'; - }, - logoStyles() { - return { - width: '90px', - height: '60px', - margin: '0 auto 8px auto', - }; - }, - mobileLogoStyles() { - return { - width: '80px', - height: '53px', - margin: '0 auto 8px auto', - }; - }, }, watch: { keywords() { @@ -310,7 +220,7 @@ licenseLabel: 'Licenses', formatLabel: 'Formats', includesLabel: 'Display only channels with', - FilterText: 'Filter', + searchText: 'Search', coachDescription: 'Resources for coaches are only visible to coaches in Kolibri', frequentlyAskedQuestionsLink: 'Frequently asked questions', copyright: '© {year} Learning Equality', @@ -322,40 +232,12 @@ From bc530691dd591bebb9c48f761c02fa091a76e0cc Mon Sep 17 00:00:00 2001 From: Prashant-thakur77 Date: Fri, 14 Nov 2025 12:20:06 +0530 Subject: [PATCH 03/24] added kimg --- .../channelList/views/Channel/CatalogFilters.vue | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilters.vue b/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilters.vue index a0bdc20bec..e49d0bc367 100644 --- a/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilters.vue +++ b/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilters.vue @@ -109,12 +109,17 @@ height="100" >
- Date: Fri, 14 Nov 2025 14:37:43 +0530 Subject: [PATCH 04/24] made new compnent --- .../channelList/views/Channel/CatalogList.vue | 72 +++++++++++++------ 1 file changed, 49 insertions(+), 23 deletions(-) diff --git a/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogList.vue b/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogList.vue index 00a741531d..a5345d482b 100644 --- a/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogList.vue +++ b/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogList.vue @@ -1,7 +1,7 @@ @@ -128,6 +129,7 @@ import isEqual from 'lodash/isEqual'; import sortBy from 'lodash/sortBy'; import union from 'lodash/union'; + import useKResponsiveWindow from 'kolibri-design-system/lib/composables/useKResponsiveWindow'; import { RouteNames } from '../../constants'; import CatalogFilters from './CatalogFilters'; import ChannelItem from './ChannelItem'; @@ -153,24 +155,19 @@ OfflineText, }, mixins: [channelExportMixin, constantsTranslationMixin], + setup() { + const { windowIsSmall } = useKResponsiveWindow(); + + return { + isMobile: windowIsSmall, + }; + }, data() { return { loading: true, loadError: false, selecting: false, - - /** - * jayoshih: router guard makes it difficult to track - * differences between previous query params and new - * query params, so just track it manually - */ previousQuery: this.$route.query, - - /** - * jayoshih: using excluded logic here instead of selected - * to account for selections across pages (some channels - * not in current page) - */ excluded: [], }; }, @@ -194,8 +191,8 @@ }, set(selected) { this.excluded = union( - this.excluded.filter(id => !selected.includes(id)), // Remove selected items - difference(this.page.results, selected), // Add non-selected items + this.excluded.filter(id => !selected.includes(id)), + difference(this.page.results, selected), ); }, }, @@ -206,8 +203,6 @@ return RouteNames.CATALOG_DETAILS; }, channels() { - // Sort again by the same ordering used on the backend - name. - // Have to do this because of how we are getting the object data via getChannels. return sortBy(this.getChannels(this.page.results), 'name'); }, selectedCount() { @@ -220,7 +215,6 @@ this.loading = true; this.debouncedSearch(); - // Reset selection mode if a filter is changed (ignore page) const ignoreDefaults = { page: 0 }; const toQuery = { ...to.query, ...ignoreDefaults }; const fromQuery = { ...this.previousQuery, ...ignoreDefaults }; @@ -288,7 +282,7 @@ cancelButton: 'Cancel', downloadButton: 'Download', downloadCSV: 'Download CSV', - downloadPDF: 'Download PDF', // Kevin demanded NO DOTS!!! + downloadPDF: 'Download PDF', downloadingMessage: 'Download started', channelSelectionCount: '{count, plural,\n =1 {# channel selected}\n other {# channels selected}}', @@ -301,9 +295,41 @@ From 15915ad6311d55a05bd0fcc2fce415a866260cee Mon Sep 17 00:00:00 2001 From: Prashant-thakur77 Date: Fri, 14 Nov 2025 14:38:01 +0530 Subject: [PATCH 05/24] made new compnent --- .../Channel/CatalogFilterPanelContent.vue | 248 ++++++++++++++++++ 1 file changed, 248 insertions(+) create mode 100644 contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilterPanelContent.vue diff --git a/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilterPanelContent.vue b/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilterPanelContent.vue new file mode 100644 index 0000000000..c3e840a0b3 --- /dev/null +++ b/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilterPanelContent.vue @@ -0,0 +1,248 @@ + + + + + + + From 0c08d8516a90fcf558260f6babb2e2ce08eacf2d Mon Sep 17 00:00:00 2001 From: Prashant-thakur77 Date: Fri, 14 Nov 2025 14:39:43 +0530 Subject: [PATCH 06/24] updated catalog filters --- .../views/Channel/CatalogFilters.vue | 312 ++++++------------ 1 file changed, 100 insertions(+), 212 deletions(-) diff --git a/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilters.vue b/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilters.vue index e49d0bc367..ed5735e0c2 100644 --- a/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilters.vue +++ b/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilters.vue @@ -1,134 +1,45 @@ @@ -136,99 +47,45 @@