panorama-tab-groups
panorama-tab-groups copied to clipboard
Version 0.8.12 breaks Gesturefy compatibility for toggleView
Looks like the new version now supports "activate-next-group" and "activate-previous-group" but removes support to "toggleView" which was there in previous versions.
Updated Code
https://github.com/projectdelphai/panorama-tab-groups/blob/master/src/js/background.js#L156
Previous Code
https://github.com/projectdelphai/panorama-tab-groups/blob/ea50dd70a5a9179cdb95457bfb0f82363b0ca5ec/src/js/background.js#L158
I think it was necessary, but I will look into it. Could please provide more info on your use case.
This also affects FoxyGestures and any other extension that would want to trigger opening or closing the panorama view.
Previously, this would be done with the snippet:
browser.runtime.sendMessage("[email protected]", "toggle-panorama-view");
but this no longer works in the latest version
It looks like, by evaluating the new background.js file; the ability to call "toggleView()" from another extension has been removed. Please see the original post for the code locations.
Proposed fix:
https://github.com/projectdelphai/panorama-tab-groups/blob/master/src/js/background.js#L156
if (command === "activate-next-group") {
await changeActiveGroupBy(1);
} else if (command === "activate-previous-group") {
await changeActiveGroupBy(-1);
} else if (command === "toggle-panorama-view") {
await toggleView();
}
Would you please provide a step by step guide to reconstruct your environment?
It was necessary to remove the custom toggle command so the keyboard shortcut (default CTRL+SHIFT+F) could work for classic and popup view, which uses the _execute_browser_action command.
https://github.com/projectdelphai/panorama-tab-groups/blob/dee8b3aaca99228957ef7852e1b2c797fb62a08c/src/manifest.json#L20-L39
Maybe you could configure the _execute_browser_action instead of toggle-panorama-view?
Here's a step by step way to re-create:
-
Install the following gesture add-on: https://addons.mozilla.org/en-US/firefox/addon/gesturefy/?src=search
-
Go to the add-ons settings page in your browser, then to the "Gestures" section: moz-extension://7754bbb0-840d-492c-b553-d9618df7e422/views/options/html/index.html#Gestures
-
Click on the "+" circle button at the top (green color).
-
Find the top "Command" input box, click inside of it to activate a right-aligned pop-up config panel
-
In the right config panel, scroll it down all the way to the bottom, where you'll see the following option: "Send message to other add-on". Click it.
-
The side panel window will change to an input panel for setting the options for "Send message to other add-on" setting.
-
Enter "[email protected]" for setting named "Add-on ID"
-
Now enter "toggle-panorama-view" for setting named "Message".
-
Click "Save" button to close side panel
-
Add a gesture, for example, an upward movement of the mouse while holding right-click (you might need to add one that doesn't already exist)
-
Click "Save" button.
-
Open a new tab, and navigate to a random web page and test out your new gesture.
Desired Effect: The Panorama View opens Actual Effect: Nothing happens.
Try this with a previous version, and it will work.
WHY? Because you removed the link between the message of "toggle-panorama-view" to the function of "toggleView()". The above code I demonstrated will add it back again. If the "keyword" of "toggle-panorama-view" is now taken by something else for whatever reason, you can change it to something else; anything you want it doesn't matter... just as long as other plugins are able to send THAT particular message and be able to trigger the "toggleView()" function.
I forked this repo to debug and found some issues; in addition to the PR please check the following commit to see what more needs to be done to get this functionality back:
https://github.com/ttonyh/tab-groups-dashboard/commit/bc2354af74498e21d7dfc62437f23273cc331b99