thegreenwebfoundation / web-extension

The Green Web Addon based on Web Extensions
http://www.thegreenwebfoundation.org/browser-apps
MIT License
12 stars 2 forks source link

Get addon back into firefox store #32

Open arendjantetteroo opened 3 years ago

arendjantetteroo commented 3 years ago

Details: This add-on didn't pass review because of the following problems:

1) Your add-on makes use of user interactions and technical data, but is missing a control mechanism for the data collection. The control mechanism must be shown at first-run of the add-on and clearly explain the type of data collection occurring. Please see https://extensionworkshop.com/documentation/develop/best-practices-for-collecting-user-data-consents/ for more information.

nieebel commented 3 years ago

Just out of curiosity, how much effort is this? Do you have already in mind how to tackle this?

arendjantetteroo commented 3 years ago

I don't think this should take much time, the problem is a lack of time to tackle this.

We need to figure out what exactly we need to do, then implement this in the addon.

@nieebel want to help out?

nieebel commented 3 years ago

If there is anything I can do, to bring it into firefox store - I'm in :)

Do I understand the requirements correct, that we need to explain what data we are collecting and why? Are those 3 points already "our" "data collection types"? image

arendjantetteroo commented 3 years ago

In a nutshell, we grab the url of the current website (and or links on pages/search results) and distill this into the domain part. So www.example.com.

then we submit this to the api.thegreenwebfoundation.org to check if it's green or grey hosted and return a smiley to the user. Our access logs contain the ip address of the user and we can see the domains the user is browsing. We don't store this ip address or any other user identifiable information, we do store the domain requested with it's result.

So if i get the linked url correctly, if a user denies the consent, we can't show any information as we are dependent on the api results. @mrchrisadams and i have talked before about using a domain subset into a local downloadable file, so there is no api need anymore. In that case we would not collect any information at all, the addon would work completely standalone and offline even.

@mrchrisadams do you have time to guide @nieebel to help us out? You are a bit better on the data privacy front than i am and i'm really limited on time this week.

mrchrisadams commented 3 years ago

Hi @nieebel,

I've been doing some work with another designer, Lucia Ye for this, and much of the UI is designed and implemented now.

You can see the brief I set, and the designs on the miro board below:

https://miro.com/app/board/o9J_kvaKopo=/

We could do with a bit of help getting it over the line, as from memory there the blocker was finishing up how some search result pages are updated on the site.

Have you worked on a firefox plugin before? I'm happy to share some pointers, as this is soooo close to being shipped now.

nieebel commented 3 years ago

@mrchrisadams The miro board looks great!

I haven't worked on a Firefox plugin before, but just let me know at which points I should look first and I will try to get through. (Btw, I have now created a miro account, too)

mrchrisadams commented 3 years ago

ok, @nieebel, can you try running through the steps in the readme for firefox?

This here is a good starter point too:

https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension

nieebel commented 3 years ago

web-ext run works perfectly fine and I see the new "config page"!

web-ext build created a zip, which I tried to import to Firefox 78.7.0esr (64-bit) (Debian 10), but this is failing: image Or is there another way to test the "onboarding privacy" part from the micro board?

mrchrisadams commented 3 years ago

hmm, that's weird - I haven't see that before. I think there's an option to run Firefox in DEBUG mode to see if there's further info, as I'm not sure what could causing that

nieebel commented 3 years ago

Ok, let me check if I can find more info

nieebel commented 3 years ago

Ok I manged to install it via about:debugging, thanks for the DEBUG hint! :)

The app works perfectly fine, but how can I see the "onboarding privacy" part from the micro board? image Or is this one of the open items which needs to be implemented?

mrchrisadams commented 3 years ago

hi @nieebel this is one of the outstanding bits, I think - I think there is a 'firstinstall' option with the web extension, to show a view like this.

If not, I think the guidance below basically suggests doing so, so keeping track of a simple 'firstInstall' boolean might suffice, so we show that opt-in first.

https://extensionworkshop.com/documentation/develop/request-the-right-permissions/

mrchrisadams commented 3 years ago

@nieebel , what time zone are you in? It be useful to be able to use chat or similar for working this out.

