Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
feb161b
Basic addition to upate the side filter panel
Prashant-thakur77 Nov 8, 2025
ec85dbf
added ktextbox
Prashant-thakur77 Nov 14, 2025
34a3df7
added kimg
Prashant-thakur77 Nov 14, 2025
071f76b
made new compnent
Prashant-thakur77 Nov 14, 2025
26078ad
made new compnent
Prashant-thakur77 Nov 14, 2025
859cf10
updated catalog filters
Prashant-thakur77 Nov 14, 2025
3b7c17b
updated catalog filters
Prashant-thakur77 Nov 14, 2025
2fb2ab6
updated catalog filters
Prashant-thakur77 Nov 14, 2025
21fb46b
updated catalog filters
Prashant-thakur77 Nov 14, 2025
02e4a04
updated styles
Prashant-thakur77 Nov 15, 2025
edfcaae
updated styles
Prashant-thakur77 Nov 15, 2025
be955d0
done
Prashant-thakur77 Nov 15, 2025
7a2d4df
done
Prashant-thakur77 Nov 16, 2025
8609fa4
updated styles
Prashant-thakur77 Nov 16, 2025
6bea53f
Preserved the rtl support
Prashant-thakur77 Nov 16, 2025
d96a45c
fine tuning styling
Prashant-thakur77 Nov 16, 2025
e5df775
added styles
Prashant-thakur77 Nov 16, 2025
70c0602
removed z-index
Prashant-thakur77 Nov 16, 2025
384d6e2
done
Prashant-thakur77 Nov 16, 2025
9e268c0
Scrolling fixes
Prashant-thakur77 Nov 16, 2025
d4c40f1
Updated tests
Prashant-thakur77 Nov 16, 2025
b22d91a
Preserved previous flat button
Prashant-thakur77 Nov 17, 2025
bc7bbfd
Made test file for catalogfilterpanelcontent
Prashant-thakur77 Nov 17, 2025
e7972e7
Updated padding
Prashant-thakur77 Nov 19, 2025
f9b1b3e
Updated search button to filter button
Prashant-thakur77 Nov 28, 2025
ae20ff8
Removed media query
Prashant-thakur77 Nov 28, 2025
b394c81
Updated styles
Prashant-thakur77 Nov 28, 2025
14cb9d1
Updated cataloglist
Prashant-thakur77 Dec 15, 2025
aaa0af7
Updat
Prashant-thakur77 Dec 15, 2025
4b5b17a
Updated
Prashant-thakur77 Dec 15, 2025
85c5d25
Updated
Prashant-thakur77 Dec 15, 2025
44e4bb5
removed rtl class
Prashant-thakur77 Dec 15, 2025
3e20e9f
Updated catalogfilter
Prashant-thakur77 Dec 15, 2025
5ed790e
removed full screen prop
Prashant-thakur77 Dec 15, 2025
aa9ea65
removed my comments
Prashant-thakur77 Dec 15, 2025
f1702f0
added the originam padding
Prashant-thakur77 Dec 15, 2025
b072fad
Updated catalogfilterpanelcontent
Prashant-thakur77 Dec 15, 2025
1fbba83
updated the height
Prashant-thakur77 Dec 15, 2025
e38fc96
updated the height
Prashant-thakur77 Dec 15, 2025
b894341
ISSUE resolved using fixed
Prashant-thakur77 Dec 15, 2025
18ab3e7
ISSUE resolved using vh
Prashant-thakur77 Dec 15, 2025
8763f63
updated
Prashant-thakur77 Dec 15, 2025
e4281ad
done
Prashant-thakur77 Dec 15, 2025
fb28b54
Updated the position of filterbar to match previous
Prashant-thakur77 Dec 16, 2025
779b45a
border color
Prashant-thakur77 Dec 16, 2025
848c798
border color
Prashant-thakur77 Dec 16, 2025
4fc67ab
border color
Prashant-thakur77 Dec 16, 2025
7afc976
Removed bottom border
Prashant-thakur77 Dec 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,233 +1,75 @@
<template>

<div>
<div class="catalog-filters-wrapper">
<KButton
v-if="$vuetify.breakpoint.xsOnly"
class="drawer-btn"
:text="$tr('searchText')"
:primary="true"
appearance="flat-button"
@click.stop="drawer = true"
v-if="windowIsSmall"
class="filter-button"
:text="$tr('filterText')"
appearance="raised-button"
icon="filter"
@click="openSidePanel"
/>
<CatalogFilterBar />
<VNavigationDrawer
v-model="drawer"
:permanent="$vuetify.breakpoint.smAndUp"
app
disable-route-watcher
:clipped="$vuetify.breakpoint.smAndUp"
:right="isRTL"
<aside
v-if="!windowIsSmall"
class="filter-panel"
:style="asideStyles"
>
<VContainer class="filters pa-3">
<VToolbar
v-if="$vuetify.breakpoint.xsOnly"
color="transparent"
flat
dense
>
<VSpacer />
<VBtn
icon
flat
style="text-align: right"
@click="drawer = false"
>
<Icon icon="clear" />
</VBtn>
</VToolbar>

<!-- Keyword search -->
<VTextField
v-model="keywordInput"
color="primary"
:label="$tr('searchLabel')"
box
clearable
data-test="keywords"
autofocus
@input="setKeywords"
/>

<!-- Language -->
<LanguageFilter
v-model="languages"
:menu-props="menuProps"
/>

