From f795f1ae7cf9f7a57b3c1e8f8f5a960931d0f342 Mon Sep 17 00:00:00 2001 From: Dan Chadwick Date: Thu, 17 Mar 2016 21:52:45 -0400 Subject: [PATCH] CONTRIBUTING.md, initial commit, WIP. --- CONTRIBUTING.md | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 5 +++-- 2 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..7439cda6d --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,54 @@ +# Contributing to ember-paper + +## Coordination, communication and community + +Many ember-paper contributor hang out on the [ember-paper channel on slack](https://embercommunity.slack.com/messages/ember-paper/). Not a slack user? [Get your invitation.](https://ember-community-slackin.herokuapp.com/) + +## Coding style + +* ember-paper uses the [ember-suave](https://github.com/DockYard/ember-suave) coding style. + +* Before submitting a pull request, +check for coding style issues with `jscs -c .jscsrc app addon`. + +## Actions + +* Action closures are preferred to strings representing action names. + +* Properties representing an action should be camelCased, e.g. `onClose`, rather than `on-close`. + +## Importing + +* Import the module, then use const object destructing to extract the desired methods. For example, +```javascript +import Ember from 'ember'; +const { computed } = Ember; +``` + +* When the destructured object assignment statement exceeds 80 columns, put each variable it its own line: +```javascript +const { + $, + Mixin, + String: { htmlSafe }, + RSVP: { Promise }, + computed, + on, + inject: { service }, + run: { scheduleOnce } +} = Ember; +``` +* Order the imported variables in order of appearance, or other logical order. + +## Converting components from Angular Material + +* Use an ember-paper name for components. Convert angular elements attributes to ember boolean properties. +```javascript + +``` +becomes +```javascript +{{paper-tabs dynamicHeight=true borderBottom=true}} +``` + +* Seek to provide feature parity using Angular Material styles, but implemented in an Ember-centric way. diff --git a/README.md b/README.md index a34d9981d..73e349b74 100644 --- a/README.md +++ b/README.md @@ -41,9 +41,10 @@ We also need to allow `data:` in `img-src` because of a [current hack](https://g You can find out more information on the CSP addon page [here](https://github.com/rwjblue/ember-cli-content-security-policy#ember-cli-content-security-policy). -## Contribution +## Contributing This is a very ambitious project. Google's design specs are extensive, and not trivial to implement. `ember-paper` is heavily based on [Angular Material](https://github.com/angular/material) and [Web Starter Kit (material-sprint branch)](https://github.com/google/web-starter-kit/tree/material-sprint). These seem to be the most useful resources at the moment. If you feel like porting or fixing an element or two, please drop a pull request or issue at GitHub! +I believe that with the help of everyone we can bring these amazing design spec to Ember in a modular and robust way. The Ember way. -I believe that with the help of everyone we can bring these amazing design spec to Ember in a modular and robust way. The Ember way. **Help us on Github!** +Read our [Contributing Guide](CONTRIBUTING.md) and **help us on Github!**