@@ -63,69 +63,73 @@ export const ArticleCards = () => {
6363
6464 return (
6565 < div >
66- < label htmlFor = "guide-filter-form" > { t ( 'filter_instructions' ) } </ label >
67- < form name = "guide-filter-form" className = "mt-2 mb-5 d-flex d-flex" >
68- < div data-testid = "card-filter-types" >
69- < div
70- onClick = { ( ) => clickDropdown ( typesRef ) }
71- onKeyDown = { ( ) => clickDropdown ( typesRef ) }
72- role = "button"
73- tabIndex = { - 1 }
74- className = "text-uppercase f6 color-fg-muted d-block"
75- >
76- { t ( 'filters.type' ) }
66+ < div data-search = "hide" >
67+ < label htmlFor = "guide-filter-form" > { t ( 'filter_instructions' ) } </ label >
68+ < form name = "guide-filter-form" className = "mt-2 mb-5 d-flex d-flex" >
69+ < div data-testid = "card-filter-types" >
70+ < div
71+ onClick = { ( ) => clickDropdown ( typesRef ) }
72+ onKeyDown = { ( ) => clickDropdown ( typesRef ) }
73+ role = "button"
74+ tabIndex = { - 1 }
75+ className = "text-uppercase f6 color-fg-muted d-block"
76+ >
77+ { t ( 'filters.type' ) }
78+ </ div >
79+ < ActionMenu anchorRef = { typesRef } >
80+ < ActionMenu . Button >
81+ { typeFilter ? typeFilter . text : t ( 'filters.all' ) }
82+ </ ActionMenu . Button >
83+ < ActionMenu . Overlay aria-label = "types" data-testid = "types-dropdown" >
84+ < ActionList selectionVariant = "single" >
85+ { types . map ( ( type ) => {
86+ return (
87+ < ActionList . Item onSelect = { ( ) => setTypeFilter ( type ) } key = { type . text } >
88+ { type . text }
89+ </ ActionList . Item >
90+ )
91+ } ) }
92+ </ ActionList >
93+ </ ActionMenu . Overlay >
94+ </ ActionMenu >
7795 </ div >
78- < ActionMenu anchorRef = { typesRef } >
79- < ActionMenu . Button > { typeFilter ? typeFilter . text : t ( 'filters.all' ) } </ ActionMenu . Button >
80- < ActionMenu . Overlay aria-label = "types" data-testid = "types-dropdown" >
81- < ActionList selectionVariant = "single" >
82- { types . map ( ( type ) => {
83- return (
84- < ActionList . Item onSelect = { ( ) => setTypeFilter ( type ) } key = { type . text } >
85- { type . text }
86- </ ActionList . Item >
87- )
88- } ) }
89- </ ActionList >
90- </ ActionMenu . Overlay >
91- </ ActionMenu >
92- </ div >
9396
94- < div data-testid = "card-filter-topics" className = "mx-4" >
95- < div
96- onClick = { ( ) => clickDropdown ( topicsRef ) }
97- onKeyDown = { ( ) => clickDropdown ( topicsRef ) }
98- role = "button"
99- tabIndex = { - 1 }
100- className = "text-uppercase f6 color-fg-muted d-block"
101- >
102- { t ( 'filters.topic' ) }
97+ < div data-testid = "card-filter-topics" className = "mx-4" >
98+ < div
99+ onClick = { ( ) => clickDropdown ( topicsRef ) }
100+ onKeyDown = { ( ) => clickDropdown ( topicsRef ) }
101+ role = "button"
102+ tabIndex = { - 1 }
103+ className = "text-uppercase f6 color-fg-muted d-block"
104+ >
105+ { t ( 'filters.topic' ) }
106+ </ div >
107+ < ActionMenu anchorRef = { topicsRef } >
108+ < ActionMenu . Button >
109+ { topicFilter ? topicFilter . text : t ( 'filters.all' ) }
110+ </ ActionMenu . Button >
111+ < ActionMenu . Overlay aria-label = "topics" data-testid = "topics-dropdown" >
112+ < ActionList selectionVariant = "single" >
113+ { topics . map ( ( topic ) => {
114+ return (
115+ < ActionList . Item onSelect = { ( ) => setTopicFilter ( topic ) } key = { topic . text } >
116+ { topic . text }
117+ </ ActionList . Item >
118+ )
119+ } ) }
120+ </ ActionList >
121+ </ ActionMenu . Overlay >
122+ </ ActionMenu >
103123 </ div >
104- < ActionMenu anchorRef = { topicsRef } >
105- < ActionMenu . Button >
106- { topicFilter ? topicFilter . text : t ( 'filters.all' ) }
107- </ ActionMenu . Button >
108- < ActionMenu . Overlay aria-label = "topics" data-testid = "topics-dropdown" >
109- < ActionList selectionVariant = "single" >
110- { topics . map ( ( topic ) => {
111- return (
112- < ActionList . Item onSelect = { ( ) => setTopicFilter ( topic ) } key = { topic . text } >
113- { topic . text }
114- </ ActionList . Item >
115- )
116- } ) }
117- </ ActionList >
118- </ ActionMenu . Overlay >
119- </ ActionMenu >
124+ </ form >
125+
126+ < div role = "status" className = "color-fg-muted" >
127+ { guides . length === 0
128+ ? t ( 'guides_found.none' )
129+ : guides . length === 1
130+ ? t ( 'guides_found.one' )
131+ : t ( 'guides_found.multiple' ) . replace ( '{n}' , guides . length ) }
120132 </ div >
121- </ form >
122-
123- < div role = "status" className = "color-fg-muted" >
124- { guides . length === 0
125- ? t ( 'guides_found.none' )
126- : guides . length === 1
127- ? t ( 'guides_found.one' )
128- : t ( 'guides_found.multiple' ) . replace ( '{n}' , guides . length ) }
129133 </ div >
130134
131135 < ul ref = { articleCardRef } className = "d-flex flex-wrap mr-0 mr-md-n6 mr-lg-n8" >
@@ -144,6 +148,7 @@ export const ArticleCards = () => {
144148 { guides . length > numVisible && (
145149 < button
146150 className = "col-12 mt-5 text-center text-bold color-fg-accent btn-link"
151+ data-search = "hide"
147152 onClick = { loadMore }
148153 >
149154 { t ( 'load_more' ) }
0 commit comments