<!-- License (attach to self to keep in notranslate class) -->
<MultiSelect
v-if="!libraryMode"
v-model="licenses"
:items="licenseOptions"
:label="$tr('licenseLabel')"
/>

<!-- Formats (attach to self to keep in notranslate class) -->
<MultiSelect
v-model="kinds"
:items="kindOptions"
:label="$tr('formatLabel')"
/>

<!-- Starred -->
<Checkbox
v-if="loggedIn"
v-model="bookmark"
:label="$tr('starredLabel')"
/>

<!-- Includes -->
<div class="subheading">
{{ $tr('includesLabel') }}
</div>

<div :style="{ display: 'flex', alignItems: 'center' }">
<Checkbox
v-model="coach"
aria-describedby="tooltip-coach"
:label="$tr('coachLabel')"
/>
<HelpTooltip
:text="$tr('coachDescription')"
maxWidth="250px"
tooltipId="tooltip-coach"
/>
</div>

<Checkbox
v-model="subtitles"
:label="$tr('subtitlesLabel')"
/>
<KRouterLink
class="qa-link"
:to="faqLink"
:text="$tr('frequentlyAskedQuestionsLink')"
appearance="basic-link"
iconAfter="openNewTab"
target="_blank"
/>
</VContainer>
<VFooter
class="pb-3 pt-2 px-4"
color="transparent"
height="100"
>
<div>
<VImg
height="60"
width="90"
class="mb-1 mr-2"
contain
:src="require('shared/images/le-logo.svg')"
/>
<KExternalLink
href="https://learningequality.org/"
:text="$tr('copyright', { year: new Date().getFullYear() })"
openInNewTab
/>
</div>
</VFooter>
</VNavigationDrawer>
<CatalogFilterPanelContent />
</aside>
<SidePanelModal
v-if="windowIsSmall && showSidePanel"
alignment="left"
@closePanel="closeSidePanel"
>
<CatalogFilterPanelContent />
</SidePanelModal>
</div>

</template>


<script>

import { mapGetters } from 'vuex';
import debounce from 'lodash/debounce';
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';

const excludedKinds = new Set([ContentKindsNames.TOPIC, ContentKindsNames.H5P]);
import useKResponsiveWindow from 'kolibri-design-system/lib/composables/useKResponsiveWindow';
import CatalogFilterPanelContent from './components/CatalogFilterPanelContent.vue';
import SidePanelModal from 'shared/views/SidePanelModal';

export default {
name: 'CatalogFilters',
components: {
LanguageFilter,
Checkbox,
HelpTooltip,
MultiSelect,
CatalogFilterBar,
CatalogFilterPanelContent,
SidePanelModal,
},
setup() {
const { windowIsSmall } = useKResponsiveWindow();

return {
windowIsSmall,
};
},
mixins: [constantsTranslationMixin, catalogFilterMixin],
data() {
return {
drawer: false,
keywordInput: '',
showSidePanel: false,
};
},
computed: {
...mapGetters(['loggedIn']),
isRTL() {
return window.isRTL;
},
libraryMode() {
return window.libraryMode;
},
faqLink() {
return { name: RouteNames.CATALOG_FAQ };
},
menuProps() {
return { offsetY: true, maxHeight: 270 };
},
kindOptions() {
return (window.publicKinds || [])
.map(kind => {
if (!excludedKinds.has(kind)) {
return {
value: kind,
text: this.translateConstant(kind),
};
}
})
.filter(Boolean);
},
licenseOptions() {
return (window.publicLicenses || []).map(id => {
return {
value: Number(id),
text: this.translateLicense(Number(id)),
};
});
},
setKeywords() {
return debounce(this.updateKeywords, 500);
asideStyles() {
return {
backgroundColor: this.$themeTokens.surface,
borderRight: `2px solid ${this.$themeTokens.fineLine}`,
};
},
},
watch: {
keywords() {
this.keywordInput = this.keywords;
},
},
beforeMount() {
this.keywordInput = this.$route.query.keywords;
},
methods: {
updateKeywords() {
this.keywords = this.keywordInput;
openSidePanel() {
this.showSidePanel = true;
},
closeSidePanel() {
this.showSidePanel = false;
},
},
$trs: {
searchLabel: 'Keywords',
coachLabel: 'Resources for coaches',
subtitlesLabel: 'Captions or subtitles',
starredLabel: 'Starred',
licenseLabel: 'Licenses',
formatLabel: 'Formats',
includesLabel: 'Display only channels with',
searchText: 'Search',
coachDescription: 'Resources for coaches are only visible to coaches in Kolibri',
frequentlyAskedQuestionsLink: 'Frequently asked questions',
copyright: '© {year} Learning Equality',
filterText: 'Filter',
},
};

Expand All @@ -236,33 +78,18 @@

<style lang="scss" scoped>

.v-input--checkbox {
margin: 0;
}

::v-deep .v-messages {
display: none;
}

.subheading {
margin-top: 20px;
margin-bottom: 5px;
font-weight: bold;
color: gray;
}

.filters {
.catalog-filters-wrapper {
width: 100%;
height: calc(100% - 100px);
overflow: auto;
height: 100%;
}

.qa-link {
margin-top: 24px;
.filter-button {
margin: 16px;
}

.drawer-btn {
margin-top: 10px;
.filter-panel {
width: 100%;
height: 100%;
}

</style>
Loading