fix: missed input parts on quick search#1394
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
yes, this looks very promising as the source of the bug 👀 |
|
🤞🤞🤞 |
📝 WalkthroughWalkthroughThis change introduces a centralised global search query state through a new composable function and refactors multiple components to use it. The SearchBox component replaces its local input state with the global search query and removes the watcher that synchronised local input with URL parameters during navigation. The pages index and search components similarly migrate from local state to the global composable. This architectural shift eliminates automatic page synchronisation triggered by URL navigation whilst preserving the existing search submission functionality. Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
What
The user would type in one place, and several navigations would launch for each input. Then the route from the first navigation would change, and the user would continue typing—but navigation from the first page would still continue. They rewrote the route and the query listener updated the field value
How
I created a global storage for search fields, and both fields write to it. The field doesn't actually listen to query now, but only uses it for default value and as the factor that
qhas been cleared (when exiting the search)So now there's a single source of truth - the search store. And query parameter is simply synchronized with it for page reloads and for the server
resolves #1211 resolves #764