Closed Bug 1435705 Opened 6 years ago Closed 6 years ago

Options UI hidden

Categories

(Toolkit :: Add-ons Manager, defect, P2)

All
Windows
defect

Tracking

()

VERIFIED FIXED
mozilla60
Tracking Status
firefox58 --- wontfix
firefox59 + verified
firefox60 --- verified

People

(Reporter: marius.santa, Assigned: rpl)

Details

Attachments

(4 files)

[Affected versions]:
- Firefox 58.0.1 (20180128191252)
- Firefox 59.0b6 (20180201171410)
- Firefox 60.0a1 (20180205100240)

[Affected platforms]:
- Win 7 64-bit
- Mac OS X 10.13.1

[Steps to reproduce]:
1.Install an extension that has an Options UI panel, for example: https://addons.mozilla.org/en-US/firefox/addon/colorfultabs/
2.Go to the about:addons>Extensions.
3.Click on the "More" button for the previously installed extension.

[Expected results]:
The extension's details page is displayed along with the Options UI panel.

[Actual results]:
The Options UI panel is hidden.

Notes:
This happens with other extensions as well.
It seems that after the extensions details page is opened a "refresh" is performed that triggers the hiding of the Options UI panel.
Gif is attached.
Flags: needinfo?(lgreco)
I took a look at this and the reason for the issue seems to be related to the discovery panel view,
a STR to reproduce it consistently is:

- install an extension with an options_ui page (e.g. the one linked in Comment 0)
- open the about:addons page in a tab
- open the developer tools on the about:addons page and enable the option "Disable HTTP Cache (when toolbox is open)"
- reload the about:addons tab (to be sure that the discovery panel has not been loaded yet)
- switch to the addon details of the installed extension and verify that the options_ui page is rendered as expected
- switch to the discovery panel and then switch back to the addon details view before the discovery panel has been
  loaded
- verify that the options_ui page is initially rendered, and then it is removed (as soon as the discovery panel
  loading has been completed in the background).

The options_ui page is being removed because when the discovery view loading has been completed a ViewChanged
event is sent, and the same event is also received when the user switches from the addon detail to another
about:addons view (e.g. the list of all the installed addons), and in that case we want to remove the 
options_ui rendered for the previosly selected addon:

- https://searchfox.org/mozilla-central/rev/d03ad8843e3bf2e856126bc53b0475c595e5183b/toolkit/mozapps/extensions/content/extensions.js#2176-2185
- https://searchfox.org/mozilla-central/rev/d03ad8843e3bf2e856126bc53b0475c595e5183b/toolkit/mozapps/extensions/content/extensions.js#3205-3207
Flags: needinfo?(lgreco)
I'm marking this issue as "P2 - minor" (mostly because the issue happens only when the discovery panel has not been cached yet).

I've also pushed the proposed fix attached to this issue on try (to check if it is breaking on any of the existent tests):

- https://treeherder.mozilla.org/#/jobs?repo=try&revision=1ea64e9d7d1e

None of the oranges seems to be related to this change (and they passed by re-executing them once).
Assignee: nobody → lgreco
Severity: normal → minor
Status: NEW → ASSIGNED
Priority: -- → P2
Comment on attachment 8950878 [details]
Bug 1435705 - Fix WebExtensions options_ui hidden.

Hi Andrew, do you mind to take a look at the proposed fix attached here?

Unfortunately the issue is triggered by a race condition between the first load of the discovery panel and the options ui page rendering while loading the addon detail view, and so I've not added a new test (at least not yet).
Attachment #8950878 - Flags: review?(aswan)
Comment on attachment 8950878 [details]
Bug 1435705 - Fix WebExtensions options_ui hidden.

https://reviewboard.mozilla.org/r/220128/#review226952

Looks good, thanks.  I agree that its not really feasible to add a new test for this.

::: commit-message-3ee38:3
(Diff revision 1)
> +Bug 1435705 - Fix WebExtensions options_ui hidden.
> +
> +If a user opens the about:debugging page and switches

This should say about:addons right?
Attachment #8950878 - Flags: review?(aswan) → review+
Pushed by luca.greco@alcacoop.it:
https://hg.mozilla.org/integration/autoland/rev/49f6727e3e08
Fix WebExtensions options_ui hidden. r=aswan
https://hg.mozilla.org/mozilla-central/rev/49f6727e3e08
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Is this something you think would be safe to uplift for 59? 
Is it widespread (i.e. true for any add-on with options?)
Flags: needinfo?(lgreco)
(In reply to Liz Henry (:lizzard) (needinfo? me) from comment #10)
> Is this something you think would be safe to uplift for 59? 
> Is it widespread (i.e. true for any add-on with options?)

Yes, the issue is true for any addon with options (but I'm not sure how easy is to trigger it for a real user,
because it is triggered only if the user switch to the addon details view while the discovery panel is still
loading).

My main concern is that we don't have a test for it, and so I think it would be also reasonable to have it verified by QA on Nightly asap, and then on Beta if uplifted.

The fix itself is pretty small and it should be pretty low risky, and so uplifting it sounds good to me
(and I also double-checked with Andrew about it and uplifting this fix to 59 sounds good to him too).
Flags: needinfo?(lgreco)
Sounds like an edge case, so I'll mark this as fix-optional for 59. 
Please request uplift though - we could still get this into Thursday's beta 14 build.
Flags: qe-verify+
Flags: needinfo?(lgreco)
Attached image Bug1435705.png
I can reproduce this issue with the steps from comment 1 on Firefox 58.0.2 (20180206200532) under Win 7 64-bit.

This issue is verified as fixed on Firefox 60.0a1 (20180227220155) under Windows 7 64-bit and Mac OS X 10.13.2.

Please see the attached screenshot.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
Comment on attachment 8950878 [details]
Bug 1435705 - Fix WebExtensions options_ui hidden.

Approval Request Comment

[Feature/Bug causing the regression]:

It doesn't seem to be a recent regression, based on some digging into the hg history it seems that the "ViewChanged" event listener which removes the browser XUL element which contains the addon options ui has been there since the initial version of the WebExtensions options UI (introduced in Firefox 48 by Bug 1250784, https://hg.mozilla.org/mozilla-central/diff/c058cdf47547/toolkit/mozapps/extensions/content/extensions.js#l1.164) 

[User impact if declined]:

In the Firefox Desktop about:addons page, the addon options ui embedded in the addon details view are removed if the user switches to the addon details view while the discovery panel is still loading.
It is worth to mention that we are not sure how easy is for a user to actually trigger the issue, and so this looks like an optional "nice to have fix" to cover an edge case.

[Is this code covered by automated tests?]:

The about:addons page is covered by a number of automated tests, but none of them covers this particular scenario.

[Has the fix been verified in Nightly?]:

Yes

[Needs manual test from QE? If yes, steps to reproduce]: 

Yes, the step to reproduce are described in Comment 1.

[List of other uplifts needed for the feature/fix]:

None

[Is the change risky?]:

Low risks

[Why is the change risky/not risky?]:

The risks seems to be pretty low: the change is small and restricted to a very small part of the about:addons page sources.

[String changes made/needed]:

None
Flags: needinfo?(lgreco)
Attachment #8950878 - Flags: approval-mozilla-beta?
Comment on attachment 8950878 [details]
Bug 1435705 - Fix WebExtensions options_ui hidden.

Fix for a UI regression, looks ok for uplift for beta 14.
Attachment #8950878 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attached image options ui.PNG
This issue is verified as fixed on Firefox 59.0b14 (20180301022608) under Windows 10 64-bit and Mac OS X 10.13.2.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: