-
Notifications
You must be signed in to change notification settings - Fork 22
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
fix(autocomplete): réutilisation du composant autocomplete sur la home, accentuation du contraste quand on parcours les suggestions au clavier #6429
base: dev
Are you sure you want to change the base?
Conversation
…e, accentuation du contraste quand on parcours les suggestions au clavier
{displayLabel(item)} | ||
</Button> | ||
{lineAsLink ? ( | ||
<Link href={lineAsLink(item)} className={link}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
j'ai transformé le bouton en Link directement pour que le style soit uniforme partout
packages/code-du-travail-frontend/src/modules/common/Autocomplete/Autocomplete.tsx
Outdated
Show resolved
Hide resolved
@@ -52,6 +52,7 @@ describe("<HomeSearch />", () => { | |||
expect(getByText("congés payés et maladie")).toBeInTheDocument(); | |||
|
|||
userAction.click(congesSansSolde); | |||
fireEvent.submit(byTestId("search-input").get()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Plutôt qu'un testid, ca pourrait être cool de récupérer l'input par son label
fireEvent.submit(byTestId("search-input").get()); | |
fireEvent.submit(byLabelText("Recherchez par mots-clés").get()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
j'ai essayer mais ça marche pas. Je penses que c'est parce que le label est comme ça :
<label
class="fr-label"
for="input-:r1:"
>
Recherchez par mots-clés
<span
class="fr-hint-text"
>
par exemple : congés payés, durée de préavis
</span>
</label>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah oui en effet, peut être mettre en regex dans ce cas
@@ -61,7 +65,7 @@ export const SearchInput = (props: Props) => { | |||
/> | |||
<ul | |||
{...getMenuProps({ | |||
className: list, | |||
className: autocompleteListContainer, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
je réutilise les même styles
🎉 Deployment for commit a4cbdf9 : IngressesDocker images
|
Fix #6403