WebMemex / webmemex-extension

📇 Your digital memory extension, as a browser extension
https://webmemex.org
Other
208 stars 45 forks source link

Expose search query in window location query. #92

Closed Treora closed 7 years ago

Treora commented 7 years ago

The UI logic should not have to bother about which pieces of state are exposed in the location query (in my opinion). Therefore, this commit introduces a listener that bidirectionally syncs variables between the state and the window location.

blackforestboi commented 7 years ago

Hey @Treora

I tried it out with query-in-url-branch and it's not working for me on chrome. Though I may expect something different than you actually did.

What I thought would happen:

When typing a query in the search field, the url in the address bar automatically changes to something like that: chrome-extension://ikhdjbhnddpfbfaompkhmlbhgchogffh/overview/overview.html?searchQuery=test

It stays empty though.

Treora commented 7 years ago

Did you build and reload the extension? It does work like that for me. query-in-url

Treora commented 7 years ago

Oh of course; the URL is not visible when viewing the overview as a new tab (I opened it with Ctrl+Y or the browser action button).

blackforestboi commented 7 years ago

Oh of course; the URL is not visible when viewing the overview as a new tab (I opened it with Ctrl+Y or the browser action button).

Yes, I just figured and wanted to add that to my description :) Is that a bug or restriction?

Treora commented 7 years ago

Oh of course; the URL is not visible when viewing the overview as a new tab (I opened it with Ctrl+Y or the browser action button).

Yes, I just figured and wanted to add that to my description :) Is that a bug or restriction?

That's just what Chrome|ium does. It still works fine though. E.g. if you follow a link and go back, your query is still there (thus fixing your complaint in #52).