QuicKey icon indicating copy to clipboard operation
QuicKey copied to clipboard

Support Firefox

Open infokiller opened this issue 3 years ago • 8 comments

Hey again, I started using Firefox more and more recently and immediately missed this extension. Will you be open to a PR that adds Firefox support? From my experience in extensions I've developed it's fairly easy. Will try to send a PR soon and hope you'll be open to merge, but if not that's fine too.

infokiller avatar Dec 24 '21 16:12 infokiller

I haven't used FF in a while. It natively supports MRU navigation, right? So this would only be for searching for tabs?

QuicKey uses chrome-promise to wrap the Chrome APIs and return promises. So I think it may be fairly easy to just return the browser global in FF from there, which supports promises natively. Haven't looked in detail at what it would take, though.

fwextensions avatar Jan 04 '22 03:01 fwextensions

I haven't used FF in a while. It natively supports MRU navigation, right? So this would only be for searching for tabs?

Searching for tabs, bookmarks, and history with QuicKey's great fuzzy search.

QuicKey uses chrome-promise to wrap the Chrome APIs and return promises. So I think it may be fairly easy to just return the browser global in FF from there, which supports promises natively. Haven't looked in detail at what it would take, though.

I'll look into that. On the day I opened the issue I was able to make it work without the UI (https://github.com/infokiller/QuicKey/tree/firefox-support), i.e. you can use keyboard shortcuts, type your query, hit enter and switch to the right tab. Not sure why the UI wasn't rendered, I'll try to fix it when I have more free time.

infokiller avatar Jan 05 '22 08:01 infokiller

Not sure why the UI wasn't rendered,

Weird. If you're on a Mac, I wonder if it's the delay that I put in a long time ago to work around a Chrome bug where it wouldn't resize the popup to its content if it opened immediately. It's in src/js/popup/main.js.

fwextensions avatar Jan 06 '22 23:01 fwextensions

@infokiller — can confirm that your branch renders UI on Windows (albeit with some CSS changes applied).

@fwextensions — quick question, why is there a fixed height applied to the body?

ajitid avatar Jan 11 '22 18:01 ajitid

I believe at one point early on, the popup height was collapsing because the body started out empty, before the React code rendered anything. So that might be better as min-height. Not sure it's still needed anymore, as the search box and other components are pre-rendered during the build, so there's some static HTML to show as soon as the popup opens.

If the UI renders on Windows, then it may well be the delay on Mac that's causing the issue.

fwextensions avatar Jan 11 '22 20:01 fwextensions

I actually use Linux but I'll try to see if I get different results on Windows

infokiller avatar Jan 12 '22 04:01 infokiller

Just checked on Ubuntu using WSL and the UI does render on my machine. I think you meant pressing alt+Q shows input box but typing in it doesn't shows any result. This is a CSS issue and I've raised a PR for the same.

Turns out making chromebrowser change isn't necessary at all. I mistakenly ran web-ext directly on master and it ran exactly the same as with your (@infokiller 's) branch changes applied. (I've created a signed extension if you want to check it out.)

The only thing that is not working in Firefox is alt+Q navigation in private windows:-

  • On a normal window, one can switch to a private tab using the popup
  • On a private window, popup's input doesn't get auto-focused, and typing in the input box doesn't give any result

ajitid avatar Jan 12 '22 08:01 ajitid

Thanks @ajitid! For me, it didn't render anything.

infokiller avatar Jan 12 '22 08:01 infokiller

I haven't used FF in a while. It natively supports MRU navigation, right? So this would only be for searching for tabs?

Searching for tabs, bookmarks, and history with QuicKey's great fuzzy search.

QuicKey uses chrome-promise to wrap the Chrome APIs and return promises. So I think it may be fairly easy to just return the browser global in FF from there, which supports promises natively. Haven't looked in detail at what it would take, though.

I'll look into that. On the day I opened the issue I was able to make it work without the UI (https://github.com/infokiller/QuicKey/tree/firefox-support), i.e. you can use keyboard shortcuts, type your query, hit enter and switch to the right tab. Not sure why the UI wasn't rendered, I'll try to fix it when I have more free time.

For someone who is totally tech inept how would I get this working on Firefox?

Also, @fwextensions it seems like Chromium's impending changes about ad blocking would make FF support a little more worthwhile.

alpenandrew avatar Oct 08 '22 00:10 alpenandrew

After faffing about in FF's somewhat terrible devtools, I belatedly realized that @ajitid's fix in his PR on @infokiller's branch is all that's required to show the menu. Chrome seems to treat a height on the body as a min-height, while FF treats it as max-height. Removing that allowed the menu to expand to show the results list. (I didn't see any content flash due to a scrollbar, though.)

I'll take a look at submitting a version to the FF store.

fwextensions avatar Oct 22 '22 03:10 fwextensions

I have Firefox support in a branch. I keep finding little things that don't work correctly in FF, though. So I'm working through those.

fwextensions avatar Oct 24 '22 00:10 fwextensions

I've submitted 1.8.0 to Mozilla for review. We'll see how long it takes.

One limitation is it won't work in private windows. Firefox doesn't support some background page features that Chrome does, and which apparently I've relied on. It may work better once I migrate everything to manifest V3 for Chrome

fwextensions avatar Oct 26 '22 00:10 fwextensions

Thanks a lot @fwextensions, I'll install it the minute it becomes available (already testing my branch loading from a local dir)

infokiller avatar Oct 26 '22 10:10 infokiller

It's available in the Firefox store now: https://addons.mozilla.org/en-US/firefox/addon/quickey-the-quick-tab-switcher/

🔥🦊

fwextensions avatar Oct 26 '22 18:10 fwextensions