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(redirect): reopen menu when redirect detected #1091

Merged
merged 2 commits into from
Feb 14, 2023

Conversation

drodriguln
Copy link
Contributor

@drodriguln drodriguln commented Feb 13, 2023

If a redirect item is found after selecting a hit, then reopen the menu with the latest results (notably the redirect item).

Spun off from #1089

After discussing further, consistency of the UX was determined to be the top priority. Before there were situations when a redirect could occur without the user knowing. This approach, while less ideal functionally because two selects/submits are required, will always show a redirect item in the dropdown when the current query will redirect.

Two cases covered in the demo below:

  1. Type query, select hit corresponding to a redirect, menu reopens with new results, press enter
  2. Type query, select hit corresponding to a redirect, menu reopens with new results, select redirect item
Screen.Recording.2023-02-13.at.8.13.19.AM.mov

@drodriguln drodriguln requested review from a team, sarahdayan and Haroenv and removed request for a team February 13, 2023 13:56
@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit f82f896:

Sandbox Source
@algolia/autocomplete-example-github-repositories-custom-plugin Configuration
@algolia/autocomplete-example-instantsearch Configuration
@algolia/autocomplete-example-playground Configuration
@algolia/autocomplete-example-preview-panel-in-modal Configuration
@algolia/autocomplete-example-react-renderer Configuration
@algolia/autocomplete-example-starter-algolia Configuration
@algolia/autocomplete-example-starter Configuration
@algolia/autocomplete-example-reshape Configuration
@algolia/autocomplete-example-vue Configuration

@Haroenv Haroenv requested review from dhayab and removed request for sarahdayan February 13, 2023 16:06
@Haroenv
Copy link
Contributor

Haroenv commented Feb 13, 2023

Tried it out in the playground, and works smoothly IMO https://codesandbox.io/s/algolia-autocomplete-example-playground-forked-vfcdee?file=/app.tsx

@Haroenv Haroenv merged commit 53b9ce5 into next Feb 14, 2023
@Haroenv Haroenv deleted the fix/redirect-reopen-menu branch February 14, 2023 12:53
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.

None yet

3 participants