Skip to content
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

Port to Chrome-based browsers (e.g. Brave, Vivaldi, Edge, etc.) #52

Open
vaibhavghevde opened this issue Apr 18, 2020 · 11 comments
Open
Labels
i-enhancement New functionality

Comments

@vaibhavghevde
Copy link

Problem Statement

I want to start using brave browser as my default browser

Preferred Solution

Can I please have this same extension for the chrome engine as brave has the same browser engine

@josh-berry
Copy link
Owner

Hi, thanks for your request. A Chrome (or Brave, or Vivaldi, or ...) port is certainly possible, but there are a few caveats to any such effort. The biggest issue is that Tab Stash relies on a few Firefox-specific APIs which are not available in Chrome or Chrome-based browsers. For example, tab hiding isn't available, and there is no sidebar. So these features would be missing in a Chrome port.

The other issue is that I am primarily a Firefox user, and I'm not sure I'd be able to offer the same level of quality and support on Chrome. But it's something I'm actively looking at as you're certainly not the first person to ask. :)

The good news is that any porting done for Chrome should also work for Brave and other Chrome-based browsers. So just to keep things organized, I'm going to re-title the issue with all Chrome-based browsers in mind, including Brave.

@josh-berry josh-berry added the i-enhancement New functionality label Apr 18, 2020
@josh-berry josh-berry changed the title Can I please have this extension for Brave browser Port to Chrome-based browsers (e.g. Brave, Vivaldi, Edge, etc.) Apr 18, 2020
@josh-berry josh-berry added this to Unscoped: New Functionality in Ideas Apr 20, 2020
@josh-berry josh-berry moved this from Unscoped: New Functionality to v3.0 in Ideas May 23, 2020
@josh-berry josh-berry removed this from v3.0 in Ideas Jun 28, 2020
@smaragdus
Copy link

Any development on porting the extension to Chromium-based browsers? As I switched from Firefox to a Chromium fork long time ago I would appreciate if Tab Stash gets ported. Nowadays I use a Firefox fork only to test extensions which are not available for Chromium-based browsers.

josh-berry added a commit that referenced this issue Dec 22, 2020
This is just enough to get basic functionality working.  There's a lot
left to be done (packaging, CSS changes, more bug fixes, who knows what
else...).
josh-berry added a commit that referenced this issue Dec 26, 2020
This was another instance of incorrectly detecting whether a bookmark
was a folder or not...
@Tokukarin
Copy link

I'm trying to add the extension to brave. I did apply the patch but it fails to load the extension, what am I missing?

@josh-berry
Copy link
Owner

The Chrome port isn't complete yet and there are probably quite a few things that don't work or work unreliably. Do not trust it with any data that you care about; I cannot provide support if it breaks. However, PRs are welcome. 😄

I'm not sure what you mean by "apply the patch", as there are no patches to apply (apart from what the build system does automatically). If you just want to play around with/hack on the Chrome port (again, do not trust it with any data you care about), it is built in the dist-chrome directory and you can load it from there.

@Tokukarin
Copy link

@josh-berry I meant the "chrome-manifest.patch" I did apply that one with "git apply" as you do with a patch.
Sorry, I may have confused something.

@josh-berry
Copy link
Owner

@josh-berry I meant the "chrome-manifest.patch" I did apply that one with "git apply" as you do with a patch.
Sorry, I may have confused something.

Ah I see. The build system will do this for you (don't do it by hand or you'll confuse it 😉). Just run make and check the dist-chrome directory for the Chrome version.

@JimBreton
Copy link

Hey everyone. I'd love to see this ported to Chromium browsers as well, having recently switched from FF to Brave. However I've recently found that the 'Tabli' extension is quite similar and fills that role (for me at least) nicely. Maybe this will help others in a similar predicament.

@PuffinRub
Copy link

I can throw a little bit of cash in to the development funds pot if that helps the author with converting it to allow Chromium based browsers to accept it natively...

@VamosCC
Copy link

VamosCC commented Oct 18, 2022

This is the best tab management extension I've ever seen,which is ingeniously combine the history, bookmark and pinned tab of browser, and redefines reading list. So I'll use Firefox as my main browser instead of Chrome-based browsers.
In addition, extension ‘better-onetab’ in Chrome is similar but cannot pined at the sidebar of browser, which is slightly regretful.

