Code style checking is part of CI, and PRs that do not meet the code style guidelines will not be merged. You can run these checks locally with:
npm run check-style
Please review and adhere to the naming conventions defined here
The ember-a11y addon is a dependency of this addon, and helps facilitate compliance with the guidelines laid out by the A11y Project. This requires one simple change: wherever you would normally use the {{outlet}} helper, instead use {{focusing-outlet}}. See the project page for more details.
(In Progress) We plan to use the ember-i18n addon for internationalization support in all components. The main change required here is that all blocks of text should be wrapped with the t helper supplied by this library. Read more here: https://github.com/jamesarosen/ember-i18n/wiki/Doc:-Translating-Text
We will use "pod" style structure for all of the components in this addon. This means when generating component scaffolds with ember-cli you must pass the --pod flag: ember g component my-component --pod. Basically components should be structured like:
- addon/components//
- component.js
- template.hbs
- style.scss (optional)
Leveraging the ember-component-css addon will allow us to bundle Sass files inside components' pod structure, and will automatically namespace those styles to avoid all possible CSS collisions. This approach will allow for easy overrides and paramterization via top-level Sass variables.
We aim to have near-full test coverage of the code in this addon. That said we want to avoid testing the Ember core or third-party libraries, so some general guidelines for unit tets (minumum requirements):
Models Do test:
- helper methods
- custom transforms
Components/Mixins Do test:
- methods
- computed values
Integration tests allow us to see how components behave while actually running in a browser enviornment. TODO
We will use the ember-a11y-testing addon to run a11y checks on all components.