Open Stoaac opened 1 year ago
FoxyTab menu is handled by Firefox based on menus.ContextType being "tab"
. FoxyTab has no control over it.
It appears wherever ContextType
"tab"
is present.
Does standard Tab context-menu appear on Sideberry Tabs?
It does not. Is there a workaround to this? What is the ContextType of the Sideberry tabs? Can I switch what ContextType FoxyTabs works with?
Those are not tabs. They are actually a list with the details copied from the tabs. Firefox doesn't recognize them as tabs.
However, I have seen some other extensions do it.
See also: #575
Yes, I used to use TST, and I read the issue prior to opening this new one, but I'm not interested in going back since Sideberry is so much more potent.
Let me ask another way. First let me make a glossary for the terms I'm about to make up for the sake of the question: Glossary
Questions
I know very VERY little about coding, but I imagine the code says something along these lines: <FoxyTabs: If right-click on ContextType "Tabs," then dropdown DefaultBrowserContextMenu>
I'm sure this is FAR from accurate, but my logic tells me that this is essentially what's happening in the code. So my question is: Can we make it say something like this instead: <FoxyTabs: If "Combination-Click" on "Sideberry Links," then dropdown DefaultBrowserContextMenu>
Also, I would like to mention that SingleFile does interpret the Sideberry "Links" as tabs, as you can see in the video I attached. If SingleFile can do it, why not FoxyTabs? https://github.com/erosman/support/assets/126362441/307c6f97-b436-4c6e-9ab8-ef734c64e77c
What ContextType do these Sideberry "links" fall under?
In browsers, menus.ContextType affects not only where a context-menu appears but also the data that is passed when clicked i.e. menus.OnClickData.
Data provided when a link is clicked, or an image is clicked or text clicked etc differs from when a tab-strip is clicked.
Is it possible to edit something within the FoxyTabs code to make the extension interact with the Sideberry "links" instead of the Firefox tabs?
Unfortunately, it is not possible.
What ContextType do these Sideberry "links" fall under?
In browsers, menus.ContextType affects not only where a context-menu appears but also the data that is passed when clicked i.e. menus.OnClickData.
Data provided when a link is clicked, or an image is clicked or text clicked etc differs from when a tab-strip is clicked.
Sorry, I don't see how that answers my question. I understand that different context menus appear for different content types. I want to know what a Sideberry "tab" is if it's not a tab or a link. What is the damn thing? XD XD
Is there anything to say about different context menus popping up when you right-click while holding down the SHIFT key?
Is it possible to edit something within the FoxyTabs code to make the extension interact with the Sideberry "links" instead of the Firefox tabs?
Unfortunately, it is not possible.
If it's not possible, then what exactly is to blame? Is it the fact that the FoxyTabs code is not accessible, or is it the Firefox browser code that's not accessible? Is it something else entirely?
Wouldn't the solution be something as simple as adding the following instructions to the FoxyTabs Code
FoxyTab adds a menu to the standard tab-context-menu and then Firefox shows it. You can ask the Sideberry etc why the standard Firefox context-menu doesn't appear on their tabs/links/whatever. If it did, FoxyTab would have also appeared there. There is nothing that FoxyTab can do to make another extension show the tab-context-menu.
To finalise, the issue is "Firefox Not Recognizing Sideberry Tabs" and that is something for Sideberry Tabs to sort out.
Goooot it! Thank you very much for your help!
If you follow the link https://github.com/mbnuqw posted in his reply, you'll see that Sidebery does, in fact, use the ContextType
tab
(browser.menus.overrideContext({ context: 'tab', tabId: tab.id }))
https://github.com/mbnuqw/sidebery/issues/1195#issuecomment-1701278691
Above is a link to the entire conversation, which is a short one in which I realized that all my add-ons work with Sidebery, except FoxyTabs.
So, what is the issue? After enabling "Use native context menu" in Sideberry, FoxyTab menu appears..
So, what is the issue? After enabling "Use native context menu" in Sideberry, FoxyTab menu appears..
I've configured everything on my Sidebery to be a certain way, including the context menu. I switched it, but I prefer Sidebery's context menu so I switched it back. The problem is that I want to be able to access the FoxyTabs options using Shift+Right-Click
, but I'm not able to. I understand the workaround, but why does the specific problem in question exist, and why are other add-ons showing their menu options when I Shift+Right-Click
?
why are other add-ons showing their menu options when I
Shift+Right-Click
?
- Other extensions' context-menu show on different context (e.g.
image
, notcontext: 'tab'
)- Adding
context: 'tab'
toShift+Right-Click
should be discussed with Sideberry
Sideberry show 2 types of context-menu:
Use native context menu = off
Right-Click
shows Sideberry's own context-menu
Shift+Right-Click
shows default image
context-menu
Use native context menu = on (context: 'tab'
)
Right-Click
shows Tab context-menu
context: 'tab'
context: 'tab'
(those data are not available in other context
)@erosman Understood. Thank you for your patience, it is very much appreciated!
What I still don't understand is how the "Multi-Account Containers" is able to show up in that Shift+Right-Click
menu when it's an add-on which functions based on tabs. By the way, the Shift+Right-Click
menu is not solely for contextType
image
, but also for pages.
https://github.com/mbnuqw/sidebery/issues/1195#issuecomment-1703785488 - Ok, now I understand the issue. It's impossible for addon to handle and configure context-menu event fired with
Shift+Right-Click
, which is a direct purpose ofShift+Right-Click
- forcefully show context menu for the page. So, when youShift+Right-Click
on sidebery (doesn't matter what area) browser think you right-clicked on the page and shows you a context menu with options of addons that work on normal web-pages.
Maybe Firefox's "Multi-Account Containers" doesn't base it's function on tabs, but if that's the case then it's confusing how it could open tabs in containers and have all sorts of rules for contextType
tab
. I'm assuming its functionality is based on tabs, so I'm wondering why an add-on that interacts with contextType
tab
is able to show its menu options in the forced context menu, but FoxyTabs isn't.
Again, I appreciate your patience and knowledge on the matter!
Actually, I tested it now.
It is not a problem to make FoxyTab context-menu show on page
in Sideberry sidebar (Shift+Right-Click
), however the necessary data is missing.
page
context, pageUrl
shows the Sidberry internal page, and tab data is missing.context: 'tab'
)info
{
"menuItemId": "copyTitle",
"parentMenuItemId": "copy",
"viewType": "sidebar",
"editable": false,
"pageUrl": "https://github.com/erosman/support/issues/589",
"frameUrl": "moz-extension://4d3...77442cef04/sidebar/index.html",
"modifiers": [],
"button": 0
}
tab
{
"id": 35,
"index": 8,
"windowId": 1,
"highlighted": true,
"active": true,
"attention": false,
"pinned": false,
"status": "complete",
"hidden": false,
"discarded": false,
"incognito": false,
"width": 1386,
"height": 965,
"lastAccessed": 1693678417893,
"audible": false,
"autoDiscardable": true,
"mutedInfo": {
"muted": false
},
"isArticle": false,
"isInReaderMode": false,
"sharingState": {
"camera": false,
"microphone": false
},
"successorTabId": 36,
"cookieStoreId": "firefox-default",
"url": "https://github.com/erosman/support/issues/589",
"title": "FoxyTabs Not Recognizing Sideberry Tabs · Issue #589 · erosman/support",
"favIconUrl": "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzIiIHZpZXdCb3g9Ij...."
}
context: 'page'
)info
{
"menuItemId": "copyTitle",
"parentMenuItemId": "copy",
"viewType": "sidebar",
"frameId": 0,
"editable": false,
"targetElementId": 102516,
"pageUrl": "moz-extension://4d3...77442cef04/sidebar/index.html",
"modifiers": [],
"button": 0
}
tab
null
* **tab**
null
This means that the necessary data needs to be added by Sideberry, then?
This means that the necessary data needs to be added by Sideberry, then?
No, Firefox doesn't add the data when a click is generated from an extension's internal page (the sidebar). Firefox does provide it from a normal web page (like this GitHub page) though.
Incidentally, as part of another issue (https://github.com/w3c/webextensions/issues/431#issuecomment-1717898144), we have been discussing the provision of tab
data and it will relate to this issue as well, if implemented.
Is there a way to allow FoxyTabs to recognize my Sideberry tabs as actual tabs yet?
I customized the Firefox browser CSS file to get rid of the horizontal tabs toolbar, so that I can only use the vertical Sideberry sidebar, which is the coolest most efficient and productive solution I have found for tab management.
For this reason I do not wish to bring back the original tabs format, so I am willing to do anything to keep using Sideberry, and not willing to do anything that will stop me from using Sideberry.
Any help is greatly appreciated!