From 38682935263520df7eaaa2f0c5a41526af978eda Mon Sep 17 00:00:00 2001 From: Raj Date: Mon, 25 Mar 2019 10:01:53 +1100 Subject: [PATCH 1/9] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ad8be6efd..83ea1fa7a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -62,6 +62,8 @@ Before new components and patterns are published into the design system, the tea | [Tested](#tested) | It’s been tested and shown to work with a range of browsers, assistive technologies and devices. | | [Considered](#considered) | Documentation and rationale have been provided. | +We would be very greatful if you post the research, design decisions, use for the component to the community forum. This may be in the form of a code snippet, screenshot or written text on some of the research you have done. + ------------------------------------------------------------------------------------------------- ### Useful From 2f53ae46f2b78b9572780aaf00844178471775d7 Mon Sep 17 00:00:00 2001 From: Raj Date: Mon, 25 Mar 2019 10:06:24 +1100 Subject: [PATCH 2/9] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 83ea1fa7a..755de9728 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -62,7 +62,7 @@ Before new components and patterns are published into the design system, the tea | [Tested](#tested) | It’s been tested and shown to work with a range of browsers, assistive technologies and devices. | | [Considered](#considered) | Documentation and rationale have been provided. | -We would be very greatful if you post the research, design decisions, use for the component to the community forum. This may be in the form of a code snippet, screenshot or written text on some of the research you have done. +When making a new component, we would be very greatful if you post the research, design decisions, use cases for the component, accessibility considerations to the [community forum](https://community.digital.gov.au/c/designsystem) before submitting a pull request. This may be in the form of a code snippet, screenshots, sketch files or written text on some of the research you have done. This gives a chance for members of the community to respond and share any previous work they may have done in the past on a similar component. ------------------------------------------------------------------------------------------------- From 0bb6f078676498673538dad8aaeb906e70977203 Mon Sep 17 00:00:00 2001 From: Raj Date: Mon, 25 Mar 2019 10:11:32 +1100 Subject: [PATCH 3/9] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 755de9728..2d8c6235b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -62,7 +62,7 @@ Before new components and patterns are published into the design system, the tea | [Tested](#tested) | It’s been tested and shown to work with a range of browsers, assistive technologies and devices. | | [Considered](#considered) | Documentation and rationale have been provided. | -When making a new component, we would be very greatful if you post the research, design decisions, use cases for the component, accessibility considerations to the [community forum](https://community.digital.gov.au/c/designsystem) before submitting a pull request. This may be in the form of a code snippet, screenshots, sketch files or written text on some of the research you have done. This gives a chance for members of the community to respond and share any previous work they may have done in the past on a similar component. +When making a new component, we would be very greatful if you post the research, design decisions, use cases for the component, accessibility considerations to the [community forum](https://community.digital.gov.au/c/designsystem) before submitting a pull request. This may be in the form of a code snippet, screenshots, sketch files or written text on your research with references. This gives a chance for members of the community to respond and share any work they may have done in the past on a similar component. ------------------------------------------------------------------------------------------------- From bd4843b8cf8c6e0b84d70a29546f5c0d202864df Mon Sep 17 00:00:00 2001 From: Raj Date: Mon, 25 Mar 2019 10:42:02 +1100 Subject: [PATCH 4/9] Update CONTRIBUTING.md --- CONTRIBUTING.md | 53 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2d8c6235b..7e8ea6db0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -153,6 +153,7 @@ For example, what happens with a navigation component that has more items than d **[⬆ back to top](#contents)** + ------------------------------------------------------------------------------------------------- ### Considered @@ -166,6 +167,58 @@ Provide rationale; the more the better. We aim to explain design and code decisi ------------------------------------------------------------------------------------------------- +### Code Standard + +As mentioned previously, we try to make our code very easy to understand and readable for the human user. Here are some do's and don'ts + +#### Function declaration + +Make sure to include docs that gives details on the parameters and returns of the function. The name of the function should help make clear the intention of the function. This standard applies for any SASS, JS, JQuery or React JS functions. + +Don't: + +```js +function CalculateSpecs(initialSize,endSize,speed){ + ... +} +``` + +Do + +```js +* @param {integer} initialSize - The initial size of the element to animate +* @param {integer} endSize - The size the element after the animation completes +* @param {string} speed - The speed of the animation in ms +* +* @return {object} - Required steps, stepSize and intervalTime for the animation +*/ +function CalculateAnimationSpecs( initialSize, endSize, speed ) { + ... +} + +``` + +#### Space between code + +Add space when there is code between round, square or curly brackets. + +Don't: + +```scss +$isBlackBgContrast:AU-color-contrast(#000,$background,true,false)>=$ratio; + +``` + +Do: + +```scss +$isBlackBgContrast: AU-color-contrast( #000, $background, true, false ) >= $ratio; +``` + +**[⬆ back to top](#contents)** + + +------------------------------------------------------------------------------------------------- ## Reporting Bugs, Asking Questions, Sending Suggestions From f879d72528a7ad5b24a57def1fb3ecc32c0b8c29 Mon Sep 17 00:00:00 2001 From: Raj Date: Mon, 25 Mar 2019 10:42:28 +1100 Subject: [PATCH 5/9] Update CONTRIBUTING.md --- CONTRIBUTING.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7e8ea6db0..d67d5e9c8 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -153,7 +153,6 @@ For example, what happens with a navigation component that has more items than d **[⬆ back to top](#contents)** - ------------------------------------------------------------------------------------------------- ### Considered From d3092e7633be9d380e1a67ba0d8ab4a7e438db86 Mon Sep 17 00:00:00 2001 From: Raj Date: Mon, 25 Mar 2019 10:53:11 +1100 Subject: [PATCH 6/9] Update CONTRIBUTING.md --- CONTRIBUTING.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d67d5e9c8..2ae1af5d4 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -214,6 +214,28 @@ Do: $isBlackBgContrast: AU-color-contrast( #000, $background, true, false ) >= $ratio; ``` +#### Use new lines +When HTML or React tags have several attributes (or props), it can be easier to separate these onto a new line. + +Don't: + +```jsx +
+``` + +Do: +```jsx +
+``` + **[⬆ back to top](#contents)** From 621b6ae12773cce147a46ec2a82ebac45f4e60d4 Mon Sep 17 00:00:00 2001 From: Raj Date: Mon, 25 Mar 2019 10:59:39 +1100 Subject: [PATCH 7/9] Update CONTRIBUTING.md --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2ae1af5d4..5618414d9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -170,7 +170,7 @@ Provide rationale; the more the better. We aim to explain design and code decisi As mentioned previously, we try to make our code very easy to understand and readable for the human user. Here are some do's and don'ts -#### Function declaration +#### Describe the function Make sure to include docs that gives details on the parameters and returns of the function. The name of the function should help make clear the intention of the function. This standard applies for any SASS, JS, JQuery or React JS functions. @@ -197,7 +197,7 @@ function CalculateAnimationSpecs( initialSize, endSize, speed ) { ``` -#### Space between code +#### Space out the code Add space when there is code between round, square or curly brackets. From ac0635b9ce963c079a7a31843b7d0407bf6de2fe Mon Sep 17 00:00:00 2001 From: Adam Zerella Date: Wed, 27 Mar 2019 08:50:34 +1100 Subject: [PATCH 8/9] Update CONTRIBUTING.md Co-Authored-By: sukhrajghuman --- CONTRIBUTING.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5618414d9..c985b5ca0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -62,7 +62,9 @@ Before new components and patterns are published into the design system, the tea | [Tested](#tested) | It’s been tested and shown to work with a range of browsers, assistive technologies and devices. | | [Considered](#considered) | Documentation and rationale have been provided. | -When making a new component, we would be very greatful if you post the research, design decisions, use cases for the component, accessibility considerations to the [community forum](https://community.digital.gov.au/c/designsystem) before submitting a pull request. This may be in the form of a code snippet, screenshots, sketch files or written text on your research with references. This gives a chance for members of the community to respond and share any work they may have done in the past on a similar component. +When making a new component, we would be very grateful if you post the research, design decisions and use cases for the component. Accessibility considerations should be documented or sourced from the [community forum](https://community.digital.gov.au/c/designsystem) before submitting a pull request. + +This may be in the form of a code snippet, screenshots, sketch files or written text on your research with references. This gives a chance for members of the community to respond and share any work they may have done in the past on a similar component. ------------------------------------------------------------------------------------------------- From b8090fb324284d31aaa3e10d796328719c27332c Mon Sep 17 00:00:00 2001 From: Adam Zerella Date: Wed, 27 Mar 2019 08:52:04 +1100 Subject: [PATCH 9/9] Update CONTRIBUTING.md Co-Authored-By: sukhrajghuman --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c985b5ca0..dcba8f8ee 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -174,7 +174,7 @@ As mentioned previously, we try to make our code very easy to understand and rea #### Describe the function -Make sure to include docs that gives details on the parameters and returns of the function. The name of the function should help make clear the intention of the function. This standard applies for any SASS, JS, JQuery or React JS functions. +Make sure to include function and parameter definitions where appropriate. The name of the function should help make clear the intention of the function. This standard applies for any SASS, JS, JQuery or React JS functions. We adhere to [JSDoc](http://usejsdoc.org/about-getting-started.html) styling Don't: