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 installTo run a local webserver (http://localhost:5000) for the UI which auto-reloads on file save:
npm run devWhen ready, package up for use inside the web extension:
npm run buildBuild the local version of the addon:
npm run build-addon...then start web-ext:
web-ext runweb-ext defaults to Firefox, it can be run with Chrome:
web-ext run -t chromiumTo run test coverage:
npm run test-addonTo run a full integration test using Selenium, in headless browser mode:
npm run test-integrationTo generate an installable extension file:
web-ext buildThe 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 buildnpm run local-build-addonweb-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.requiredpref 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.