Closed Bug 1702013 Opened 4 years ago Closed 4 years ago

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)

Desktop
All
enhancement

Tracking

()

RESOLVED FIXED
89 Branch
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:

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)

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?

(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!

Assignee: nobody → asahai100

(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:

  1. When i it expected to come back?
  2. 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?
  3. How will I know that the feature is back again so that I can... switch it on (however this is done)?

thanx in advance

Flags: needinfo?(gijskruitbosch+bugs)

(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:

  1. When i it expected to come back?

There is no date right now.

  1. 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.

  1. 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.

Flags: needinfo?(gijskruitbosch+bugs)

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?

What does 'check the pref before showing it' means here?

Flags: needinfo?(gijskruitbosch+bugs)

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);

(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 .

What 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).

Flags: needinfo?(gijskruitbosch+bugs)
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/233b9ab693fa Re-introduce "view image info" in the image context menu in an about:config pref and enable that pref by default in devedition. r=Gijs,fluent-reviewers
Regressions: 1705518
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch

Hi Gijs. Any suggestions on what I can take up next after this? I learned so much through this bug. Thanks!

(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.

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!

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.

(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?

Flags: needinfo?(asahai100)

(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.

Flags: needinfo?(asahai100)

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!

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.

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!

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/

(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/

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!

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?

(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

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?

Flags: needinfo?(asahai100)

Also from me many thanks for bringing this back.
@Ama: for me the image info pops up immediately.

(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.

Flags: needinfo?(asahai100)

(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!

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: