Skip to content
This repository was archived by the owner on Apr 14, 2026. It is now read-only.

Latest commit

 

History

History
57 lines (33 loc) · 2.61 KB

File metadata and controls

57 lines (33 loc) · 2.61 KB

Style/Conventions

Checking your code

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

Naming conventions

Please review and adhere to the naming conventions defined here

Accessibility

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.

Internationalization

(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

Components

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)

Styling components

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.

Testing

Unit tests

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

Integration tests allow us to see how components behave while actually running in a browser enviornment. TODO

Accessibility checks

We will use the ember-a11y-testing addon to run a11y checks on all components.