Skip to content
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(atomic): don't redirect when hovering a instant result & pressing Enter #4938

Merged
merged 6 commits into from
Feb 12, 2025

Conversation

alexprudhomme
Copy link
Contributor

@alexprudhomme alexprudhomme commented Feb 4, 2025

https://coveord.atlassian.net/browse/KIT-3910

We now have a new variable in suggestions-manager that tracks they keyboard use. When someone press Enter when having a suggestion/result/recent query selected with the keyboard, it will trigger it's onClick event.
Whenever we stop using the keyboard and using the mouse it resets again which will make the Enter event trigger the query in the search box instead.

I added a lot of tests to write in vitest.

Copy link

github-actions bot commented Feb 4, 2025

Pull Request Report

PR Title

✅ Title follows the conventional commit spec.

Live demo links

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 244 244 0
commerce 355.3 355.3 0
search 415.2 415.2 0
insight 406.4 406.4 0
recommendation 256.2 256.2 0
ssr 409 409 0
ssr-commerce 373 373 0

SSR Progress

Use case SSR (#) CSR (#) Progress (%)
search 39 44 89
recommendation 0 4 0
case-assist 0 6 0
insight 0 27 0
commerce 0 15 0
Detailed logs search : buildInteractiveResult
search : buildInteractiveInstantResult
search : buildInteractiveRecentResult
search : buildInteractiveCitation
search : buildGeneratedAnswer
recommendation : missing SSR support
case-assist : missing SSR support
insight : missing SSR support
commerce : missing SSR support

@louis-bompart
Copy link
Collaborator

There's a regression here: we still want to navigate/select the product if the product is focused/selected with keyboard

fbeaudoincoveo
fbeaudoincoveo previously approved these changes Feb 5, 2025
@alexprudhomme alexprudhomme marked this pull request as draft February 5, 2025 16:30
@alexprudhomme alexprudhomme marked this pull request as ready for review February 6, 2025 20:26
@alexprudhomme alexprudhomme added this pull request to the merge queue Feb 12, 2025
Merged via the queue into master with commit eea90a2 Feb 12, 2025
125 checks passed
@alexprudhomme alexprudhomme deleted the KIT-3910 branch February 12, 2025 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants