Skip to content

Commit

Permalink
feat(combobox): use downshift instead of react-autosuggest (#5972)
Browse files Browse the repository at this point in the history
* fix: autoscroll

* fix: autoscroll

* fix: snapshot

* fix: test

* fix: test

* fix: test

* fix: snapshot

* fix: snapshot

* fix: snapshot

* fix: snapshot

* fix: default value

* fix: default value

* fix: test
  • Loading branch information
maxgfr authored Jun 20, 2024
1 parent c5c2798 commit 2bdc92f
Show file tree
Hide file tree
Showing 28 changed files with 538 additions and 2,114 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ exports[`<About /> should render 1`] = `
>
<form
action="/recherche"
class="sc-kCMKrZ fAggpb"
class="sc-dQEtJz dDGKmp"
role="search"
>
<div
Expand All @@ -74,41 +74,28 @@ exports[`<About /> should render 1`] = `
Rechercher
</label>
</div>
<div
<input
aria-activedescendant=""
aria-autocomplete="list"
aria-controls="downshift-:r0:-menu"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="react-autowhatever-1"
aria-labelledby="downshift-:r0:-label"
autocomplete="off"
class="sc-iLsKjm cykCX"
id="floating-search"
placeholder="Rechercher"
role="combobox"
style="flex: 1 1 auto;"
>
<input
aria-autocomplete="list"
aria-controls="react-autowhatever-1"
aria-label="recherchez par mots-clés"
autocomplete="off"
class="sc-iLsKjm cykCX"
id="floating-search"
name="q"
placeholder="Rechercher"
title="recherchez par mots-clés"
type="search"
value=""
/>
<div
class="sc-imwsjW MXbtV"
id="react-autowhatever-1"
role="listbox"
/>
</div>
value=""
/>
<button
aria-label="Lancer ma recherche"
class="sc-kOPcWz kyVwqT sc-eifrsQ hbTAEy"
class="sc-kOPcWz kyVwqT sc-epALIP hCiGPx"
title="Lancer ma recherche"
type="submit"
>
<svg
aria-hidden="true"
class="sc-dJiZtA dqyRfb"
class="sc-imwsjW kdnIoO"
fill="none"
viewBox="0 0 32 32"
xmlns="http://www.w3.org/2000/svg"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ exports[`<DroitDuTravail /> should render 1`] = `
>
<form
action="/recherche"
class="sc-bfhvDw ciumlM"
class="sc-fKWMtX nLBUO"
role="search"
>
<div
Expand All @@ -74,41 +74,28 @@ exports[`<DroitDuTravail /> should render 1`] = `
Rechercher
</label>
</div>
<div
<input
aria-activedescendant=""
aria-autocomplete="list"
aria-controls="downshift-:r0:-menu"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="react-autowhatever-1"
aria-labelledby="downshift-:r0:-label"
autocomplete="off"
class="sc-hBtRBD jBDoTn"
id="floating-search"
placeholder="Rechercher"
role="combobox"
style="flex: 1 1 auto;"
>
<input
aria-autocomplete="list"
aria-controls="react-autowhatever-1"
aria-label="recherchez par mots-clés"
autocomplete="off"
class="sc-hBtRBD jBDoTn"
id="floating-search"
name="q"
placeholder="Rechercher"
title="recherchez par mots-clés"
type="search"
value=""
/>
<div
class="sc-kgOKUu dhyfuU"
id="react-autowhatever-1"
role="listbox"
/>
</div>
value=""
/>
<button
aria-label="Lancer ma recherche"
class="sc-kOPcWz kyVwqT sc-bOQTJJ eMnhEA"
class="sc-kOPcWz kyVwqT sc-fUBkdm gLfJpD"
title="Lancer ma recherche"
type="submit"
>
<svg
aria-hidden="true"
class="sc-cMa-dbN xePnd"
class="sc-kgOKUu iKwraL"
fill="none"
viewBox="0 0 32 32"
xmlns="http://www.w3.org/2000/svg"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ exports[`<FicheMT /> should render 1`] = `
>
<form
action="/recherche"
class="sc-izQBue eHlhBV"
class="sc-dChVcU fGdpDW"
role="search"
>
<div
Expand All @@ -74,41 +74,28 @@ exports[`<FicheMT /> should render 1`] = `
Rechercher
</label>
</div>
<div
<input
aria-activedescendant=""
aria-autocomplete="list"
aria-controls="downshift-:r0:-menu"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="react-autowhatever-1"
aria-labelledby="downshift-:r0:-label"
autocomplete="off"
class="sc-jlGgGc dIeNLL"
id="floating-search"
placeholder="Rechercher"
role="combobox"
style="flex: 1 1 auto;"
>
<input
aria-autocomplete="list"
aria-controls="react-autowhatever-1"
aria-label="recherchez par mots-clés"
autocomplete="off"
class="sc-jlGgGc dIeNLL"
id="floating-search"
name="q"
placeholder="Rechercher"
title="recherchez par mots-clés"
type="search"
value=""
/>
<div
class="sc-rPWID gBbLcg"
id="react-autowhatever-1"
role="listbox"
/>
</div>
value=""
/>
<button
aria-label="Lancer ma recherche"
class="sc-kOPcWz kyVwqT sc-cTTdyq etgydP"
class="sc-kOPcWz kyVwqT sc-gtJxfw gzkgek"
title="Lancer ma recherche"
type="submit"
>
<svg
aria-hidden="true"
class="sc-jBeBSR iciHqJ"
class="sc-rPWID dtqUFz"
fill="none"
viewBox="0 0 32 32"
xmlns="http://www.w3.org/2000/svg"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ exports[`<Term /> should render 1`] = `
>
<form
action="/recherche"
class="sc-kCMKrZ fAggpb"
class="sc-dQEtJz dDGKmp"
role="search"
>
<div
Expand All @@ -74,41 +74,28 @@ exports[`<Term /> should render 1`] = `
Rechercher
</label>
</div>
<div
<input
aria-activedescendant=""
aria-autocomplete="list"
aria-controls="downshift-:r0:-menu"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="react-autowhatever-1"
aria-labelledby="downshift-:r0:-label"
autocomplete="off"
class="sc-iLsKjm cykCX"
id="floating-search"
placeholder="Rechercher"
role="combobox"
style="flex: 1 1 auto;"
>
<input
aria-autocomplete="list"
aria-controls="react-autowhatever-1"
aria-label="recherchez par mots-clés"
autocomplete="off"
class="sc-iLsKjm cykCX"
id="floating-search"
name="q"
placeholder="Rechercher"
title="recherchez par mots-clés"
type="search"
value=""
/>
<div
class="sc-imwsjW MXbtV"
id="react-autowhatever-1"
role="listbox"
/>
</div>
value=""
/>
<button
aria-label="Lancer ma recherche"
class="sc-kOPcWz kyVwqT sc-eifrsQ hbTAEy"
class="sc-kOPcWz kyVwqT sc-epALIP hCiGPx"
title="Lancer ma recherche"
type="submit"
>
<svg
aria-hidden="true"
class="sc-dJiZtA dqyRfb"
class="sc-imwsjW kdnIoO"
fill="none"
viewBox="0 0 32 32"
xmlns="http://www.w3.org/2000/svg"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ exports[`<Glossaire /> should render 1`] = `
>
<form
action="/recherche"
class="sc-kCMKrZ fAggpb"
class="sc-dQEtJz dDGKmp"
role="search"
>
<div
Expand All @@ -74,41 +74,28 @@ exports[`<Glossaire /> should render 1`] = `
Rechercher
</label>
</div>
<div
<input
aria-activedescendant=""
aria-autocomplete="list"
aria-controls="downshift-:r0:-menu"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="react-autowhatever-1"
aria-labelledby="downshift-:r0:-label"
autocomplete="off"
class="sc-iLsKjm cykCX"
id="floating-search"
placeholder="Rechercher"
role="combobox"
style="flex: 1 1 auto;"
>
<input
aria-autocomplete="list"
aria-controls="react-autowhatever-1"
aria-label="recherchez par mots-clés"
autocomplete="off"
class="sc-iLsKjm cykCX"
id="floating-search"
name="q"
placeholder="Rechercher"
title="recherchez par mots-clés"
type="search"
value=""
/>
<div
class="sc-imwsjW MXbtV"
id="react-autowhatever-1"
role="listbox"
/>
</div>
value=""
/>
<button
aria-label="Lancer ma recherche"
class="sc-kOPcWz kyVwqT sc-eifrsQ hbTAEy"
class="sc-kOPcWz kyVwqT sc-epALIP hCiGPx"
title="Lancer ma recherche"
type="submit"
>
<svg
aria-hidden="true"
class="sc-dJiZtA dqyRfb"
class="sc-imwsjW kdnIoO"
fill="none"
viewBox="0 0 32 32"
xmlns="http://www.w3.org/2000/svg"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ exports[`<MentionLegales /> should render 1`] = `
>
<form
action="/recherche"
class="sc-kCMKrZ fAggpb"
class="sc-dQEtJz dDGKmp"
role="search"
>
<div
Expand All @@ -74,41 +74,28 @@ exports[`<MentionLegales /> should render 1`] = `
Rechercher
</label>
</div>
<div
<input
aria-activedescendant=""
aria-autocomplete="list"
aria-controls="downshift-:r0:-menu"
aria-expanded="false"
aria-haspopup="listbox"
aria-owns="react-autowhatever-1"
aria-labelledby="downshift-:r0:-label"
autocomplete="off"
class="sc-iLsKjm cykCX"
id="floating-search"
placeholder="Rechercher"
role="combobox"
style="flex: 1 1 auto;"
>
<input
aria-autocomplete="list"
aria-controls="react-autowhatever-1"
aria-label="recherchez par mots-clés"
autocomplete="off"
class="sc-iLsKjm cykCX"
id="floating-search"
name="q"
placeholder="Rechercher"
title="recherchez par mots-clés"
type="search"
value=""
/>
<div
class="sc-imwsjW MXbtV"
id="react-autowhatever-1"
role="listbox"
/>
</div>
value=""
/>
<button
aria-label="Lancer ma recherche"
class="sc-kOPcWz kyVwqT sc-eifrsQ hbTAEy"
class="sc-kOPcWz kyVwqT sc-epALIP hCiGPx"
title="Lancer ma recherche"
type="submit"
>
<svg
aria-hidden="true"
class="sc-dJiZtA dqyRfb"
class="sc-imwsjW kdnIoO"
fill="none"
viewBox="0 0 32 32"
xmlns="http://www.w3.org/2000/svg"
Expand Down
Loading

0 comments on commit 2bdc92f

Please sign in to comment.