|
1 |
| -# Contributing to Xamarin Community Toolkit |
| 1 | +# Contributing |
2 | 2 |
|
3 |
| -The foundation of **Xamarin Community Toolkit** is simplicity and follow similar practices from the [UWP Community Toolkit](https://github.com/Microsoft/UWPCommunityToolkit). |
| 3 | +Thanks you for your interest in contributing to Xamarin Community Toolkit! In this document we'll outline what you need to know about contributing and how to get started. |
4 | 4 |
|
5 |
| -A developer should be able to quickly and easily learn to use the API. |
| 5 | +## Code of Conduct |
6 | 6 |
|
7 |
| -Simplicity and a low barrier to entry are must-have features of every API. If you have any second thoughts about the complexity of a design, it is almost always much better to cut the feature from the current release and spend more time to get the design right for the next release. |
| 7 | +Please see our [Code of Conduct](CODE_OF_CONDUCT.md). |
8 | 8 |
|
9 |
| -You can always add to an API, you cannot ever remove anything from one. If the design does not feel right, and you ship it anyway, you are likely to regret having done so. |
| 9 | +## Prerequisite |
10 | 10 |
|
11 |
| -That's why many of the guidelines of this document are obvious and serve only one purpose: Simplicity. |
| 11 | +You will need to complete a Contribution License Agreement before any pull request can be accepted. Complete the CLA at https://cla2.dotnetfoundation.org/. |
12 | 12 |
|
13 |
| -## A good pull request |
14 |
| -Every contribution has to come with: |
15 | 13 |
|
16 |
| -* Before starting coding, **you should open an issue** and start discussing with the community to see if your idea/feature is interesting enough. |
17 |
| -* A documentation page in the [documentation folder](docs/). Once validated your documentation will be visible [here](http://formscommunitytoolkit.readthedocs.io/en/latest/). |
18 |
| -* A sample for the [Sample app]() (If applicable). |
19 |
| -* Unit tests (If applicable). |
20 |
| -* You tested your code with latest stable brandch of Xamarin and UWP SDK 10586 and SDK 14393. |
21 |
| -* PR has to target dev branch. |
| 14 | +## Documentation - mdoc |
22 | 15 |
|
23 |
| -PR has to be validated by at least two core members before being merged. |
| 16 | +This project uses [mdoc](http://www.mono-project.com/docs/tools+libraries/tools/monodoc/generating-documentation/) to document types, members, and to add small code snippets and examples. mdoc files are simple xml files and there is an msbuild target you can invoke to help generate the xml placeholders. |
24 | 17 |
|
25 |
| -Once merged, you can get a pre-release package of the toolkit be adding the appveyor [NuGet feed](https://ci.appveyor.com/nuget/formscommunitytoolkit). |
| 18 | +Read the [Documenting your code with mdoc wiki page](wiki/Documenting-your-code-with-mdoc) for more information on this process. |
26 | 19 |
|
27 |
| -## Quality insurance for pull requests for controls |
28 |
| -We encourage developers to follow the following guidances when submitting pull requests for controls: |
29 |
| - * Your control must be usable and efficient with keyboard only. |
30 |
| - * Tab order must be logical. |
31 |
| - * Focused controls must be visible. |
32 |
| - * Action must be triggered when hitting Enter key. |
33 |
| - * Do not use custom colors but instead rely on theme colors so high contrasts themes can be used with your control. |
34 |
| - * Add AutomationProperties.Name on all controls to define what the controls purpose (Name is minimum, but there are some other things too that can really help the screen reader). |
35 |
| - * Don't use the same Name on two different elements unless they have different control types. |
| 20 | +Every pull request which affects public types or members should include corresponding mdoc xml file changes. |
36 | 21 |
|
37 |
| -You can find more information about these topics [here](https://blogs.msdn.microsoft.com/winuiautomation/2015/07/14/building-accessible-windows-universal-apps-introduction) |
38 | 22 |
|
39 |
| -This is to help as part of our effort to build an accessible toolkit. |
| 23 | +### Bug Fixes |
40 | 24 |
|
41 |
| -## General rules |
| 25 | +If you're looking for something to fix, please browse [open issues](https://github.com/xamarin/XamarinCommunityToolkit/issues). |
42 | 26 |
|
43 |
| -* DO NOT require that users perform any extensive initialization before they can start programming basic scenarios. |
44 |
| -* DO provide good defaults for all values associated with parameters, options, etc. |
45 |
| -* DO ensure that APIs are intuitive and can be successfully used in basic scenarios without referring to the reference documentation. |
46 |
| -* DO communicate incorrect usage of APIs as soon as possible. |
47 |
| -* DO design an API by writing code samples for the main scenarios. Only then, you define the object model that supports those code samples. |
48 |
| -* DO NOT use regions. DO use partial classes instead. |
49 |
| -* DO declare static dependency properties at the top of their file. |
50 |
| -* DO NOT seal controls. |
51 |
| -* DO use extension methods over static methods where possible. |
52 |
| -* DO NOT return true or false to give sucess status. Throw exceptions if there was a failure. |
53 |
| -* DO use verbs like GET. |
54 |
| -* DO NOT use verbs that are not already used like fetch. |
| 27 | +Follow the style used by the [.NET Foundation](https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/coding-style.md), with two primary exceptions: |
55 | 28 |
|
56 |
| -## Naming conventions |
57 |
| -* We are following the coding guidelines of [.NET Core Foundational libraries](https://github.com/dotnet/corefx/blob/master/Documentation/coding-guidelines/coding-style.md). |
| 29 | +- We do not use the `private` keyword as it is the default accessibility level in C#. |
| 30 | +- We will **not** use `_` or `s_` as a prefix for internal or private field names |
| 31 | +- We will use `camelCaseFieldName` for naming internal or private fields in both instance and static implementations |
58 | 32 |
|
59 |
| -## Documentation |
60 |
| -* DO NOT expect that your API is so well designed that it needs no documentation. No API is that intuitive. |
61 |
| -* DO provide great documentation with all APIs. |
62 |
| -* DO use readable and self-documenting identifier names. |
63 |
| -* DO use consistent naming and terminology. |
64 |
| -* DO provide strongly typed APIs. |
65 |
| -* DO use verbose identifier names. |
| 33 | +Read and follow our [Pull Request template](https://github.com/xamarin/XamarinCommunityToolkit/blob/master/PULL_REQUEST_TEMPLATE.md) |
66 | 34 |
|
67 |
| -## Files and folders |
68 |
| -* DO associate no more than one class per file. |
69 |
| -* DO use folders to group classes based on features. |
| 35 | +### Proposals |
| 36 | + |
| 37 | +To propose a change or new feature, review the guidance below and then [open an issue using this template](https://github.com/xamarin/XamarinCommunityToolkit/issues/new). |
| 38 | + |
| 39 | +#### Non-Starter Topics |
| 40 | +The following topics should generally not be proposed for discussion as they are non-starters: |
| 41 | + |
| 42 | +* Large renames of APIs |
| 43 | +* Large non-backward-compatible breaking changes |
| 44 | +* Platform-Specifics which can be accomplished without changing Xamarin Community Toolkit |
| 45 | +* Avoid clutter posts like "+1" which do not serve to further the conversation |
| 46 | + |
| 47 | +#### Proposal States |
| 48 | +##### Open |
| 49 | +Open proposals are still under discussion. Please leave your concrete, constructive feedback on this proposal. +1s and other clutter posts which do not add to the discussion will be removed. |
| 50 | + |
| 51 | +##### Accepted |
| 52 | +Accepted proposals are proposals that both the community and core XamarinCommunityToolkit agree should be a part of XamarinCommunityToolkit. These proposals are ready for implementation, but do not yet have a developer actively working on them. These proposals are available for anyone to work on, both community and the core XamarinCommunityToolkit team. |
| 53 | + |
| 54 | +If you wish to start working on an accepted proposal, please reply to the thread so we can mark you as the implementor and change the title to In Progress. This helps to avoid multiple people working on the same thing. If you decide to work on this proposal publicly, feel free to post a link to the branch as well for folks to follow along. |
| 55 | + |
| 56 | +###### What "Accepted" does mean |
| 57 | +* Any community member is welcome to work on the idea. |
| 58 | +* The core XamarinCommunityToolkit team _may_ consider working on this idea on their own, but has not done so until it is marked "In Progress" with a team member assigned as the implementor. |
| 59 | +* Any pull request implementing the proposal will be welcomed with an API and code review. |
| 60 | + |
| 61 | +###### What "Accepted" does not mean |
| 62 | +* The proposal will ever be implemented, either by a community member or by the core XamarinCommunityToolkit team. |
| 63 | +* The core XamarinCommunityToolkit team is committing to implementing a proposal, even if nobody else does. Accepted proposals simply mean that the core XamarinCommunityToolkit team and the community agree that this proposal should be a part of XamarinCommunityToolkit. |
| 64 | + |
| 65 | +##### In Progress |
| 66 | +Once a developer has begun work on a proposal, either from the core XamarinCommunityToolkit team or a community member, the proposal is marked as in progress with the implementors name and (possibly) a link to a development branch to follow along with progress. |
| 67 | + |
| 68 | +#### Rejected |
| 69 | +Rejected proposals will not be implemented or merged into XamarinCommunityToolkit. Once a proposal is rejected, the thread will be closed and the conversation is considered completed, pending considerable new information or changes. |
0 commit comments