Skip to content
Open
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 @@ -31,7 +31,7 @@
/>

<!-- Starred -->
<Checkbox
<KCheckbox
v-if="loggedIn"
v-model="bookmark"
:label="$tr('starredLabel')"
Expand All @@ -46,7 +46,7 @@
</div>

<div class="checkbox-with-tooltip">
<Checkbox
<KCheckbox
v-model="coach"
aria-describedby="tooltip-coach"
:label="$tr('coachLabel')"
Expand All @@ -58,7 +58,7 @@
/>
</div>

<Checkbox
<KCheckbox
v-model="subtitles"
:label="$tr('subtitlesLabel')"
/>
Expand Down Expand Up @@ -104,7 +104,6 @@
import LanguageFilter from './LanguageFilter.vue';
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';

Expand All @@ -114,7 +113,6 @@
name: 'CatalogFilterPanelContent',
components: {
LanguageFilter,
Checkbox,
HelpTooltip,
MultiSelect,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@
lazy
>
<template #activator="{ on }">
<VChip
<StudioChip
class="ma-1"
v-on="on"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we don't need this v-on="on" now, right? Because the only thing the StudioChip emits is @close, but that is only if we set the close prop to true.

>
<div class="text-truncate">
{{ item.name }}
</div>
</VChip>
</StudioChip>
</template>
<span>{{ item.name }}</span>
</VTooltip>
</template>
<template #item="{ item }">
<Checkbox
<KCheckbox
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that this Checkbox here is just presentational (it isn't in charge of emitting the events), could you please set the presentational prop here to reflect this?

:key="item.id"
:ref="'checkbox-' + item.id"
v-model="languages"
:checked="languages.includes(item.id)"
:value="item.id"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding presentational, we should be able to use the v-model="languages" pattern here, which is now the recommended way to define a KCheckbox like this.

class="mb-0 mt-1 scroll-margin"
:labelDir="null"
Expand All @@ -59,7 +59,7 @@
</template>
<span>{{ item.name }}</span>
</VTooltip>
</Checkbox>
</KCheckbox>
</template>
</VAutocomplete>

Expand All @@ -68,8 +68,8 @@

<script>

import Checkbox from 'shared/views/form/Checkbox';
import LanguagesMap, { LanguagesList } from 'shared/leUtils/Languages';
import StudioChip from 'shared/views/StudioChip.vue';

const publicLanguages = Object.entries(window.publicLanguages || {}).map(([langId, count]) => {
const baseLanguage = LanguagesMap.get(langId);
Expand All @@ -86,7 +86,7 @@
export default {
name: 'LanguageFilter',
components: {
Checkbox,
StudioChip,
},
props: {
value: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
@blur="resetScroll"
>
<template #selection="{ item }">
<VChip :class="{ notranslate }">
<StudioChip :class="{ notranslate }">
{{ item.text }}
</VChip>
</StudioChip>
</template>
<template #item="{ item }">
<Checkbox
<KCheckbox
:ref="'checkbox-' + item.value"
v-model="selections"
:checked="selections.includes(item.value)"
:value="item.value"
class="scroll-margin"
>
Comment on lines +25 to 30
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Idem, we can use presentational and v-model here too.

Expand All @@ -35,7 +35,7 @@
>
{{ item.text }}
</span>
</Checkbox>
</KCheckbox>
</template>
</VSelect>
</template>
Expand All @@ -46,12 +46,12 @@

<script>

import Checkbox from './Checkbox';
import StudioChip from '../StudioChip.vue';
import DropdownWrapper from './DropdownWrapper';

export default {
name: 'MultiSelect',
components: { Checkbox, DropdownWrapper },
components: { DropdownWrapper, StudioChip },
// $attrs are rebound to a descendent component
inheritAttrs: false,
props: {
Expand Down