File tree Expand file tree Collapse file tree 2 files changed +26
-14
lines changed
contentcuration/contentcuration/frontend/channelList/views/Channel Expand file tree Collapse file tree 2 files changed +26
-14
lines changed Original file line number Diff line number Diff line change 11<template >
22
3- <VContainer class =" pa-4" >
4- <div v-if =" currentFilters.length" >
5- <VChip
3+ <div class =" catalog-filter-bar" >
4+ <div
5+ v-if =" currentFilters.length"
6+ class =" catalog-filter-bar-content"
7+ >
8+ <StudioChip
69 v-for =" (filter, index) in currentFilters"
710 :key =" `catalog-filter-${index}`"
811 close
9- class =" ma-1 "
12+ class =" catalog-filter-chip "
1013 :data-test =" `filter-chip-${index}`"
11- @input =" filter.onclose"
14+ @close =" filter.onclose"
1215 >
1316 {{ filter.text }}
14- </VChip >
17+ </StudioChip >
1518 <KButton
1619 v-if =" currentFilters.length"
1720 class =" clear-link"
2124 @click =" clearFilters"
2225 />
2326 </div >
24- </VContainer >
27+ </div >
2528
2629</template >
2730
3033
3134 import flatten from ' lodash/flatten' ; // Tests fail with native Array.flat() method
3235 import { catalogFilterMixin } from ' ./mixins' ;
36+ import StudioChip from ' shared/views/StudioChip' ;
3337 import { constantsTranslationMixin } from ' shared/mixins' ;
3438
3539 /**
4549
4650 export default {
4751 name: ' CatalogFilterBar' ,
52+ components: {
53+ StudioChip,
54+ },
4855 mixins: [constantsTranslationMixin, catalogFilterMixin],
4956 computed: {
5057 currentFilters () {
129136 width : 100% ;
130137 }
131138
132- .container {
139+ .catalog-filter-bar {
133140 max-width : 1128px ;
141+ padding : 16px ;
134142 margin : 0 auto ;
135143 }
136144
137- .v-card {
138- cursor : pointer ;
145+ .catalog-filter-bar-content {
146+ display : flex ;
147+ flex-wrap : wrap ;
148+ align-items : center ;
149+ }
139150
140- & :hover {
141- background-color : var (--v-grey-lighten4 );
142- }
151+ .catalog-filter-chip {
152+ margin : 4px ;
143153 }
144154
145155 .clear-link {
Original file line number Diff line number Diff line change @@ -16,7 +16,9 @@ const query = {
1616async function closeChipByText ( user , text ) {
1717 const chip = await screen . findByText ( text ) ;
1818
19- const closeButton = chip . closest ( '[data-test^="filter-chip"]' ) . querySelector ( '.v-chip__close' ) ;
19+ const closeButton = chip
20+ . closest ( '[data-test^="filter-chip"]' )
21+ . querySelector ( '[data-test="remove-chip"]' ) ;
2022
2123 expect ( closeButton ) . toBeTruthy ( ) ;
2224 await user . click ( closeButton ) ;
You can’t perform that action at this time.
0 commit comments