Robbendebiene / Gesturefy

Navigate, operate, and browse faster with mouse gestures! A customizable Firefox mouse gesture add-on with a variety of different commands.
https://addons.mozilla.org/firefox/addon/gesturefy/
GNU General Public License v3.0
793 stars 74 forks source link

Support for containers ("open in new tab", more?) #234

Open Reylak opened 6 years ago

Reylak commented 6 years ago

For some time, Firefox has had support for tab containers under the form of a plugin. Basically, this allows one to isolate tabs from each other, which includes cookies and local storage. A good thing for privacy in general.

My suggestion is to add support for containers in Gesturefy, so e.g. you can assign a gesture to opening a link to a new tab inside a designated container. Maybe some other gestures or actions may benefit from container support.

I know that it is possible for plugins to interact with containers right now, see for instance Context Plus or Cookie Autodelete.

From an implementation point of view, I'd have a special button beside the "Open link" entry (and any relevant entry), like a plus sign with the mention of "containers". Clicking on it would add a new entry to enter a gesture. Under it is a drop-down menu from where to chose a container.

Display of this special button would be conditioned to the availability of containers, and maybe to a special setting such as "Enable container support" as Cookie Autodelete does.

I understand this is a somewhat advanced feature that relies on a feature that is itself not even implemented as a default in Firefox. It's just an idea passing by :)

Robbendebiene commented 6 years ago

Hey, thanks for your feature request. I recently also started enjoying the new tab containers, so I'm pretty much aware of its benefits and usefulness :)

From an implementation point of view, I'd have a special button beside the "Open link" entry (and any relevant entry), like a plus sign with the mention of "containers". Clicking on it would add a new entry to enter a gesture. Under it is a drop-down menu from where to chose a container.

Do you just want an option (like an advanced setting) where you can choose in which container the tab will be opened? I'm asking this because of:

Clicking on it would add a new entry to enter a gesture.

which sounds similar to this https://github.com/Robbendebiene/Gesturefy/issues/197 or at least could be covered by it.

I also could imagine a popup action (upcoming feature) where you can select the container in which the url should be opened.

Reylak commented 6 years ago

Yes this looks exactly like #197 actually! Add a new action of type "Open in a new tab" or whatever, with an attached advanced setting to choose the container. Popup action is interesting too, maybe better because you would only have one action and then the user dynamically chooses which container to open the tab in.

Robbendebiene commented 6 years ago

While developing version 2.0 I looked into this and came across some problems. The main concern is that this feature requires at least 2 new permissions where one of them cannot be declared as optional. Since I tried minimizing the amount of key permissions Gesturefy needs, I won't implement this feature yet. Nevertheless I still like the idea and can imagine some good use cases, so I'll keep this issue open as a reminder.

cprn commented 2 years ago

There's an add-on that can open tabs in containers by adding a custom protocol extension. I'm pretty sure it can be used with Gesturefy's "Send message to other add-on" or "Execute user-script" actions but idk how. Made a ticket on their issue tracker as well.

It also provides a shell script to open links in containers and I use it when opening URLs from external sources (e.g. IRC, SteamChat, Discord) - it works great.

Robbendebiene commented 2 years ago

@cprn The "Send message to other add-on" command won't work here since you currently cannot get any data from the gesture target (like the link url) wherefore you cannot pass the data to another add-on. However a user script can access the target but opening a new tab via java script will most likely not work the way you want.

Robbendebiene commented 2 years ago

Just for clarification why this issue hasn't been moved forward: I'm still waiting for https://bugzilla.mozilla.org/show_bug.cgi?id=1386673 to be resolved.

adenlall commented 5 months ago

Is there any advancing in this issue

Robbendebiene commented 5 months ago

Just for clarification why this issue hasn't been moved forward: I'm still waiting for https://bugzilla.mozilla.org/show_bug.cgi?id=1386673 to be resolved.

Still applies

cprn commented 5 months ago

I'm leaving it here because I won't be working on it after all but I think it's an idea worth exploring - "open in container" seems like a perfect candidate.

We've had menus open after a gesture for quite some time (e.g. "restore tab" can display history of recently closed tabs to choose from) but we don't get them as gesture controlled menus, e.g. radial ones with 8 default directional gestures. This way it'd be possible to employ whole gesture sequences, e.g. gesture down-up for "duplicate tab", radial menu with containers appears, gesture right for "shopping" container, and so on.

Just some thoughts. Sorry if that's a SPAM for some. Will shut up now. Cheers! 🥂