I'm in Berlin, and this link below shows when I'd be able to find a block of time to run through some of the changes here:

https://calendly.com/mrchrisadams

mrchrisadams commented 3 years ago

Hi @nieebel I've had a quick look.

If you install Gesturefy as a test, you'll see a pretty good UX that we're aiming to emulate.

on install, you get taken to this installation 'page' here inside the plugin: https://github.com/Robbendebiene/Gesturefy/blob/master/src/views/installation/index.html

you can see the script that triggers it here - there's a specific on install event:

https://github.com/Robbendebiene/Gesturefy/blob/master/src/core/background.js#L170-L206


browser.runtime.onInstalled.addListener((details) => {

  // (abridged code, details omitted)

    switch (details.reason) {
      case "install":
        // show installation onboarding page
        browser.tabs.create({
          url: browser.runtime.getURL("/views/installation/index.html"),
          active: true
        });
      break;

      case "update":
        // show update notification
          displayNotification(title, updateMessage)
      break;    
    }
  });
});

Ideally we'd do the same, opening a tab in in a similar fashion. Maybe something like this:

browser.tabs.create({ url: browser.runtime.getURL("/install.html"), active: true});

If we use that to set a boolean when a user agrees, then we have the ux as outlined in miro.

Let me know if you'd like to chat more, as add-ons can be a bit confusing the first few times to work with.

UMLAUTaxl commented 3 months ago

TL;DR: The project is dead. 2.4.0 isn't even working for me. I'm thinking about rolling back to 2.3.0 and include only some of the changes.


Any progress? I would love to help but I'm just learning to code. (I'm still using 2.3.0 in my Firefox.)

Edit: I guess I could start by creating a placeholder extension that just shows the "agree" window.

Edit: I managed to build (via npm install --local ...) and then install it via about:debugging, but it doesn't work. I can view the options and select things, but when I click on Save it refreshes and everything is empty again. Is more broken? :( Loading failed for the <script> with source “moz-extension://2359bfe5-4b35-4931-b4d9-7cb74fa5a828/options.dist.js”.

Edit: And also found this:

[/usr/local/lib/node_modules/web-ext/lib/extension-runners/index.js][info] Press R to reload (and Ctrl-C to quit)
[/usr/local/lib/node_modules/web-ext/lib/firefox/index.js][debug] Firefox stderr: JavaScript error: resource://gre/modules/XULStore.sys.mjs, line 60: Error: Can't find profile directory.
[/usr/local/lib/node_modules/web-ext/lib/firefox/index.js][debug] Firefox stderr: JavaScript error: , line 0: uncaught exception: Unable to load script: moz-extension://2359bfe5-4b35-4931-b4d9-7cb74fa5a828/green-page-links.dist.js
[/usr/local/lib/node_modules/web-ext/lib/firefox/index.js][debug] Firefox stderr: JavaScript error: , line 0: uncaught exception: Unable to load script: moz-extension://2359bfe5-4b35-4931-b4d9-7cb74fa5a828/search-ecosia.dist.js
JavaScript error: , line 0: uncaught exception: Unable to load script: moz-extension://2359bfe5-4b35-4931-b4d9-7cb74fa5a828/search-ecosia.dist.js
[/usr/local/lib/node_modules/web-ext/lib/firefox/index.js][debug] Firefox stdout: Stopped devtools server on 36979
[/usr/local/lib/node_modules/web-ext/lib/firefox/remote.js][debug] Received "end" from Firefox client

Edit: It's hard to test because extensions won't show the "Add {extension}? It requires your permission to: ..." popup if you only temporarily install them via about:debugging. And the-green-web-2.4.0 won't install normally (through about:addons -> gear icon -> Install Add-on from file ...) because it says it's corrupt. Installing 2.3.0 via about:addons works and shows the "Add The Greeb Web?" popup. Testing with Firefox 115.5.0esr-1~deb12u1.

Edit: Hmm, ca--add-first-install-ux seems to already have an open-options-page-after-install but it doesn't work for me. Oh dang, this pull request is open for 2.5 years. I guess the project is dead ...