Skip to content

Conversation

@aymeric-giraudet
Copy link
Member

@aymeric-giraudet aymeric-giraudet commented Oct 14, 2025

Summary

FX-3504

Result

image

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 14, 2025

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 b0c9428:

Sandbox Source
example-instantsearch-getting-started Configuration
example-react-instantsearch-getting-started Configuration
example-react-instantsearch-next-app-dir-example Configuration
example-react-instantsearch-next-routing-example Configuration
example-vue-instantsearch-getting-started Configuration

@aymeric-giraudet aymeric-giraudet force-pushed the feat/autocomplete-react-recent-searches branch 2 times, most recently from 0509ac1 to 44940ce Compare November 5, 2025 17:29
@aymeric-giraudet aymeric-giraudet changed the title feat(autocomplete): implement recent searches for React feat(autocomplete): implement recent searches Nov 5, 2025
@aymeric-giraudet aymeric-giraudet force-pushed the feat/autocomplete-react-recent-searches branch 3 times, most recently from 0a8c374 to efae04b Compare November 5, 2025 17:58
@aymeric-giraudet aymeric-giraudet force-pushed the feat/autocomplete-react-recent-searches branch from efae04b to 8f7e4a4 Compare November 5, 2025 18:24
@aymeric-giraudet aymeric-giraudet marked this pull request as ready for review November 5, 2025 18:42
@aymeric-giraudet aymeric-giraudet requested review from a team, FabienMotte and Haroenv and removed request for a team November 5, 2025 18:42
Copy link
Contributor

@Haroenv Haroenv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. I have a couple questions around interop


const indicesForPropGetters = [...indices];
const indicesConfigForPropGetters = [...indicesConfig];
if (showRecent) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this implies we're saving recent searches even if showRecent is false. Should maybe the whole storage be conditional based on showRecent?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't call hooks conditionally but I could return a storage with empty function or something yeah

}

const LOCAL_STORAGE_KEY_TEST = 'test-localstorage-support';
const LOCAL_STORAGE_KEY = 'autocomplete-recent-searches';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there some way where we link the autocomplete setup with the recent searches that are being presented? Do we do that in autocomplete.js?

What if there's multiple autocomplete instances in multiple places in the app?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could but the original lib doesn't, even though it does have code to handle multiple autocomplete components on a page (which I don't think anyone needs really)

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