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.
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
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.
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.
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 tofalse
.
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
.