mozilla / addons

☂ Umbrella repository for Mozilla Addons ✨
Other
127 stars 41 forks source link

Implement install-confirmation UI #9696

Closed designakt closed 8 years ago

designakt commented 8 years ago

138946213 To confirm the installation of an add-on users enabled using disco pane we will be showing a confirmation using UITour. _After discussion in #560 I realized that work has started on this by requesting access to UITour, but I couldn't find any bugs for further work on it._

muffinresearch commented 8 years ago

There was no mention of UI tour in here: http://addons.readthedocs.io/en/latest/ux/disco-pane.html so it would be good to add something there to define what we're aiming for.

Re-reading the request access bug [1] I see the new domains aren't setup yet. So that's the first blocker. That requires a new platform bug to be filed.

Secondly does the API for uitour already do what we need? E.g. does the API actually do what we want or does that require platform changes? I've tried using the testingOrigins it's unclear how to use it. I've tried sending events but nothing appears to do anything even on services.addons.m.o.

E.g:

document.dispatchEvent(new CustomEvent('mozUITour', {
    bubbles: true,
    detail: {
      action: 'showHighlight',
      data: {
        target: 'bookmarks',
      }
    }
}));

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1256598

mstriemer commented 8 years ago

I managed to get one working on https://discovery.addons.mozilla.org. The styling isn't quite right but maybe we can fix that. Looks like there is some documentation at http://bedrock.readthedocs.io/en/latest/uitour.html but I just skimmed parts of it.

screenshot 2016-06-09 16 55 05
document.dispatchEvent(new CustomEvent('mozUITour', {
    bubbles: true,
    detail: {
      action: 'showInfo',
      data: {
        target: 'devtools',
icon: 'https://addons-dev-cdn.allizom.org/user-media/addon_icons/1/1865-64.png?modified=1460371219',
text: 'Click here to access Adblock Plus any time.',
title: 'Installed and added to toolbar',
buttons: [{label: 'Ok', callbackID: 'closeabp'}],
      }
    }
}));
andymckay commented 8 years ago

Permission should be there, but there isn't a way of pointing at the button that gets added. We can point at the hamburger menu or other buttons, but not specifically at the button.

mstriemer commented 8 years ago

@designakt where should the "Learn more" link go?

designakt commented 8 years ago

@mstriemer Will we be able to stop add-ons from opening a tab on install, and show our dialog instead? https://bugzilla.mozilla.org/show_bug.cgi?id=1264239

And do we know the link to the pages add-ons open on install?

If at least the second is true, the "learn more" link should go next to the OK Button. For the first implementation in the old design a link to the left of the OK should be enough.

A more flexible version if this UI is still in the making. see https://github.com/mozilla/addons/issues/112

muffinresearch commented 8 years ago

This is reopened since it requires a permission change: I've filed a platform bug here: https://bugzilla.mozilla.org/show_bug.cgi?id=1281847

Looks like we need about:addons listed as a uitour origin.

muffinresearch commented 8 years ago

Actually I'm going to close this since we have a more concise separate bug about it here: mozilla/addons#9718