From e56abc007d16a34d4ee22a7846d9124b233fc18b Mon Sep 17 00:00:00 2001 From: Michael Gordeev Date: Fri, 31 Jan 2020 23:20:40 +0300 Subject: [PATCH 1/6] Updated README.md --- README.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 57fcfbb..c49fd6c 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,14 @@ [![Build Status](https://dev.azure.com/xfox111/GitHub%20CI/_apis/build/status/XFox111.GUTSchedule?branchName=master)](https://dev.azure.com/xfox111/GitHub%20CI/_build/latest?definitionId=8&branchName=master) ![Continious Delivery Pipeline](https://vsrm.dev.azure.com/xfox111/_apis/public/Release/badge/e42c572c-a3cd-4aac-bbb1-f720d9ccb5ea/1/5) -![GitHub release (latest by date)](https://img.shields.io/github/v/release/xfox111/GUTSchedule) -![GitHub issues](https://img.shields.io/github/issues/xfox111/GUTSchedule) +[![GitHub release (latest by date)](https://img.shields.io/github/v/release/xfox111/GUTSchedule)](https://github.com/xfox111/gutschedule/releases/latest) +[![GitHub issues](https://img.shields.io/github/issues/xfox111/GUTSchedule)](https://github.com/xfox111/GUTSchedule/issues) [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) ![GitHub repo size](https://img.shields.io/github/repo-size/xfox111/GUTSchedule?label=Repository%20size) ![Platforms](https://img.shields.io/badge/platforms-android-lightgrey) -![Twitter Follow](https://img.shields.io/twitter/follow/xfox111?style=social) -![GitHub followers](https://img.shields.io/github/followers/xfox111?label=Follow%20@xfox111&style=social) +[![Twitter Follow](https://img.shields.io/twitter/follow/xfox111?style=social)](https://twitter.com/xfox111) +[![GitHub followers](https://img.shields.io/github/followers/xfox111?label=Follow%20@xfox111&style=social)](https://github.com/xfox111) ## Overview Android application which exports SPbSUT timetable to calendar @@ -25,12 +25,12 @@ There are many ways in which you can participate in the project, for example: - Review documentation and make pull requests for anything from typos to new content If you are interested in fixing issues and contributing directly to the code base, please see the [Contribution Guidelines](https://github.com/XFox111/GUTSchedule/blob/master/CONTRIBUTION.md), which covers the following: -- [How to build and run from source](https://github.com/XFox111/GUTSchedule/CONTRIBUTION.md#build-and-run-project) -- [The development workflow](https://github.com/XFox111/GUTSchedule/CONTRIBUTION.md#development-workflow), including debugging and running tests -- [Coding guidelines](https://github.com/XFox111/GUTSchedule/CONTRIBUTION.md#coding-guidelines) -- [Submitting pull requests](https://github.com/XFox111/GUTSchedule/CONTRIBUTION.md#submitting-pull-requests) -- [Finding an issue to work on](https://github.com/XFox111/GUTSchedule/CONTRIBUTION.md#finding-an-issue-to-work-on) -- [Contributing to translations](https://github.com/XFox111/GUTSchedule/CONTRIBUTION.md#contributing-to-translations) +- [How to build and run from source](https://github.com/XFox111/GUTSchedule/blob/master/CONTRIBUTION.md#build-and-run-project) +- [The development workflow](https://github.com/XFox111/GUTSchedule/blob/master/CONTRIBUTION.md#development-workflow), including debugging and running tests +- [Coding guidelines](https://github.com/XFox111/GUTSchedule/blob/master/CONTRIBUTION.md#coding-guidelines) +- [Submitting pull requests](https://github.com/XFox111/GUTSchedule/blob/master/CONTRIBUTION.md#submitting-pull-requests) +- [Finding an issue to work on](https://github.com/XFox111/GUTSchedule/blob/master/CONTRIBUTION.md#finding-an-issue-to-work-on) +- [Contributing to translations](https://github.com/XFox111/GUTSchedule/blob/master/CONTRIBUTION.md#contributing-to-translations) ## Code of Conduct This project has adopted the Contributor Covenant. For more information see the [GUTSchedule Code of Conduct](https://github.com/XFox111/GUTSchedule/blob/master/CODE_OF_CONDUCT.md) From a92442debfa452ece9ea021bbd665796181dd1f8 Mon Sep 17 00:00:00 2001 From: Michael Gordeev Date: Fri, 31 Jan 2020 23:32:27 +0300 Subject: [PATCH 2/6] Rename CONTRIBUTION.md to CONTRIBUTING.md --- CONTRIBUTION.md => CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename CONTRIBUTION.md => CONTRIBUTING.md (99%) diff --git a/CONTRIBUTION.md b/CONTRIBUTING.md similarity index 99% rename from CONTRIBUTION.md rename to CONTRIBUTING.md index 96243f9..08f7d02 100644 --- a/CONTRIBUTION.md +++ b/CONTRIBUTING.md @@ -81,4 +81,4 @@ If you are interested in writing code to fix issues you can follow this guidelin Your contributions to open source, large or small, make great projects like this possible. Thank you for taking the time to contribute. ## Attribution -This Contribution Guidelines are adapted from the [Contributing to VS Code](https://github.com/microsoft/vscode/blob/master/CONTRIBUTING.md) \ No newline at end of file +This Contribution Guidelines are adapted from the [Contributing to VS Code](https://github.com/microsoft/vscode/blob/master/CONTRIBUTING.md) From fdd02cc1053dbc1e5000f7dd956eb5f0944cc041 Mon Sep 17 00:00:00 2001 From: Michael Gordeev Date: Sat, 1 Feb 2020 02:02:27 +0300 Subject: [PATCH 3/6] Updated CONTRIBUTING.md: Added Table of Contents, Coding Guidelines, Contributing to translations, Submitting pull requests --- CONTRIBUTING.md | 172 +++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 157 insertions(+), 15 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 08f7d02..bd0738f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,24 +1,36 @@ # GUTSchedule Contribution Guidelines - Welcome, and thank you for your interest in contributing to my app! There are many ways in which you can contribute, beyond writing code. The goal of this document is to provide a high-level overview of how you can get involved. -## Asking Questions +## Table of Contents +- [Introduction](#gutschedule-contribution-guidelines) +- [Asking Questions](#asking-questions) +- [Providing Feedback](#providing-feedback) +- [Reporting Issues](#reporting-issues) + - [Look For an Existing Issue](#look-for-an-existing-issue) + - [Writing Good Bug Reports and Feature Requests](#Writing-Good-Bug-Reports-and-Feature-Requests) + - [Final Checklist](#Final-Checklist) +- [Contributing to codebase](#Contributing-to-codebase) + - [Build and run project](#Build-and-run-project) + - [Development workflow](#Development-workflow) + - **[Coding guidelines](#Coding-guidelines)** +- [Finding an issue to work on](#Finding-an-issue-to-work-on) +- [Contributing to translations](#Contributing-to-translations) +- **[Submitting pull requests](#Submitting-pull-requests)** +- [Attribution](#Attribution) +## Asking Questions Have a question? Rather than opening an issue, please ask me directly on opensource@xfox111.net. ## Providing Feedback - Your comments and feedback are welcome. You can leave your feedbak on my app on feedback@xfox111.net or leave a review on [Google Play](https://play.google.com/store/apps/details?id=com.xfox111.gut.schedule) ## Reporting Issues - Have you identified a reproducible problem in the application? Have a feature request? I'd like to hear it! Here's how you can make reporting your issue as effective as possible. ### Look For an Existing Issue - Before you create a new issue, please do a search in [open issues](https://github.com/xfox111/gutschedule/issues) to see if the issue or feature request has already been filed. Be sure to scan through the [feature requests](https://github.com/XFox111/GUTSchedule/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement). @@ -31,7 +43,6 @@ If you find your issue already exists, make relevant comments and add your [reac If you cannot find an existing issue that describes your bug or feature, create a new issue using the guidelines below. ### Writing Good Bug Reports and Feature Requests - File a single issue per problem and feature request. Do not enumerate multiple bugs or feature requests in the same issue. Do not add your issue as a comment to an existing issue unless it's for the identical input. Many issues look similar, but have different causes. @@ -46,7 +57,6 @@ Please include the following with each issue: - Images, animations, or a link to a video showing the issue occurring ### Final Checklist - Please remember to do the following: * [ ] Search the issue repository to ensure your report is a new issue * [ ] Separate issues reports @@ -55,30 +65,162 @@ Please remember to do the following: Don't feel bad if the developers can't reproduce the issue right away. They will simply ask for more information! ### Follow Your Issue - Once your report is submitted, be sure to stay in touch with the devs in case they need more help from you. -## Contributing Fixes - -If you are interested in writing code to fix issues you can follow this guidelines to get a better result - -> // TODO: Complete guidelines +## Contributing to codebase +If you are interested in writing code to fix issues or implement new awesome features you can follow this guidelines to get a better result ### Build and run project +> TODO ### Development workflow +> TODO ### Coding guidelines +#### Indentation +We use tabs, not spaces. -### Submitting pull requests +#### Names +- PascalCase + - Type names + - Enum values + - Method names + - Properties + - File names (recommended, but optional) +- camelCase + - Variables +- snake_case, kebab-case and other + - Nope + - Not on my watch + - Never in your life + - Over my dead body + +Use whole words in names when possible + +#### Comments +Read [XML documentation comments](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/xmldoc/) and try to use all stated methods. Remember: the more detailed documentation your code has the less programmers will curse you in the future + +#### Strings +Use "double quotes" wherever it's possible +#### Style +- Prefer to use lambda functions + - Wrong: + ``` + button.Click += Button_Click; + ... + private void Button_Click (object sender, RoutedEventArgs e) + { + Console.WriteLine("Hello, World!"); + } + ``` + ``` + public void Main () + { + Console.WriteLine("Hello, World!"); + } + ``` + - Correct: + ``` + button.Click += (s, e) => Console.WriteLine("Hello, World!"); + ``` + ``` + public void Main () => + Console.WriteLine("Hello, World!"); + ``` +- Put curly braces on new lines + - Wrong: + ``` + if (condition) { + ... + } + ``` + - Correct: + ``` + if (condition) + { + ... + } + ``` +- Put spaces between operators and before braces in methods declarations, conditionals and loops + - Wrong: + - `y=k*x+b` + - `public void Main()` + - Correct: + - `y = k * x + b` + - `public void Main ()` +- Put `private` keyword even though it's unnecessary + - Wrong: `void Main ()` + - Correct: `private void Main ()` +- Use interpolated strings and ternary conditionals wherever it's possible + - Wrong: + - `string s = a + "; " + b`, `string s = string.Format("{0}; {1:00}", a, b)` + - ``` + string s; + if (condition) + s = "Life"; + else + s = "Death" + ``` + - Correct: + - `string s = $"{a}; {b:00}"` + - `string s = condition ? "Life" : "Death"` +- Do not surround loop and conditional bodies with curly braces if they can be avoided + - Wrong: + ``` + if (condition) + { + Console.WriteLine("Hello, World!"); + } + else + { + return; + } + ``` + - Correct + ``` + if (condition) + Console.WriteLine("Hello, World!"); + else + return; + ``` +- Use `#region` tags to separate code which does routine work (e.g. assigns Android layout controls or subscribes them to events) ### Finding an issue to work on +Check out the [full issues list](https://github.com/XFox111/GUTSchedule/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue) for a list of all potential areas for contributions. Note that just because an issue exists in the repository does not mean we will accept a contribution to the core editor for it. There are several reasons we may not accept a pull request like: + +- Performance - One of GUT.Schedule core values is to deliver a lightweight application, that means it should perform well in both real and perceived performance. +- User experience - Since we want to deliver a lightweight application, the UX should feel lightweight as well and not be cluttered. Most changes to the UI should go through the issue owner and. +- Architectural - Feature owner needs to agree with any architectural impact a change may make. Such things must be discussed with and agreed upon by the feature owner. + +To improve the chances to get a pull request merged you should select an issue that is labelled with the `help-wanted` or `bug` labels. If the issue you want to work on is not labelled with `help-wanted` or `bug`, you can start a conversation with the issue owner asking whether an external contribution will be considered. + +To avoid multiple pull requests resolving the same issue, let others know you are working on it by saying so in a comment. ### Contributing to translations +If you want to help us to translate this application into other languages you can do it making these steps: + +1. Navigate to `GUT.Schedule/GUT.Schedule/Resources` +2. Create new folder named `values-lc` where `lc` is locale language. +Folder name examples: + - `values-uk` for Ukrainian + - `values-be` for Belarusian + - `values-ru` for Russian + + **Note** that we only accept region neutral localizations (e.g. pull request with `values-en-rUS` (English (United States)) folder will be rejected whether PR with `values-en` (English (Invarian Country)) folder will be accepted). + For reference, here is a [list of Java locales](https://www.oracle.com/technetwork/java/javase/locales-137662.html) and [Android-supported locales via StackOverflow](https://stackoverflow.com/questions/7973023/what-is-the-list-of-supported-languages-locales-on-android). +3. In the folder copy `strings.xml` file from `GUT.Schedule/GUT.Schedule/Resources/values` +4. Edit localization strings +5. Commit changes and create a pull request + +### Submitting pull requests +To enable us to quickly review and accept your pull requests, always create one pull request per issue and [link the issue in the pull request](https://github.com/blog/957-introducing-issue-mentions). Never merge multiple requests in one unless they have the same root cause. Be sure to follow our [Coding Guidelines](#coding-guidelines) and keep code changes as small as possible. Avoid pure formatting changes to code that has not been modified otherwise. Pull requests should contain tests whenever possible. Fill pull request content according to its template. Deviations from template are not recommended + +#### Spell check errors +Pull requests that fix spell check errors in translatable strings (strings in nls.localize(...) calls) are welcomed but please make sure it doesn't touch multiple feature areas, otherwise it will be difficult to review. Pull requests only fixing spell check errors in source code are not recommended. # Thank You! Your contributions to open source, large or small, make great projects like this possible. Thank you for taking the time to contribute. ## Attribution -This Contribution Guidelines are adapted from the [Contributing to VS Code](https://github.com/microsoft/vscode/blob/master/CONTRIBUTING.md) +This Contribution Guidelines are adapted from the [Contributing to VS Code](https://github.com/microsoft/vscode/blob/master/CONTRIBUTING.md) \ No newline at end of file From 56654ab147e0d06e5737544a4a8b321409827f97 Mon Sep 17 00:00:00 2001 From: Michael Gordeev Date: Mon, 3 Feb 2020 20:21:52 +0300 Subject: [PATCH 4/6] Updated CONTRIBUTING.md: table of contents and build & run --- CONTRIBUTING.md | 48 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bd0738f..a743cf1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,21 +4,30 @@ Welcome, and thank you for your interest in contributing to my app! There are many ways in which you can contribute, beyond writing code. The goal of this document is to provide a high-level overview of how you can get involved. ## Table of Contents -- [Introduction](#gutschedule-contribution-guidelines) -- [Asking Questions](#asking-questions) -- [Providing Feedback](#providing-feedback) -- [Reporting Issues](#reporting-issues) +- [GUTSchedule Contribution Guidelines](#gutschedule-contribution-guidelines) + - [Table of Contents](#table-of-contents) + - [Asking Questions](#asking-questions) + - [Providing Feedback](#providing-feedback) + - [Reporting Issues](#reporting-issues) - [Look For an Existing Issue](#look-for-an-existing-issue) - - [Writing Good Bug Reports and Feature Requests](#Writing-Good-Bug-Reports-and-Feature-Requests) - - [Final Checklist](#Final-Checklist) -- [Contributing to codebase](#Contributing-to-codebase) - - [Build and run project](#Build-and-run-project) - - [Development workflow](#Development-workflow) - - **[Coding guidelines](#Coding-guidelines)** -- [Finding an issue to work on](#Finding-an-issue-to-work-on) -- [Contributing to translations](#Contributing-to-translations) -- **[Submitting pull requests](#Submitting-pull-requests)** -- [Attribution](#Attribution) + - [Writing Good Bug Reports and Feature Requests](#writing-good-bug-reports-and-feature-requests) + - [Final Checklist](#final-checklist) + - [Follow Your Issue](#follow-your-issue) + - [Contributing to codebase](#contributing-to-codebase) + - [Build and run project](#build-and-run-project) + - [Development workflow](#development-workflow) + - [Coding guidelines](#coding-guidelines) + - [Indentation](#indentation) + - [Names](#names) + - [Comments](#comments) + - [Strings](#strings) + - [Style](#style) + - [Finding an issue to work on](#finding-an-issue-to-work-on) + - [Contributing to translations](#contributing-to-translations) + - [Submitting pull requests](#submitting-pull-requests) + - [Spell check errors](#spell-check-errors) + - [Thank You!](#thank-you) + - [Attribution](#attribution) ## Asking Questions Have a question? Rather than opening an issue, please ask me directly on opensource@xfox111.net. @@ -71,6 +80,15 @@ Once your report is submitted, be sure to stay in touch with the devs in case th If you are interested in writing code to fix issues or implement new awesome features you can follow this guidelines to get a better result ### Build and run project +1. Clone repository to local storage using [Git command prompt](https://guides.github.com/introduction/git-handbook/) or [Visual Studio](https://docs.microsoft.com/en-us/visualstudio/get-started/tutorial-open-project-from-repo?view=vs-2019) +2. Open `GUT.Schedule/GUT.Schedule.sln` using [Microsoft Visual Studio](https://visualstudio.microsoft.com/) 2019 or later +3. On the VS toolbar choose build configuration: + - `Debug` for building and deploying test version of the app + - `Release` for building final version of application and creating AppBundle package (.aab) + - `Release (APK)` for building final version of application and creating Android package fike (.apk) +4. To ensure that code compiles go to `Build -> Build Solution` +5. To deploy and run application on a device or emulator +6. To build and create new package go to `Build -> Archive...` > TODO ### Development workflow @@ -218,7 +236,7 @@ To enable us to quickly review and accept your pull requests, always create one #### Spell check errors Pull requests that fix spell check errors in translatable strings (strings in nls.localize(...) calls) are welcomed but please make sure it doesn't touch multiple feature areas, otherwise it will be difficult to review. Pull requests only fixing spell check errors in source code are not recommended. -# Thank You! +## Thank You! Your contributions to open source, large or small, make great projects like this possible. Thank you for taking the time to contribute. From 7d53ac838048d76298e7759e2a1edf70d040854b Mon Sep 17 00:00:00 2001 From: Michael Gordeev Date: Mon, 3 Feb 2020 22:09:41 +0300 Subject: [PATCH 5/6] Completed CONTRIBUTING.md --- CONTRIBUTING.md | 113 ++++++++++++++++++++++++++++-------------------- 1 file changed, 66 insertions(+), 47 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a743cf1..22fdded 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,29 +5,29 @@ There are many ways in which you can contribute, beyond writing code. The goal o ## Table of Contents - [GUTSchedule Contribution Guidelines](#gutschedule-contribution-guidelines) - - [Table of Contents](#table-of-contents) - - [Asking Questions](#asking-questions) - - [Providing Feedback](#providing-feedback) - - [Reporting Issues](#reporting-issues) - - [Look For an Existing Issue](#look-for-an-existing-issue) - - [Writing Good Bug Reports and Feature Requests](#writing-good-bug-reports-and-feature-requests) - - [Final Checklist](#final-checklist) - - [Follow Your Issue](#follow-your-issue) - - [Contributing to codebase](#contributing-to-codebase) - - [Build and run project](#build-and-run-project) - - [Development workflow](#development-workflow) - - [Coding guidelines](#coding-guidelines) - - [Indentation](#indentation) - - [Names](#names) - - [Comments](#comments) - - [Strings](#strings) - - [Style](#style) - - [Finding an issue to work on](#finding-an-issue-to-work-on) - - [Contributing to translations](#contributing-to-translations) - - [Submitting pull requests](#submitting-pull-requests) - - [Spell check errors](#spell-check-errors) - - [Thank You!](#thank-you) - - [Attribution](#attribution) + - [Table of Contents](#table-of-contents) + - [Asking Questions](#asking-questions) + - [Providing Feedback](#providing-feedback) + - [Reporting Issues](#reporting-issues) + - [Look For an Existing Issue](#look-for-an-existing-issue) + - [Writing Good Bug Reports and Feature Requests](#writing-good-bug-reports-and-feature-requests) + - [Final Checklist](#final-checklist) + - [Follow Your Issue](#follow-your-issue) + - [Contributing to codebase](#contributing-to-codebase) + - [Build and run project](#build-and-run-project) + - [Development workflow](#development-workflow) + - [Coding guidelines](#coding-guidelines) + - [Indentation](#indentation) + - [Names](#names) + - [Comments](#comments) + - [Strings](#strings) + - [Style](#style) + - [Finding an issue to work on](#finding-an-issue-to-work-on) + - [Contributing to translations](#contributing-to-translations) + - [Submitting pull requests](#submitting-pull-requests) + - [Spell check errors](#spell-check-errors) + - [Thank You!](#thank-you) + - [Attribution](#attribution) ## Asking Questions Have a question? Rather than opening an issue, please ask me directly on opensource@xfox111.net. @@ -67,9 +67,9 @@ Please include the following with each issue: ### Final Checklist Please remember to do the following: -* [ ] Search the issue repository to ensure your report is a new issue -* [ ] Separate issues reports -* [ ] Include as much information as you can to your report +- [ ] Search the issue repository to ensure your report is a new issue +- [ ] Separate issues reports +- [ ] Include as much information as you can to your report Don't feel bad if the developers can't reproduce the issue right away. They will simply ask for more information! @@ -81,39 +81,58 @@ If you are interested in writing code to fix issues or implement new awesome fea ### Build and run project 1. Clone repository to local storage using [Git command prompt](https://guides.github.com/introduction/git-handbook/) or [Visual Studio](https://docs.microsoft.com/en-us/visualstudio/get-started/tutorial-open-project-from-repo?view=vs-2019) + - Git clone command: + ``` + git clone https://github.com/xfox111/GUTSchedule.git + ``` 2. Open `GUT.Schedule/GUT.Schedule.sln` using [Microsoft Visual Studio](https://visualstudio.microsoft.com/) 2019 or later + - Make sure you have properly installed and congigured [Xamarin.Android](https://docs.microsoft.com/en-us/xamarin/android/get-started/installation/) environment 3. On the VS toolbar choose build configuration: - `Debug` for building and deploying test version of the app - `Release` for building final version of application and creating AppBundle package (.aab) - `Release (APK)` for building final version of application and creating Android package fike (.apk) 4. To ensure that code compiles go to `Build -> Build Solution` -5. To deploy and run application on a device or emulator -6. To build and create new package go to `Build -> Archive...` -> TODO +5. [Debug application](https://docs.microsoft.com/en-us/xamarin/android/deploy-test/debugging/) on an actual device or Android Emulator ### Development workflow -> TODO +This section represents how contributors should interact with codebase implementing features and fixing bugs +1. Getting assigned to the issue +2. Creating a repository fork +3. Making changes to codebase +4. Updating [changelog.md](changelog.md) +5. Creating a pull request to `master` +6. Done! ### Coding guidelines #### Indentation We use tabs, not spaces. #### Names -- PascalCase - - Type names - - Enum values - - Method names - - Properties - - File names (recommended, but optional) -- camelCase - - Variables -- snake_case, kebab-case and other - - Nope - - Not on my watch - - Never in your life - - Over my dead body - -Use whole words in names when possible +The project naming rules inherit [.NET Naming Guidelines](https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/naming-guidelines). Nevertheless there'is some distinction with the guidelines as well as additions to the one: +- Use `camelCase` for fields instead of `CamelCase` stated in [Capitalization Conventions](https://docs.microsoft.com/en-us/dotnet/standard/design-guidelines/capitalization-conventions#capitalization-rules-for-identifiers) +- `camelCase` for resource keys is allowed but not recommeded. Consider using a `PascalCase` +- Private fields for properties should always start with underscore `_` + - Wrong: + ``` + private int year = 1984; + public int Year + { + get => year; + set => year = value; + } + ``` + - Correct: + ``` + private int _year = 1984; + public int Year + { + get => _year; + set => _year = value; + } + ``` +> **Note:** underscores `_` before generic **private** fields are allowed but not recommended +- Use `PascalCase` for file names +> **Note:** `snake_case` is allowed only for XML files and media resource files (`.png, .svg, .mp3, etc`), but still not recommended #### Comments Read [XML documentation comments](https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/xmldoc/) and try to use all stated methods. Remember: the more detailed documentation your code has the less programmers will curse you in the future @@ -204,7 +223,7 @@ Use "double quotes" wherever it's possible - Use `#region` tags to separate code which does routine work (e.g. assigns Android layout controls or subscribes them to events) ### Finding an issue to work on -Check out the [full issues list](https://github.com/XFox111/GUTSchedule/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue) for a list of all potential areas for contributions. Note that just because an issue exists in the repository does not mean we will accept a contribution to the core editor for it. There are several reasons we may not accept a pull request like: +Check out the [full issues list](https://github.com/XFox111/GUTSchedule/issues?utf8=%E2%9C%93&q=is%3Aopen+is%3Aissue) for a list of all potential areas for contributions. **Note** that just because an issue exists in the repository does not mean we will accept a contribution to the core editor for it. There are several reasons we may not accept a pull request like: - Performance - One of GUT.Schedule core values is to deliver a lightweight application, that means it should perform well in both real and perceived performance. - User experience - Since we want to deliver a lightweight application, the UX should feel lightweight as well and not be cluttered. Most changes to the UI should go through the issue owner and. @@ -224,7 +243,7 @@ Folder name examples: - `values-be` for Belarusian - `values-ru` for Russian - **Note** that we only accept region neutral localizations (e.g. pull request with `values-en-rUS` (English (United States)) folder will be rejected whether PR with `values-en` (English (Invarian Country)) folder will be accepted). + > **Note** that we only accept region neutral localizations (e.g. pull request with `values-en-rUS` (English (United States)) folder will be rejected whether PR with `values-en` (English (Invarian Country)) folder will be accepted). For reference, here is a [list of Java locales](https://www.oracle.com/technetwork/java/javase/locales-137662.html) and [Android-supported locales via StackOverflow](https://stackoverflow.com/questions/7973023/what-is-the-list-of-supported-languages-locales-on-android). 3. In the folder copy `strings.xml` file from `GUT.Schedule/GUT.Schedule/Resources/values` 4. Edit localization strings From 8c3bda806ca4a468dd537d2d0815d66e98ad0c38 Mon Sep 17 00:00:00 2001 From: Michael Gordeev Date: Mon, 3 Feb 2020 22:31:18 +0300 Subject: [PATCH 6/6] Added GitHub Issue Templates --- .github/ISSUE_TEMPLATE/bug_report.md | 33 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..8f2c724 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,33 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: bug +assignees: '' + +--- + +### Description +A clear and concise description of what the bug is. + +### Reproduction steps +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +### Expected behavior +A clear and concise description of what you expected to happen. + +### Screenshots +If applicable, add screenshots to help explain your problem. + +### Environment +Please complete the following information: + - Device: [e.g. Google Pixel 3 XL] + - Android OS version: [e.g. 7.1] + - Application version: [e.g. 1.0.1] + +### Additional context +Add any other context about the problem here. \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..6532412 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: enhancement +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. \ No newline at end of file