Skip to content
This repository has been archived by the owner on Apr 27, 2023. It is now read-only.

Commit

Permalink
Merge branch 'release-v1.3.6' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
rhelmer committed Dec 8, 2021
2 parents 00d1547 + e3f9943 commit 7698866
Show file tree
Hide file tree
Showing 15 changed files with 1,091 additions and 409 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Unreleased changes

[Full changelog](https://github.com/mozilla-rally/core-addon/compare/v1.3.5...master)
[Full changelog](https://github.com/mozilla-rally/core-addon/compare/v1.3.6...master)

# v1.3.6 (2021-12-08)

[Full changelog](https://github.com/mozilla-rally/core-addon/compare/v1.3.5...v1.3.6)
* [#752](https://github.com/mozilla-rally/rally-core-addon/pull/752): Stop prompting for onboarding when studies are side-loaded.
* [#753](https://github.com/mozilla-rally/rally-core-addon/pull/753): Add consent form for themarkup Facebook Pixel Hunt extension

# v1.3.5 (2021-10-15)

Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"author": "Mozilla",
"manifest_version": 2,
"name": "Mozilla Rally",
"version": "1.3.5",
"version": "1.3.6",
"homepage_url": "https://github.com/mozilla-rally/rally-core-addon",
"icons": {
"48": "public/img/rally-favicon.svg",
Expand Down
1,328 changes: 962 additions & 366 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rally_core",
"version": "1.3.5",
"version": "1.3.6",
"type": "module",
"scripts": {
"prebuild": "node scripts/setupTaskcluster.js",
Expand All @@ -11,7 +11,7 @@
"glean": "npm run glean-metrics && npm run glean-docs",
"glean-metrics": "glean translate ./metrics.yaml ./pings.yaml -f javascript -o public/generated",
"glean-docs": "glean translate ./metrics.yaml ./pings.yaml -f markdown -o docs",
"lint": "npm run build && npm-run-all lint-*",
"lint": "npm run --silent skip-taskcluster || (npm run build && npm-run-all lint-*)",
"lint-addon": "web-ext --config=web-ext-config.cjs lint",
"lint-css": "stylelint 'public/*.css' '.storybook/*.css' 'src/**/*.svelte' 'stories/**/*.svelte'",
"lint-glean": "glean glinter ./metrics.yaml ./pings.yaml",
Expand All @@ -30,19 +30,19 @@
"watch-webext": "web-ext --config=web-ext-config.cjs run --watch-file public/build/build.js --watch-file public/addon-build/background.js --watch-file public/addon-build/content-script.js"
},
"devDependencies": {
"@babel/core": "^7.14.6",
"@babel/core": "^7.16.0",
"@mozilla-protocol/core": "^12.1.0",
"@mozilla/glean": "^0.18.1",
"@rollup/plugin-commonjs": "^19.0.1",
"@rollup/plugin-node-resolve": "^13.0.2",
"@rollup/plugin-replace": "^3.0.0",
"@storybook/addon-actions": "^6.2.9",
"@storybook/addon-actions": "^6.3.12",
"@storybook/addon-essentials": "^6.2.9",
"@storybook/addon-links": "^6.3.4",
"@storybook/addon-links": "^6.3.12",
"@storybook/svelte": "^6.3.4",
"archiver": "^5.3.0",
"babel-loader": "^8.2.2",
"core-js": "^3.15.1",
"core-js": "^3.19.1",
"eslint": "^7.29.0",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-mocha": "^9.0.0",
Expand Down
59 changes: 59 additions & 0 deletions src/routes/irbs/FacebookPixelHuntConsent.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
<!-- This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. -->

<p>You are joining the Facebook Pixel Hunt, a study by Mozilla Rally and The Markup.</p>

<p>
The Markup will use the browsing data collected in this study to map
Facebook’s tracking pixel network across the web. You can always find more
information about <a
href="https://rally.mozilla.org/current-studies/facebook-pixel-hunt/index.html"
target="_blank">this study</a
>
on the Rally website. The Markup will publish its findings as news stories at
<a href="https://themarkup.org" target="_blank">themarkup.org</a>.
</p>

<h2>Leaving the Study</h2>
<p>
You can leave the study at any time from the Mozilla Rally options page. To
access the page, click on the Rally button <img
style="padding: 0 4px;"
width="16"
src="img/rally-toolbar-icon.svg"
alt="rally icon"
/>
in your browser toolbar.
</p>

<style>
h1,
h2,
p {
color: var(--irb-text-color, var(--color-marketing-gray-70));
}
h1 {
font-size: 24px;
font-family: "Zilla Slab", -apple-system, BlinkMacSystemFont, "Segoe UI",
Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji",
"Segoe UI Emoji", "Segoe UI Symbol";
margin-bottom: 28px;
}
h2 {
font-size: 16px;
font-weight: 700;
line-height: 24px;
margin-bottom: 8px;
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
"Segoe UI Symbol";
}
p {
font-size: 14px;
line-height: 21px;
margin-bottom: 20px;
}
</style>
4 changes: 3 additions & 1 deletion src/routes/irbs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
import PrincetonCovidDisinformationIRB from "./PrincetonCovidDisinformationIRB.svelte";
import RS01Consent from "./RS01Consent.svelte";
import StanfordBeyondThePaywallIRB from "./StanfordBeyondThePaywallIRB.svelte";
import FacebookPixelHuntConsent from "./FacebookPixelHuntConsent.svelte";

export default {
"[email protected]": PrincetonCovidDisinformationIRB,
"[email protected]": RS01Consent,
"[email protected]": StanfordBeyondThePaywallIRB
"[email protected]": StanfordBeyondThePaywallIRB,
"[email protected]": FacebookPixelHuntConsent,
}
21 changes: 20 additions & 1 deletion stories/flow/MainFlowView.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,29 @@ const additionalMockPartnerStudy = {
studyDetailsLink: '/'
}
const anotherMockPartnerStudy = {
addonId: '[email protected]',
name: "Yet Another Collaborator Study",
authors: {
name: "A Partner"
},
icons: {
64: undefined
},
endDate: new Date('2021-07-03'),
tags: ['advertising', 'news'],
privacyPolicy: {spec: 'https://example.com'},
description: `This is another mock study that utilizes the 'Facebook Pixel Hunts' IRB consent.`,
dataCollectionDetails: ['page views', 'time and date of joining study', 'etc.'],
detailsDirectName: "Rally Website",
studyDetailsLink: '/'
}
fetch('locally-available-studies.json')
.then(r => r.json())
.then(s => {
mockStore.set({...get(mockStore), availableStudies: [nicerStudy, mockAcademicPartnerStudy, additionalMockPartnerStudy, ...s]});
mockStore.set({...get(mockStore), availableStudies: [nicerStudy, mockAcademicPartnerStudy, additionalMockPartnerStudy, anotherMockPartnerStudy, ...s]});
});
setContext("rally:store", mockStore);
Expand Down
14 changes: 14 additions & 0 deletions stories/irb/FacebookPixelHuntConsent.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<script>
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
import ConsentNotice from "../../src/routes/irbs/FacebookPixelHuntConsent.svelte";
import IRBWindow from "../../src/routes/irbs/IRBWindow.svelte";
</script>

<div style="--height: 700px;">
<IRBWindow>
<ConsentNotice />
</IRBWindow>
</div>
5 changes: 5 additions & 0 deletions stories/irb/irb.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import PrincetonIRBStory from './PrincetonIRB.svelte';
import StanfordBeyondThePaywallIRBStory from "./StanfordBeyondThePaywallIRB.svelte"
import RS01ConsentStory from './RS01Consent.svelte';
import FacebookPixelHuntStory from './FacebookPixelHuntConsent.svelte';
export default {
title: "IRB Components",
};
Expand All @@ -20,3 +21,7 @@ export const StanfordBeyondThePaywallIRB = () => ({
export const RS01Consent = () => ({
Component: RS01ConsentStory,
});

export const FacebookPixelHunt = () => ({
Component: FacebookPixelHuntStory,
});
8 changes: 8 additions & 0 deletions support/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Unreleased changes

# v0.7.1 (2021-12-03)

* [#752](https://github.com/mozilla-rally/rally-core-addon/pull/752): Stop prompting for onboarding when studies are side-loaded.

# v0.7.0 (2021-06-13)

* [#656] Pre-format manifest.json in a way AMO is happy with.

# v0.6.0 (2021-04-20)

* [550](https://github.com/mozilla-rally/rally-core-addon/pull/550): Do not use extension ID as namespace, breaks the `rally.js` API (constructor arg change)
Expand Down
2 changes: 1 addition & 1 deletion support/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion support/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mozilla/rally",
"version": "0.7.0",
"version": "0.7.1",
"description": "The Rally partner support library.",
"main": "rally.js",
"type": "module",
Expand Down
2 changes: 0 additions & 2 deletions support/rally.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */

const CORE_ADDON_ID = "[email protected]";
const SIGNUP_URL = "https://rally.mozilla.org/rally-required";

export const runStates = {
RUNNING: "running",
Expand Down Expand Up @@ -71,7 +70,6 @@ export class Rally {

// The Core Add-on was not found and we're not in developer
// mode.
await browser.tabs.create({ url: SIGNUP_URL });
return false;
});

Expand Down
31 changes: 4 additions & 27 deletions tests/core-addon/integration/consent.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,32 +34,21 @@ describe("side-loaded studies found before Rally installs", function () {
let studyInstalled = await utils.isAddonInstalled(this.driver, studyInstallId);
assert.ok(studyInstalled);

// Installing the study will open an "Install Rally" page.
// Once it's opened, close it.
await this.driver.wait(async () => {
return (await this.driver.getAllWindowHandles()).length === 2;
}, utils.WAIT_FOR_PROPERTY);
const openedTabs = await this.driver.getAllWindowHandles();
await this.driver.switchTo().window(openedTabs[1]);
await this.driver.close();
await this.driver.switchTo().window(openedTabs[0]);

await utils.installRally(this.driver);
await utils.joinRally(this.driver);

await this.driver.wait(until.elementLocated(By.css("button")));
await utils.findAndAct(this.driver, By.xpath(`//button[text()="Join Study"]`), e => e.click());

// The following operation will reject because we cannot install
// an add-on, through a link, from the disk. It's fine, we don't
// care about this problem in this test, so just catch the network
// error.
assert.rejects(
utils.findAndAct(this.driver, By.xpath(`(//button[text()="Join Study"])[2]`), e => e.click())
);

await this.driver.uninstallAddon(studyInstallId);

// Clicking "Join" must have triggered the uninstallation of
// the existing study.
studyInstalled = await utils.isAddonInstalled(this.driver, studyInstallId);
Expand Down Expand Up @@ -96,22 +85,10 @@ describe("side-loaded studies found before Rally installs", function () {
let studyInstalled = await utils.isAddonInstalled(this.driver, studyInstallId);
assert.ok(studyInstalled);

// Installing the study will open an "Install Rally" page.
// Even though the Rally Core Add-on is installed, the study
// is not joined.
// Once it's opened, close it.
await this.driver.wait(async () => {
return (await this.driver.getAllWindowHandles()).length === 3;
}, utils.WAIT_FOR_PROPERTY);
const openedTabs = await this.driver.getAllWindowHandles();
await this.driver.switchTo().window(openedTabs[2]);
await this.driver.close();
await this.driver.switchTo().window(openedTabs[1]);

// Make sure to find the "join" button on the study page.
await this.driver.wait(until.elementLocated(By.css("button")));
await utils.findAndAct(this.driver, By.xpath(`//button[text()="Join Study"]`), e => e.click());

await this.driver.quit();
});
});
2 changes: 0 additions & 2 deletions tests/support/rally.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ describe('Rally', function () {
() => {},
)
);

assert.ok(chrome.tabs.create.calledOnce);
});

it('must export the list of valid run states', function () {
Expand Down

1 comment on commit 7698866

@firefoxci-taskcluster
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Uh oh! Looks like an error! Details

Taskcluster-GitHub attempted to create a task for this event with the following scopes:

["assume:repo:github.com/mozilla-rally/rally-core-addon:tag:v1.3.6","queue:route:checks","queue:scheduler-id:taskcluster-github"]

The expansion of these scopes is not sufficient to create the task, leading to the following:

Client ID static/taskcluster/github does not have sufficient scopes and is missing the following scopes:

assume:repo:github.com/mozilla-rally/rally-core-addon:branch:v1.3.6

This request requires the client to satisfy the following scope expression:

{
  "AllOf": [
    "assume:repo:github.com/mozilla-rally/rally-core-addon:branch:v1.3.6",
    "queue:route:checks",
    "queue:route:index.xpi.v2.rally-core-addon.revision.7698866a9903bfe1b57ef1ecfe8cdf683dbec337.taskgraph.decision",
    "queue:create-task:project:none",
    "queue:scheduler-id:xpi-level-1",
    {
      "AnyOf": [
        "queue:create-task:highest:xpi-1/decision",
        "queue:create-task:very-high:xpi-1/decision",
        "queue:create-task:high:xpi-1/decision",
        "queue:create-task:medium:xpi-1/decision",
        "queue:create-task:low:xpi-1/decision",
        "queue:create-task:very-low:xpi-1/decision",
        "queue:create-task:lowest:xpi-1/decision"
      ]
    }
  ]
}

  • method: createTask
  • errorCode: InsufficientScopes
  • statusCode: 403
  • time: 2021-12-08T09:25:00.529Z

Please sign in to comment.