Skip to content

[1753] Replace custom routing with react-instantsearch-router-nextjs #1766

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

seatuna
Copy link
Collaborator

@seatuna seatuna commented Mar 25, 2025

Summary

Replaces our custom routing with the router provided by react-instantsearch-router-nextjs. This package is Algolia's official solution for nextjs compatible routing.

Known issues

There are currently some navigation bugs. Upgrading to use this package doesn't solve those bugs, so I recommend that this gets merged after those issues are resolved.

Copy link

vercel bot commented Mar 25, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
maple-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 8, 2025 11:34pm
maple-prod 🔄 Building (Inspect) Visit Preview 💬 Add feedback Apr 8, 2025 11:34pm

Copy link
Collaborator

@Mephistic Mephistic left a comment

Choose a reason for hiding this comment

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

LGTM - I don't think this needs to wait for the routing bugs to be fixed to merge (if anything, we should merge this to ensure the fix for those bugs is compatible with this change), but we can discuss at hack night before merging.

@seatuna seatuna force-pushed the ctoon/1753/upgrade-instantsearch-router branch from e2b118a to de8d970 Compare April 2, 2025 00:17
@Mephistic
Copy link
Collaborator

One thing that just occured to me was this seems to obliterate our Feature Flag handling - we have the ability to use query params to override feature flags on the front end for testing, and we had to add a special workaround to ignore query params with flagNames in the Instantsearch routing so that these flags weren't obliterated by the Instantsearch router logic.

If we can, it'd be nice to try and preserve this flag query param logic with the new router:

const searchStateToUrl = (searchState: UiState) => {

It may also just be time for us to upgrade to a better feature flag override solution - if fixing this proves too painful, I don't think this is a blocker.

Copy link
Collaborator

@Mephistic Mephistic left a comment

Choose a reason for hiding this comment

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

LGTM - going to wait to deploy until next week because the V2 launch is tomorrow and we're putting a blocker on prod out of an abundance of caution.

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.

2 participants