Skip to content

Commit

Permalink
Update contribution guide and pull request template
Browse files Browse the repository at this point in the history
  • Loading branch information
shobhitagarwal1612 committed May 16, 2018
1 parent 3888ae3 commit 8771b8f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ https://github.com/opendatakit/collect/blob/master/CONTRIBUTING.md

#### Before submitting this PR, please make sure you have:
- [ ] run `./gradlew pmd checkstyle lint findbugs` and confirmed all checks still pass.
- [ ] verified that any new UI elements use theme colors so that they work with both light and dark themes.
- [ ] verified that any new UI elements use theme colors. [UI Components Style guidelines](https://github.com/opendatakit/collect/blob/master/CONTRIBUTING.md#ui-components-style-guidelines)
12 changes: 11 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,19 @@ Small fixes that target very particular bugs may occasionally be merged without

In addition to contributing code, you can help to triage issues. This can include reproducing bug reports, or asking for vital information such as version numbers or reproduction instructions. If you would like to start triaging issues, one easy way to get started is to [subscribe to opendatakit/collect on CodeTriage](https://www.codetriage.com/opendatakit/collect).

## Style guidelines
## Code Style guidelines
Follow the [Android style rules](http://source.android.com/source/code-style.html) and the [Google Java style guide](https://google.github.io/styleguide/javaguide.html).

## UI Components Style guidelines
Ensure that the added UI components are compatible with both light and dark themes.
Follow the below points to get the color for coloring the UI components like text and icons instead of directly using color values (eg. #000000 or R.color.colorName).

UI Component | Java | Xml _(layouts, drawables, vectors)_:
--- | --- | ---
text color | themeUtils.getPrimaryTextColor() | ?primaryTextColor
accent color | themeUtils.getAccentColor() | ?colorAccent
icon color | themeUtils.getIconColor() | ?iconColor

## Strings
Always use [string resources](https://developer.android.com/guide/topics/resources/string-resource.html) instead of literal strings. This ensures wording consistency across the project and also enables full translation of the app. Only make changes to the base `res/values/strings.xml` English file and not to the other language files. The translated files are generated from [Transifex](https://www.transifex.com/opendatakit/collect/) where translations can be submitted by the community. Names of software packages or other untranslatable strings should be placed in `res/values/untranslated.xml`.

Expand Down

0 comments on commit 8771b8f

Please sign in to comment.