Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replaced responsiveWindow with useKResponsiveWindow #11355

Merged
merged 3 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Expand Up @@ -14,11 +14,16 @@

<script>

import responsiveWindowMixin from 'kolibri.coreVue.mixins.responsiveWindowMixin';
import useKResponsiveWindow from 'kolibri-design-system/lib/useKResponsiveWindow';

export default {
name: 'HeaderTabs',
mixins: [responsiveWindowMixin],
setup() {
const { windowIsSmall } = useKResponsiveWindow();
return {
windowIsSmall,
};
},
props: {
enablePrint: {
type: Boolean,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,16 @@

<script>

import responsiveWindowMixin from 'kolibri.coreVue.mixins.responsiveWindowMixin';
import useKResponsiveWindow from 'kolibri-design-system/lib/useKResponsiveWindow';

export default {
name: 'BlockItem',
mixins: [responsiveWindowMixin],
setup() {
const { windowIsSmall } = useKResponsiveWindow();
return {
windowIsSmall,
};
},
};

</script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@
import { mapState } from 'vuex';

import BottomAppBar from 'kolibri.coreVue.components.BottomAppBar';
import responsiveWindowMixin from 'kolibri.coreVue.mixins.responsiveWindowMixin';
import { ERROR_CONSTANTS } from 'kolibri.coreVue.vuex.constants';
import CatchErrors from 'kolibri.utils.CatchErrors';
import commonCoreStrings from 'kolibri.coreVue.mixins.commonCoreStrings';
Expand All @@ -141,7 +140,7 @@
CoachImmersivePage,
QuestionListPreview,
},
mixins: [responsiveWindowMixin, commonCoach, commonCoreStrings],
mixins: [commonCoach, commonCoreStrings],
data() {
return {
showError: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@

import { mapState } from 'vuex';
import { ContentNodeKinds } from 'kolibri.coreVue.vuex.constants';
import responsiveWindowMixin from 'kolibri.coreVue.mixins.responsiveWindowMixin';
import commonCoreStrings from 'kolibri.coreVue.mixins.commonCoreStrings';
import ResourceSelectionBreadcrumbs from '../../plan/LessonResourceSelectionPage/SearchTools/ResourceSelectionBreadcrumbs';
import { PageNames } from '../../../constants';
Expand All @@ -56,7 +55,7 @@
ContentCardList,
ResourceSelectionBreadcrumbs,
},
mixins: [commonCoreStrings, commonCoach, responsiveWindowMixin],
mixins: [commonCoreStrings, commonCoach],
data() {
return {
viewMoreButtonState: 'no_more_results',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@

<script>

import responsiveWindowMixin from 'kolibri.coreVue.mixins.responsiveWindowMixin';
import pickBy from 'lodash/pickBy';
import BottomAppBar from 'kolibri.coreVue.components.BottomAppBar';
import commonCoreStrings from 'kolibri.coreVue.mixins.commonCoreStrings';
Expand All @@ -60,7 +59,7 @@
BottomAppBar,
CreateQuizSection,
},
mixins: [commonCoreStrings, commonCoach, responsiveWindowMixin],
mixins: [commonCoreStrings, commonCoach],
data() {
return {
quizForge,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@

import { mapActions, mapGetters, mapState } from 'vuex';
import differenceWith from 'lodash/differenceWith';
import responsiveWindowMixin from 'kolibri.coreVue.mixins.responsiveWindowMixin';
import FilterTextbox from 'kolibri.coreVue.components.FilterTextbox';
import commonCoreStrings from 'kolibri.coreVue.mixins.commonCoreStrings';
import filterUsersByNames from 'kolibri.utils.filterUsersByNames';
Expand All @@ -94,7 +93,7 @@
FilterTextbox,
UserTable,
},
mixins: [responsiveWindowMixin, commonCoach, commonCoreStrings],
mixins: [commonCoach, commonCoreStrings],
data() {
return {
filterInput: '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,12 @@

<script>

import responsiveWindowMixin from 'kolibri.coreVue.mixins.responsiveWindowMixin';
import commonCoreStrings from 'kolibri.coreVue.mixins.commonCoreStrings';
import commonCoach from '../../common';

export default {
name: 'GroupRow',
mixins: [commonCoach, commonCoreStrings, responsiveWindowMixin],
mixins: [commonCoach, commonCoreStrings],
props: {
group: {
type: Object,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@

<script>

import useKResponsiveWindow from 'kolibri-design-system/lib/useKResponsiveWindow';
import CoachContentLabel from 'kolibri.coreVue.components.CoachContentLabel';
import ContentIcon from 'kolibri.coreVue.components.ContentIcon';
import { validateLinkObject, validateContentNodeKind } from 'kolibri.utils.validators';
import TextTruncatorCss from 'kolibri.coreVue.components.TextTruncatorCss';
import responsiveWindowMixin from 'kolibri.coreVue.mixins.responsiveWindowMixin';
import CardThumbnail from './CardThumbnail';

export default {
Expand All @@ -76,7 +76,12 @@
TextTruncatorCss,
CoachContentLabel,
},
mixins: [responsiveWindowMixin],
setup() {
const { windowIsSmall } = useKResponsiveWindow();
return {
windowIsSmall,
};
},
props: {
title: {
type: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
import pickBy from 'lodash/pickBy';
import BottomAppBar from 'kolibri.coreVue.components.BottomAppBar';
import commonCoreStrings from 'kolibri.coreVue.mixins.commonCoreStrings';
import responsiveWindowMixin from 'kolibri.coreVue.mixins.responsiveWindowMixin';
import useKResponsiveWindow from 'kolibri-design-system/lib/useKResponsiveWindow';
import commonCoach from '../../common';
import CoachAppBarPage from '../../CoachAppBarPage';
import CoachImmersivePage from '../../CoachImmersivePage';
Expand Down Expand Up @@ -146,7 +146,13 @@
BottomAppBar,
BookmarkIcon,
},
mixins: [commonCoach, commonCoreStrings, responsiveWindowMixin],
mixins: [commonCoach, commonCoreStrings],
setup() {
const { windowIsSmall } = useKResponsiveWindow();
return {
windowIsSmall,
};
},
data() {
return {
// null corresponds to 'All' filter value
Expand Down
Loading