Please contribute! But first, make sure you have Set Up the project correctly, and understand our Supported Browsers.
- Make sure the code is up to date
git pull upstream master
- add your feature in a new branch
git checkout -b feature-my-new-stuff
- Write and run tests as you go, and keep the test coverage above 80%.
grunt test
- Keep the code clean and self documenting
- Make sure you are still up to date with master
git pull upstream master
- Make sure HISTORY.md includes a summary of your changes in a new version number heading
- Push your branch to github
git push origin feature-my-new-stuff
- open a Pull request within github.
If you would like the feature to go live sooner, mention this in the comments/commit. We will provide a temporary live url that will allow you to carry on without getting blocked.
You can also run the cross-browser suite yourself if you have a Browsers Stack account. See test/README.md.
When adding a new icon:
- put the .svg in the
app/src/skyconsfolder - run
grunt fonts - run
grunt && grunt serveand verify that the icon appears - commit away and do a pull request. :)
- Use hyphens '-' within all class, ID and name attribute.
- Never camelCase or underscore.
- Where possible, use 'camelCase' for function/variable names.
- Where possible, use 'camelCase'.
- Where possible, please don't rely on jQuery.
- Be lean, the Toolkit is working towards freeing itself of jQuery dependency. help us!
- For events, We suggest using Toolkit's own events component:
skyComponents.event - JQuery Variable Names (a jQuery object/element) should always be prefixed with
$i.e.$container
- Use CSS3 animations/transitions where possible over jQuery or JavaScript. This will improve performance, especially for mobile devices.
Don't forget to make sure your code is accessible. Add about half a day to each client-side card to give you time to check:
- colour contrast
- Keyboard 'tabbing' (make the elements background blue and text and icons white)
- VoiceOver
For page text that is needed only for screen readers, add the class speak.