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

Add enable/disable to popup menu #92

Open
ericjung opened this issue Jul 31, 2020 · 8 comments
Open

Add enable/disable to popup menu #92

ericjung opened this issue Jul 31, 2020 · 8 comments
Labels
feature request New feature or request

Comments

@ericjung
Copy link
Collaborator

From email to me:

Hi. FoxyProxy Firefox addon is a great tool and I've used it for months. Thanks for the great tool.

There is an inconvenient thing within the addon though, when I want to enable/disable proxy, I have to click on FoxyProxy addon icon, then wait for it to show dialog, and finally select proxy. I have only one proxy configured within FoxyProxy, so I hope I can have a "click to switch" feature, turn on/off proxy by simply clicking on the addon icon (without selecting proxy profile by using proxy config dialog box).

I hope my suggestion can be accepted, and thanks for reading!

@erosman
Copy link
Collaborator

erosman commented Jul 31, 2020

That can cause complications for people who don't want such behaviour.

However, there is an alternative approach which is toolbar icon content-menu.

It is easy to add a context-menu to the toolbar where user can right-click on the icon and select a menu.

Note that a maximum of six such context-menus are allowed for toolbars and they are best for actions that are fixed.
For example:
Enable/Disable
Open Options page

@ericjung
Copy link
Collaborator Author

So you do not think on/off switch in the popup is a good idea? (Just like we have in options.html)

@erosman
Copy link
Collaborator

erosman commented Jul 31, 2020

I was talking about enable/disable which in case of FoxyProxy only disable can be done since enable entails more selection.

You can have a context-menu (not simple click) to disable (Turn Off) on the toolbar icon.

Here is an example of toolbar context-menu for one on my add-ons.

image

@ericjung
Copy link
Collaborator Author

a maximum of six such context-menus are allowed for toolbars and they are best for actions that are fixed.

Is it possible to add submenus like in the pre-Quantum days? (FoxyProxy had a context-menu that was dynamically generated from the list of proxies)

@erosman
Copy link
Collaborator

erosman commented Jul 31, 2020

Is it possible to add submenus like in the pre-Quantum days?

Max Six top menus and as many sub-menus as you want.

(FoxyProxy had a context-menu that was dynamically generated from the list of proxies)

IMHO, it is not best suited to dynamically generated browserAction menus. It is good for static menus. Dynamic menus would be the same as loading the toolbar icon pop-up which is more versatile for that purpose. There would also be a delay since context-menu has to be stopped until the storage data is retrieved asynchronously and then context-menu updated with that data.

@G2159687
Copy link

G2159687 commented Aug 1, 2020

Email author here. Thanks for looking into this.

I think erosman's alternative approach is great too, adding additional on/off option to right-click context menu will be better than current pop-up dialog method a lot for me. If "click to switch" will cause complications then right-click should be better a lot.

To clarify, the current pop-up method is acceptable, but it becomes annoying when someone needs to change proxy settings frequently, especially after the reduction of column height in a certain update and the change of proxies order in the latest update.

@erosman erosman added the feature request New feature or request label Sep 11, 2022
@erosman
Copy link
Collaborator

erosman commented Sep 22, 2023

Proxy On/Off Options

1. Popup (current)

  • requires 2 clicks: click toolbar icon to show popup + click to select

Additional Requirements

  • none

2. Toolbar Icon Context-menu

  • requires 2 clicks: right-click toolbar icon to show menu + click to select
  • Not possible on Android

Additional Requirements

  • "contextMenus" permission and event listener
  • Update context-menu regularly to reflect changes to the proxy settings
  • Maximum 6 context-menu entires are permitted

3. Toolbar Icon On/Off

  • requires 1 clicks
  • Only useful for users that use a single option (e.g. proxy or pattern) all the time

Additional Requirements

  • Extra process to differentiate click to open popup from click to toggle on/off
  • Create options UI to select what that on/off is meant to do
    • Pattern on & disable
    • Defined proxy on & disable

Conclusion

Bearing in mind that the feature would only apply to a very limited number of users, and the extra processes involved to avoid a single click (2 vs 1 click), the feature would be worthwhile if there is a popular demand for it.

@erosman
Copy link
Collaborator

erosman commented Oct 4, 2023

Keyboard shortcut feature is being added to v8.1 which can be an alternative method to enable/disable proxies in FoxyProxy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants