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

implement toolbar icon context menu #161

Open
balmas opened this issue Nov 12, 2018 · 6 comments
Open

implement toolbar icon context menu #161

balmas opened this issue Nov 12, 2018 · 6 comments

Comments

@balmas
Copy link
Member

balmas commented Nov 12, 2018

@monzug reports that the different browsers provide inconsistent behavior on a right click (or equivalent) on the Alpheios toolbar icon:

As per toolbar menu, we have Alpheios Reading tool (beta) that takes to the Alpheios.net site in Chrome, with tools active or not. in Firefox, we have -Activate -Info when tools are not active and -Deactivate -Open Panel't -Info when tools are active. We should implement the same changes as per context menu.
The inconsistency between context menu and toolbar menu is Alpheios Reading tools that in Chrome toolbar menu links to the Alpheios site.

screen shot 2018-11-06 at 3 18 44 pm

I don't know if the webextension api or its equivalent on MacOS offer any way to control this behavior. Assigning to @irina060981 to investigate.

@irina060981
Copy link
Member

irina060981 commented Nov 13, 2018

Hello, @monzug and @balmas !
I have made some investigation and there are two variants of using icon popup: default (as it is now) and we can design and add our own html with css and even js.
here it is a documentation for that - https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/browser_action
It could be done with the help of manifest and additional html/css/js

I have created a quick example to test it:
Chrome
image

Firefox
image

Manifest settings:

"browser_action": {
....
"default_popup": "popup.html"
}

popup.html

<h1 style="color: #dd0000;">Alpheios Reading Tools</h1>

So we could spend some time and make the same simple popup for Chrome, Firefox and even Safari, I think.

@balmas
Copy link
Member Author

balmas commented Nov 13, 2018

Ok, this is helpful. I am inclined to postpone a decision on what should go in this menu and make it a part of the concept redesign that (I think) we will be undergoing. @monzug if you have suggestions for what you would like to see in this menu though please make them!

@balmas balmas changed the title can we control the context menu on the toolbar icon? implement toolbar icon context menu Nov 13, 2018
@balmas balmas assigned monzug and unassigned irina060981 and monzug Nov 13, 2018
@monzug
Copy link

monzug commented Nov 13, 2018

  1. fix the link that takes to Alpheios site in Chrome
  2. be consistent with context menu (e.g. Activate Info)

@irina060981
Copy link
Member

@balmas and @monzug , I am sorry, but I have misled you both.
The described workflow changes the click LEFT mouse button , not right - and it changes NOT context menu - but the simple click - that can give popup.
So the right answer - I didn't find the way to define context menu for toolbar icon.

@balmas
Copy link
Member Author

balmas commented Nov 14, 2018

ah, okay. well that makes things simpler :-) I think we might have to live with what the browser puts here.

@balmas
Copy link
Member Author

balmas commented Nov 15, 2018

I'm going to mark this deferred for now.

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

No branches or pull requests

3 participants