Skip to content

Latest commit

 

History

History
164 lines (124 loc) · 4.83 KB

CONTRIBUTING_DEVELOPMENT.md

File metadata and controls

164 lines (124 loc) · 4.83 KB

Contribution process for developers

Contributing to Clarity is no different than contributing to any other Github project.

Bug fixes and small features follow a simple scenario, where you fork our repository, make your changes, submit them against your own fork and then create a Pull Request (PR).

For new components, large features or code refactorings, we need to coordinate more on the goals of the task before you start, so you need to fill in a Proposal Template. Also, as this can take more time, you will be working against a topic branch.

That's it!


The rest of this document can be used as reference to what our prerequisites are, coding guidelines, getting started guide, running the project, updating the API changes, creating a proper commit message, backporting to older versions.

Prerequisites

First, make sure you:

Getting started

Start by forking the main Clarity repository, and follow the instructions in the previous link to clone your fork and set the upstream remote to the main Clarity repository. Because of the DCO, set your name and e-mail in the Git configuration for signing. Finally, create a local topic branch from the upstream topic/{feature-name} mentioned above.

For instance, this setup part could look like this:

## Clone your forked repository
git clone [email protected]:<github username>/ng-clarity.git

## Navigate to the directory
cd clarity

## Set name and e-mail configuration
git config user.name "John Doe"
git config user.email [email protected]

## Setup the upstream remote
git remote add upstream https://github.com/vmware-clarity/ng-clarity.git

Starting the project

Once you have the project checked out with a fork you will need to run some step steps.

  1. Have NodeJS installed
  2. In the root project directory run, npm install
  3. Run npm run build to build entire project (this may take several minutes)
  4. Startup the demo project: npm start
  5. To run tests and other project-specific commands see our project Build Guide

Public API Changes

If you are making a change that changes the public API of a Component make sure to discuss this within a proposal issue with a Clarity team member. A proposal allows us to plan out potential breaking changes if necessary and review the API changes. If a public API change is approved you will have to update our API files which track our public API surface.

To update the API files follow these steps:

  1. Make public API change
  2. Run npm run build
  3. Run npm run public-api:update this should fail

Commits

For your commit message, please use the following format:

<type>(optional scope): <description>
 < BLANK LINE >

[optional body]
[optional Github closing reference]

 < BLANK LINE >
Signed-off-by: Your Name <[email protected]>

type - could be one of feat, fix, chore.

Set scope of the commit if possible:

  • a11y
  • accordion
  • alert
  • badge
  • build
  • button
  • card
  • checkbox
  • datagrid
  • date-picker
  • dropdown
  • form
  • grid
  • header
  • icons
  • i18n
  • input
  • label
  • list
  • login
  • modal
  • password
  • progress-bar
  • radio
  • select
  • signpost
  • spinner
  • stack-view
  • stepper
  • table
  • tabs
  • textarea
  • timeline
  • toggle
  • tooltip
  • tree-view
  • vertical-nav
  • wizard

For example, a commit message could look like this:

fix(date-picker): adds aria-labels for buttons

- adds proper labels for all datepicker buttons
- adds live region for calendar view that updates month/year values for screen readers
- adds live region to year view that updates the decade range for screen readers
- updates templates for ClrCommonStringsService

Close: #4242

Signed-off-by: Your Name <[email protected]>

These documents provide guidance creating a well-crafted commit message: