Closed Bug 1382572 Opened 7 years ago Closed 7 years ago

The options_ui are displayed in the detail page of the WebExtension only after a refresh of the web page

Categories

(WebExtensions :: Android, defect, P2)

56 Branch
All
Android
defect

Tracking

(firefox56 verified, firefox57 verified)

VERIFIED FIXED
mozilla56
Tracking Status
firefox56 --- verified
firefox57 --- verified

People

(Reporter: cbadescu, Assigned: rpl)

References

Details

Attachments

(3 files)

Attached image options_ui.gif
[Affected versions]:
- Firefox 56.0a1 (2017-07-19) 

[Affected platforms]:
- Android 6.0.1

[Steps to reproduce]:
1.Install https://adons-dev.allizom.org/en-US/firefox/addon/option-ui-for-android/ 
2.Open the about:addons page.
3.Tap on the installed WebExtension.

[Expected results]:
- The options_ui are displayed for the installed WebExtension.

[Actual results]:
- The options_ui are displayed for the installed WebExtension only after a refresh of the web page.

[Additional notes]:
- This issue reproduces constantly.
- Please see the attached video for this issue.
Priority: -- → P2
Depends on: 1380575
Assignee: nobody → lgreco
Status: NEW → ASSIGNED
Comment on attachment 8891343 [details]
Bug 1382572 - Display Android options_ui of newly installed WebExtensions when about:addons is opened.

https://reviewboard.mozilla.org/r/162542/#review167892

::: mobile/android/chrome/content/aboutAddons.js:363
(Diff revision 1)
>      optionsBox.innerHTML = "";
>  
>      switch (parseInt(addon.optionsType)) {
>        case AddonManager.OPTIONS_TYPE_INLINE_BROWSER:
> -        this.createWebExtensionOptions(optionsBox, optionsURL, addon.optionsBrowserStyle);
> +        // WebExtensions are loaded asynchronously and the optionsURL can be
> +        // not yet available once the add-on has been installed,

OptionsURL may not be available via listitem when the add-on has just been installed, but it is available on the addon if one is set.

::: mobile/android/chrome/content/aboutAddons.js:370
(Diff revision 1)
> +        // optionsURL if available.
> +        detailItem.setAttribute("optionsURL", addon.optionsURL);
> +        this.createWebExtensionOptions(optionsBox, addon.optionsURL, addon.optionsBrowserStyle);
>          break;
>        case AddonManager.OPTIONS_TYPE_INLINE:
>          this.createInlineOptions(optionsBox, optionsURL, aListItem);

same issue here?  Should we just ignore getting it from aListItem and always get it from addon?
Comment on attachment 8891343 [details]
Bug 1382572 - Display Android options_ui of newly installed WebExtensions when about:addons is opened.

https://reviewboard.mozilla.org/r/162542/#review167910

r+ with comment fix.
Attachment #8891343 - Flags: review?(mixedpuppy) → review+
Pushed by luca.greco@alcacoop.it:
https://hg.mozilla.org/integration/autoland/rev/d7e7ebb85f9e
Display Android options_ui of newly installed WebExtensions when about:addons is opened. r=mixedpuppy
https://hg.mozilla.org/mozilla-central/rev/d7e7ebb85f9e
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Attached image options_ui2.gif
This issue is verified as fixed on Fennec 57.0a1 (2017-08-14) and Fennec 56.0b1 under Android 6.0.1. 

The options_ui of newly installed extensions are displayed when about:addons is opened.
Status: RESOLVED → VERIFIED
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.