Represent search query in the url of overview
Closed this issue · 14 comments
Right now, when opening the search overview, it has no url whatsoever. Also when typing in a search query its not represented in the URL.
I think it'll be helpful to represent the search in a url, as it is a common work flow and also would help to link to the search results from the address bar.
I don't think it's possible
the absolute path of overview is something like this chrome-extension:///overview.html
but I am not sure if one can represent it.
Good to put this issue on the list. Helps indeed with searching in the address bar (#14), and to not lose the result list when using the back button (#52).
@Rohanhacker: We can indeed not change the paths, but we can however add a query parameter or fragment identifier. Something like overview.html?q=bananas
would be fine.
Not sure whether to use the react/redux router for this. Possibly. What we need is bidirectional syncing between a field in the redux state and a query parameter in the URL.
Can we use window.location.hash? or something similar?
I' ll work on this
@Chaitya62 No #63 is only to link up the search iteself with the address bar.
What is needed here is that the search query is represented as a URL, when searching in the overview.
something like chrome-extension://adfasfsadfsadlfakfdjasdfasdf?search="test"&from="03-03-17"
@oliver So should I work on it also does using window. location.hash
sounds good using that we can have something like thecurrenturl#search=searchQuery
or something similar
@Chaitya62: I would rather not have to manually read and write the hash, but rather use some clean abstraction to sync a designated part of the application state with it.
Not sure whether to use the react/redux router for this. Possibly. What we need is bidirectional syncing between a field in the redux state and a query parameter in the URL.
@Chaitya62 It seems as there is still some work to do with your old PRs? Right?
Taking the work on the Research-Engine repo into account would be the 4th mini-project you work on simultaneously :)
For simplicity reasons, I would suggest first completely finishing your old PRs.
@oliversauter #56 is almost done but I think I'll finish that and then take this issue if no one has taken it!