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
Use /search
for search
#29991
Labels
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Preliminary note
This issue is part of our "help wanted" issues. It represents something that we know we want to implement, and that is defined enough that a contributor can implement it in a way that it would get merged.
If you want to work on this, please add a comment saying so and ask any questions you need, then open a PR referencing this issue!
Description
At the moment, the state for the search field (auto-complete, history, results…) is stored in Redux. When searching, the URL does change to
/search
but thats all.We want to move the current search state to the URL, with for example
/search?query=something
, and not use the Redux state for it. We can still use the Redux state to store the results for recent searches (so you can navigate back to the search page and it is cached)Navigation should work correctly back and from the search page.
When loading the search page, we need to present the user with a search field. A nice improvement would be to display some syntax help near the field, like what is currently displayed in the auto-complete menu (but could be expanded as we would have more space).
Loading screens / indicators could probably be improved as well
This would solve #26868
Implementation notes
It may be a good idea to modernise the code while you work on this, with functional components and Typescript.
Recent searches could be stored in
LocalStorage
(with a newuseLocalStorage
hook). If a "complex" local state is needed, consideruseImmer
.The text was updated successfully, but these errors were encountered: