Skip to content

jcchuang/core-addon

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rally

This is the Core Add-on for the Rally platform. It is implemented as a cross-browser WebExtension, using Svelte for the UI.

Rally studies are implemented as Add-ons. A study template is provided to help study authors start writing their study. A demo website landing page is also available for testing the Core Add-on.

The "source of truth" for Rally study metadata is on the Firefox remote settings server.

Get started

Build the UI

Install the dependencies...

cd ion-svelte
npm install

To run a local webserver (http://localhost:5000) for the UI which auto-reloads on file save:

npm run dev

Build the Core addon

When ready, package up for use inside the web extension:

npm run build

Build the local version of the addon:

npm run build-addon

...then start web-ext:

web-ext run

web-ext defaults to Firefox, it can be run with Chrome:

web-ext run -t chromium

To run test coverage:

npm run test-addon

To run a full integration test using Selenium, in headless browser mode:

npm run test-integration

To generate an installable extension file:

web-ext build

The output will be a .zip file in web-ext-artifacts/ - this should be renamed to .xpi for Firefox and .crx for Chrome.

Building and testing a study locally

To run an end-to-end local test with your own study add-on, first build your study (if you don't have one, you can build the Rally Study Template) and export the signed build as <name-of-study>.xpi. Edit /public/locally-available-studies.json so that sourceURI.spec is /public/<name-of-study>.xpi (you can change the other fields in /public/locally-available-studies.json as well for demo purposes as needed).

Then run:

  • npm run build
  • npm run local-build-addon
  • web-ext run

To walk through the Core Add-On experience with your study.

Testing the QA-signed extension

To test the QA-signed extension in Firefox, you must be running the Nightly release or an unbranded build (there are equivalents for Release and Beta), then navigate to about:config and create a new boolean pref named xpinstall.signatures.dev-root and set it to true.

Note: this will cause production-signed extensions (such as those from addons.mozilla.org) to not load. To allow these, set xpinstall.signatures.required pref to false.

Developing new frontend components

The Core Add-On uses Storybook to assist in isolated component work. If you're building a new component, look at the examples in /stories. To run the storybook, run npm run storybook.

About

No description, website, or topics provided.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Svelte 44.0%
  • JavaScript 42.9%
  • CSS 11.3%
  • Shell 1.5%
  • HTML 0.3%