@gliptak
Copy link
Contributor

gliptak commented Mar 17, 2023

At this point, a Chrome specific artifact is being generated https://github.com/josh-berry/tab-stash/actions/runs/4444147081

Could it be uploaded as alpha/beta to Chrome Extensions?

@josh-berry
Copy link
Owner

Alright, so here's the deal with the Chrome port.

Sadly, it's not at a quality level I'm comfortable with releasing, and I don't see a path to getting it there anytime soon. The existing port was a very rough attempt to see what was feasible, and it has several things that are glaringly, obviously broken. Unfortunately, fixing them would require some significant architectural changes to Tab Stash.

Even if those issues could be fixed, not all of Tab Stash's features would be available. Chrome does not support sidebars or hidden tabs. Without Firefox's sidebar, only the (currently-experimental) popup view or the tab view would be available. Without Firefox's hidden tabs, there is no way to support some common use cases like playing music out of a tab, stashing that tab, and letting the music play in the background.

Finally, personally, I am a Firefox user 99.9% of the time—these days, the only time I launch a Chrome-based browser is if some specific site doesn't work in Firefox. Because I wouldn't be using Tab Stash in Chrome regularly, I'm not sure I can provide the same level of quality and support as I can for Firefox.


TL;DR: There is unfortunately too much work, for too little gain, for me to justify spending time on it right now over the other Tab Stash-related things I could be doing (like fixing bugs or adding new features). I'm reluctant to invest in a browser I don't use, which has made choices that I consider to be hostile to users, to get a worse user experience compared to Tab Stash on Firefox.


All that said, if someone is willing to invest the time to get Tab Stash to an acceptable level of quality in Chrome, and commit to helping out with ongoing maintenance, bug fixes, etc., I'm happy to merge those patches, work with you to ensure the Chrome port runs well, and handle the release and publishing tasks.

I want to be clear, however, that this is a huge effort and an ongoing commitment, and we would need to work closely together on it from the beginning.

Okay, so what actually needs to be done? Here's a partial list.

Port to Manifest V3

All new extensions in the Chrome store must use Manifest V3. Tab Stash uses Manifest V2, and switching to MV3 is a significant effort, including:

  • Making sure all the needed browser APIs are available in service workers
  • Changing the background page into a service worker
  • Making whatever changes are needed on the UI side of things to deal with the fact that the service worker may start and stop randomly (Unlike background pages, service workers are not persistent.)

(Firefox, by contrast, hasn't made a decision about getting rid of MV2 yet, and they've made several improvements to their version of MV3 that will make switching easier than it would be for Chrome, when the time comes.)

Move Tab/Window/Bookmark Mutations Out of the UI

Because Chrome does not offer a sidebar, the only alternative (apart from an actual tab) is to use a popup for the Tab Stash UI. However, popups in Chrome work differently than in Firefox. In Chrome, popups close as soon as the active tab is changed, whereas in Firefox, they stay open. This is a problem for Tab Stash in particular, because any pending UI operation (e.g. "stash all open tabs") is stopped the moment the popup is closed.

This means all tab/window/bookmark changes need to be done by the service worker instead of the UI (which is where they are done today). Changing this is a huge effort, including:

  • Creating new NanoServices to allow this communication to happen
  • Refactoring the various models to either use the new NanoService or make direct calls to the browser (depending on whether they're running in the service worker or UI)
  • Finding and changing any locations where the UI itself does browser.* calls directly and changing those as well

This is probably the single biggest barrier to getting a Chrome port working reliably—it requires deep changes to large parts of Tab Stash, and needs to be done carefully to avoid breaking things.

And yes, it's true that without the popup view, the technical barriers are less, but I think the flexibility of having different UI options is an important part of what makes Tab Stash special—losing that flexibility would make it feel more like other tab managers.

The Usual Porting Stuff

???

These are just the things I can think of / recall off the top of my head. There might be more unpleasant surprises that we find along the way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i-enhancement New functionality
Projects
None yet
Development

No branches or pull requests

8 participants