Re-introduce "view image info" in the context menu behind a hidden (about:config) pref and enable that pref by default in devedition
Categories
(Firefox :: Menus, enhancement, P5)
Tracking
()
Tracking | Status | |
---|---|---|
firefox89 | --- | fixed |
People
(Reporter: Gijs, Assigned: asahai100, Mentored)
References
Details
(Whiteboard: [outreachy-2021-downloads][proton-context-menus])
Attachments
(1 file)
After some more discussion, wrt bug 1700239, we would like to add a hidden* pref (probably browser.menu.showViewImageInfo
or similar), and default it to true on devedition.
As a rough list of what would need to happen:
- define the pref in browser/app/profile/firefox.js , in an
#ifdef
that changes the value for devedition (like this item: https://searchfox.org/mozilla-central/rev/0e3d2eb698a51006943f3b4fb74c035da80aa2ff/browser/app/profile/firefox.js#1057 ) - we'd need to reintroduce the image info part of the markup that was removed in bug 1690029
- hide it by default
- check the pref before showing it in
initImageItems
at https://searchfox.org/mozilla-central/rev/0e3d2eb698a51006943f3b4fb74c035da80aa2ff/browser/base/content/nsContextMenu.js#544 - update context menu tests to force the pref off (so the tests also pass against devedition as-is)
- add a specific testcase that flips the pref to on that checks that we show the item if this pref is set.
We can mentor this bug as part of the outreachy contribution period, or if someone else wants to take it sooner.
(* that is, accessible in about:config but without a dedicated checkbox in about:preferences or similar UI)
Updated•4 years ago
|
Comment hidden (advocacy) |
Assignee | ||
Comment 2•4 years ago
|
||
Hi! I'm an Outreachy participant. Can I take this issue up?
Will this fix also reintroduce the "View Image" option in the context menu? I used this option very frequently and would like to have the option to re-enable it?
Reporter | ||
Comment 4•4 years ago
|
||
(In reply to pneuma07 from comment #3)
Will this fix also reintroduce the "View Image" option in the context menu?
No, this is a different issue; there was discussion about this in bug 1699128.
(In reply to Anshul Sahai from comment #2)
Hi! I'm an Outreachy participant. Can I take this issue up?
Sure!
(In reply to :Gijs (he/him) from comment #4)
(In reply to pneuma07 from comment #3)
Will this fix also reintroduce the "View Image" option in the context menu?
No, this is a different issue; there was discussion about this in bug 1699128.
(In reply to Anshul Sahai from comment #2)
Hi! I'm an Outreachy participant. Can I take this issue up?
Sure!
Thank you for the link! I'll voice my support for reverting this issue over there.
I know many people that are longing for getting back this context menu entry but are no developers. (They are forced to use chrome now for uncomplicated handling with images [also webp as gif] but originally are firefox users.)
Thank you for the plan to bring it back!!!!!
Now to my questions:
- When i it expected to come back?
- How will this feature be switched on then? I do not understand the "a hidden* pref and default it to true on devedition" part here. How can we do that as simple user and what is the devedition of firefox? Always thought, the developer edition is itegrated now?
- How will I know that the feature is back again so that I can... switch it on (however this is done)?
thanx in advance
Reporter | ||
Comment 7•4 years ago
|
||
(In reply to mozilla from comment #6)
I know many people that are longing for getting back this context menu entry but are no developers. (They are forced to use chrome now for uncomplicated handling with images [also webp as gif] but originally are firefox users.)
This bug is not the right place for this, but I don't understand what you mean by "uncomplicated handling with images". Send me email with more details?
Now to my questions:
- When i it expected to come back?
There is no date right now.
- How will this feature be switched on then? I do not understand the "a hidden* pref and default it to true on devedition" part here. How can we do that as simple user and what is the devedition of firefox? Always thought, the developer edition is itegrated now?
It will be a setting in about:config
. This setting will be set to true by default in Firefox's "Developer Edition", which is https://www.mozilla.org/firefox/channel/desktop/#developer . You could set it to true in any version of Firefox.
- How will I know that the feature is back again so that I can... switch it on (however this is done)?
When this bug is marked Resolved + Fixed.
Assignee | ||
Comment 8•4 years ago
|
||
Hey Gijs. I was working on this bug. I've a few questions.
(In reply to :Gijs (he/him) from comment #0)
- hide it by default
How do I hide it? Any hint?
- check the pref before showing it in
initImageItems
at https://searchfox.org/mozilla-central/rev/0e3d2eb698a51006943f3b4fb74c035da80aa2ff/browser/base/content/nsContextMenu.js#544
What does 'check the pref before showing it' means here?
Assignee | ||
Updated•4 years ago
|
Comment 9•4 years ago
|
||
If you look around in that file, there are examples of where showing a menu item is conditioned on a preference having a value of true. For example:
https://searchfox.org/mozilla-central/source/browser/base/content/nsContextMenu.js#643
The old code for the menu item can be found in the Firefox 78 ESR source here:
https://searchfox.org/mozilla-esr78/source/browser/base/content/nsContextMenu.js#608
So if you've created a preference named browser.menu.showViewImageInfo
then the new code might look like this (however, it's just a guess):
// View Image Info defaults to false, user can enable
var showViewImageInfo =
this.onImage &
Services.prefs.getBoolPref("browser.menu.showViewImageInfo", false);
this.showItem("context-viewimageinfo", showViewImageInfo);
Reporter | ||
Comment 10•4 years ago
|
||
(In reply to Anshul Sahai from comment #8)
How do I hide it? Any hint?
You can set hidden="true"
in the markup of the menuitem in browser-context.inc
.
- check the pref before showing it in
initImageItems
at https://searchfox.org/mozilla-central/rev/0e3d2eb698a51006943f3b4fb74c035da80aa2ff/browser/base/content/nsContextMenu.js#544What does 'check the pref before showing it' means here?
Take a look at jscher's comment (thanks!) - basically we only want to show the item if the pref value is true. Note that you will want to use &&
not &
to combine the two conditions for showing the item (the other condition being that we're opening the context menu on an image).
Assignee | ||
Comment 11•4 years ago
|
||
Comment 12•4 years ago
|
||
Comment 13•4 years ago
|
||
bugherder |
Assignee | ||
Comment 14•4 years ago
|
||
Hi Gijs. Any suggestions on what I can take up next after this? I learned so much through this bug. Thanks!
Comment 15•4 years ago
|
||
(In reply to Anshul Sahai from comment #14)
Hi Gijs. Any suggestions on what I can take up next after this? I learned so much through this bug. Thanks!
You didn't ask me, but in my opinion, making the same change for "View Page Info" could please a lot of users. This is the bug that removed it from Firefox 88 (releasing tomorrow):
https://bugzilla.mozilla.org/show_bug.cgi?id=1692553
I don't think there is a bug to add it back yet.
Comment 16•4 years ago
|
||
Thank you very much for doing this!!! Can't wait till firefox 89
How will I find the setting in this future release to turn this on, what will be its name? (And how will I know what it will be called in german?) :)
thanks again!
Comment 17•4 years ago
|
||
How will I find the setting in this future release to turn this on, what will be its name? (And how will I know what it will be called in german?) :)
It's browser.menu.showViewImageInfo in about:config. There are no translations for about:config options.
Reporter | ||
Comment 18•4 years ago
|
||
(In reply to jscher2000 from comment #15)
(In reply to Anshul Sahai from comment #14)
Hi Gijs. Any suggestions on what I can take up next after this? I learned so much through this bug. Thanks!
You didn't ask me, but in my opinion, making the same change for "View Page Info" could please a lot of users. This is the bug that removed it from Firefox 88 (releasing tomorrow):
jscher, thanks for trying to help. This bug to reintroduce the view image info got filed because given the feedback in bug 1700239 and the dependent bugs, we felt that doing so was warranted and would help the people who miss it. We haven't reached a similar conclusion for view page info, and so it's not really a good idea for people to start work on it at this time.
(In reply to Anshul Sahai from comment #14)
Hi Gijs. Any suggestions on what I can take up next after this? I learned so much through this bug. Thanks!
Anshul: perhaps you'd like to look at bug 1656573?
Comment hidden (off-topic) |
Assignee | ||
Comment 20•4 years ago
|
||
(In reply to jscher2000 from comment #15)
(In reply to Anshul Sahai from comment #14)
Hi Gijs. Any suggestions on what I can take up next after this? I learned so much through this bug. Thanks!
You didn't ask me, but in my opinion, making the same change for "View Page Info" could please a lot of users. This is the bug that removed it from Firefox 88 (releasing tomorrow):
https://bugzilla.mozilla.org/show_bug.cgi?id=1692553
I don't think there is a bug to add it back yet.
As Gijs already said, the bug still requires some discussion before it gets added back but thank you so much for trying to help. :)
(In reply to :Gijs (he/him) from comment #18)
Anshul: perhaps you'd like to look at bug 1656573?
I'd love to take this one up and try my hands on it.
Comment hidden (off-topic) |
Comment hidden (off-topic) |
Comment hidden (advocacy, me-too) |
Comment 28•4 years ago
|
||
Hi,
following your instructions, I've just set browser.menu.showViewImageInfo = true
in about:config
.
Sadly, no change appears: I still can't see "image info" in context menu.
I'm using Firefox 88 on Windows 7 in Italian language (perhaps that's the problem?).
Can I try something else to get that important original functionality back again?
Thanks a lot for your answers!
Comment 29•4 years ago
|
||
Sorry, I should have mentioned that this is fixed in Firefox 89 (current release is 88). The about:config change won't have an effect on Firefox 88.
Firefox 89 will be in release on June 1st, or it's available in the beta channel.
Comment 30•4 years ago
|
||
Oh, ok... I can't wait for June 1st then!
In the meantime, I'll go ahead with an older Firefox version (in my business, I absolutely need to quickly see size, alt text and resulting height of the processed images). Thank you very much for your answers!
Comment 31•4 years ago
|
||
In the meantime, I'll go ahead with an older Firefox version
There are many good reasons not to use an outdated Firefox version, even not for a short period of time:
https://www.mozilla.org/en-US/security/advisories/mfsa2021-16/
https://www.mozilla.org/en-US/security/advisories/mfsa2021-20/
Comment 32•4 years ago
|
||
(In reply to Marok from comment #30)
Oh, ok... I can't wait for June 1st then!
If you try my extension, perhaps you won't even care any more when the old feature returns. ;-)
https://addons.mozilla.org/firefox/addon/view-image-info-reborn/
Comment 33•3 years ago
|
||
I've just upgraded to 89.0, everything went ok... and it works fine! Thanks a lot!
88 has been a really unlucky number for Firefox, but 89 is excellent!
Thanks everybody in the community!
Comment 34•3 years ago
|
||
You upgraded to 89.0 and everything went okay?
You didn't have to do anything else - like change some setting, make some adjustment I guess.
It just started working with 89.0, right?
Comment 35•3 years ago
|
||
(In reply to Jose Ibarra from comment #34)
You upgraded to 89.0 and everything went okay?
You didn't have to do anything else - like change some setting, make some adjustment I guess.
In Firefox 89, you need to switch browser.menu.showViewImageInfo
from false to true through the about:config preference editor: https://support.mozilla.org/kb/about-config-editor-firefox
Comment 36•3 years ago
|
||
First of all: Thank you for bringing this back.
I updated to 89 and switched on browser.menu.showViewImageInfo.
Now the context menu entry is back, but if you click it, it needs a full second (counting 21-22) to show the image info every time.
Is there a possibility to speed this up so that the functionallity works as it did before removing it?
Comment 37•3 years ago
|
||
Also from me many thanks for bringing this back.
@Ama: for me the image info pops up immediately.
Reporter | ||
Comment 38•3 years ago
|
||
(In reply to Ama from comment #36)
Now the context menu entry is back, but if you click it, it needs a full second (counting 21-22) to show the image info every time.
Is there a possibility to speed this up so that the functionallity works as it did before removing it?
The implementation is exactly the same as before. File a separate bug with more details about where you're seeing this slowness (what website, what images, etc. - detailed steps), and use the profiler ( https://profiler.firefox.com/ ) to get a performance profile of what is happening in that second, to figure out what is going on.
Comment 39•3 years ago
|
||
(In reply to Jose Ibarra from comment #34)
You upgraded to 89.0 and everything went okay?
You didn't have to do anything else - like change some setting, make some adjustment I guess.
It just started working with 89.0, right?
As I wrote before, I've set browser.menu.showViewImageInfo = true
in about:config
.
I didn't experience any slowdown in the menu, and I can see again all relevant data (like resulting image width/height in the page, after code processing, the size in bytes and so on).
PS: thanks jscher2000 for the extension "view-image-info-reborn", too! If yesterday something went wrong with the upgrade, I knew that not all would have been lost and I really appreciated it.
Of course, best thing is that Firefox 89 fixed the problem!
Description
•