105 web extension only #52

Merged
merged 2 commits into from Dec 19, 2017

Conversation

Projects
None yet
3 participants
Member

gregglind commented Dec 18, 2017

  • change to webExtension only
  • changes puzzle trailhead by removing preference
  • simplified readme / testplan.
Contributor

pdehaan commented Dec 18, 2017

While we're cleaning house, we may want to remove a bunch of the dependencies and devDependencies that are no longer used.


UPDATE: I think these may be the minimum required packages:

{
  "name": "pug-addon",
  "description": "Augmented Reality Game Experience",
  "version": "1.0.5",
  "author": "Mozilla Gregg Lind <glind@mozilla.com>",
  "bugs": {
    "url": "https://github.com/mozilla/addon-wr/issues"
  },
  "devDependencies": {
    "eslint": "^4.7.2",
    "eslint-plugin-import": "^2.5.0",
    "eslint-plugin-json": "^1.2.0",
    "eslint-plugin-mozilla": "^0.4.4",
    "eslint-plugin-no-unsanitized": "^2.0.1",
    "nsp": "^2.8.1",
    "web-ext": "^2.2.2"
  },
  "homepage": "http://github.com/mozilla/addon-wr",
  "keywords": [
    "mozilla",
    "firefox"
  ],
  "license": "MIT",
  "repository": {
    "type": "git",
    "url": "git://github.com/mozilla/addon-wr.git"
  },
  "scripts": {
    "eslint": "eslint addon --ext=js,json",
    "nsp": "nsp check",
    "web-ext-lint": "web-ext lint -s addon/webextension",
    "web-ext-run": "web-ext run -s addon/webextension"
  }
}
Member

gregglind commented Dec 18, 2017

package.json
- "description": "MY REALITY IS JUST DIFFERENT THAN YOURS.\n\nLooking Glass is a collaboration between Mozilla and the makers of Mr. Robot to provide a shared world experience. Are you a fan of Mr. Robot? If so, join the hunt for answers!\n\nParticipating in this shared world experience requires explicit user opt in. If you are not actively participating in the ARG (Augmented Reality Game) no modifications will be made to Firefox.\n\nhttps://support.mozilla.org/kb/lookingglass",
- "bugzilla": "<tbd: bug to attach for signing>",
- "iconPath": "icon.png"
- },
"bugs": {
"url": "https://github.com/gregglind/addon-wr/issues"
@pdehaan

pdehaan Dec 18, 2017

Contributor

nit: gregglind => mozilla

@@ -48,21 +33,15 @@
"homepage": "http://github.com/gregglind/addon-wr",
@pdehaan

pdehaan Dec 18, 2017

Contributor

nit: gregglind => mozilla

Left in-line comments for you. All minor.

README.md
-1. `npm run build`. Built addons go in `dist/`
-2. `addon/` contains all files that go into the Embedded WebExtension
-3. `bin/xpi.sh` zips up the addon directory into the addon.
+1. `addon/` contains all files that go into the Embedded WebExtension
@biancadanforth

biancadanforth Dec 18, 2017

Collaborator

Nit: Just a regular web extension now

TESTPLAN.md
- 2. Preference TRUE :: yes `X_1057` header.
+ 2. Always yes `X_1057` header.
- set PREFERENCE to `true`
@biancadanforth

biancadanforth Dec 18, 2017

Collaborator

There is no preference now, right?

TESTPLAN.md
Notes:
- 1. IFF you are running from `web-ext`, it will behave as though the pref is true.
- 2. We don't have a good 'un-test' for showing the header isn't sent *everywhere*. It's contolled by `addon/webextension/{manifest.json,background.js}`
+ 1. We don't have a good 'un-test' for showing the header isn't sent *everywhere*. It's contolled by `addon/webextension/{manifest.json,background.js}`
@biancadanforth

biancadanforth Dec 18, 2017

Collaborator

They could pick a random page and inspect the request headers for the first GET request (requesting the page) in the Network tab in devtools (may be too involved); this would only show one instance of it NOT being there.

1. **Omnipresent page modifications**
Goal: See that the page modification effect exists IFF the pref is enabled.
- General effect: for specific words like privacy and control, they will appear flipped, then after 2-6 seconds, revert. A hover box will exist for each with a link to SUMO.
+ General effect: for specific words like privacy and control, they will appear flipped, then after 2-6 seconds, revert. A hover box will exist (for another 5 seconds) for each with a link to SUMO.
@biancadanforth

biancadanforth Dec 18, 2017

Collaborator

This effect duration still seems very shortlived. I'm not sure what the right length is, but most people won't get past the "above the fold" content in 2-6 seconds.

@gregglind

gregglind Dec 19, 2017

Member

That's a fair critique.

## build and run
-npm run firefox
+web-ext run
@pdehaan

pdehaan Dec 18, 2017

Contributor

We may need to add npm install web-ext -g to some list of prerequisites.

Conversely, add web-ext to devDependencies, and then we can do some package.json scripts to run the web-ext run and web-ext lint commands from the locally install web-ext module.


UPDATE: I think the package.json scripts would be something like these:

"lint": "web-ext lint -s addon/webextension",
"run": "web-ext run -s addon/webextension",

Then we can call the scripts using npm run run and npm run lint.

package.json
- "harness_test": "export XPI=dist/linked-addon.xpi && mocha test/functional_tests.js --retry 2 --reporter json",
- "sign": "echo 'TBD, see: https://bugzilla.mozilla.org/show_bug.cgi?id=1407757'",
- "test": "export XPI=dist/linked-addon.xpi && npm run build && mocha test/functional_tests.js --retry 2"
+ "eslint": "eslint addon --ext jsm --ext js --ext json"
@pdehaan

pdehaan Dec 18, 2017

Contributor

Minor, but I don't think we have any *.jsm files in this repo, we can probably simplify this to:

"eslint addon --ext=js,json"
addon/webextension/manifest.json
+ },
+ "description": "MY REALITY IS JUST DIFFERENT THAN YOURS.\n\nLooking Glass is a collaboration between Mozilla and the makers of Mr. Robot to provide a shared world experience. Are you a fan of Mr. Robot? If so, join the hunt for answers!\n\nParticipating in this shared world experience requires explicit user opt in. If you are not actively participating in the ARG (Augmented Reality Game) no modifications will be made to Firefox.\n\nhttps://support.mozilla.org/kb/lookingglass",
+
+ "version": "1.0.5",
@pdehaan

pdehaan Dec 19, 2017

Contributor

Do we want to add an icon for about:addons so we don't have the default puzzle piece?

add-ons_manager

@gregglind

gregglind Dec 19, 2017

Member

I don't have an asset there. Noted.

Fix #51, v1.0.5, web extension only
Fix #49 Fix #50

- Moved code to 'addon'
- fix all linting errors
- remove dependencies in package.json
- updated all docs

@gregglind gregglind merged commit 6f31685 into master Dec 19, 2017

@@ -7,11 +7,10 @@
npm install
## build
-npm run eslint
-npm run build
+cd addon/webextension
@pdehaan

pdehaan Dec 19, 2017

Contributor

Is this still true, or did you just remove the "webextension/" subfolder?

Member

gregglind commented Dec 19, 2017

updated on master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment