Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: contributing #141

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 95 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Contributing to Pijma

## The idea

* Render Props
* Primitives Composition

`Component` is a React function component (`React.FC`)

Markup of `Component` is composition of primitives (`Box`, `Card`, `Pos`, `Flex`, `FlexItem`, etc.)

```jsx
export interface ComponentProps {
...
}

export const Component: React.FC<ComponentProps> = (props) => (
<ComponentControl
...
children={(renderProps) => (
...
)}
/>
)
```

`ComponentControl` is a React class component (`React.Component`, `React.PureCompoment`)

```jsx
export interface ComponentControlProps {
...
children: RenderChild<{
...
}>
}

export interface ComponentControlState {
...
}

export class ComponentControl extends React.Component<ComponentControlProps, ComponentControlState> {

public state = {
...
}

public render() {
return this.props.children({
...
})
}

}
```

## Commit Message Guidelines

Relies on [conventional commits](https://www.conventionalcommits.org) contract:

```
<type>(<scope>): <subject>
```

### Type

Must be one of the following:

* **build**: Changes that affect the build system or external dependencies
* **ci**: Changes to our CI configuration files and scripts
* **docs**: Documentation only changes
* **feat**: A new feature
* **fix**: A bug fix
* **perf**: A code change that improves performance
* **refactor**: A code change that neither fixes a bug nor adds a feature
* **style**: Changes that do not affect the meaning of the code
* **test**: Adding missing tests or correcting existing tests
* **chore**: Routine: releases, tech commits, minor tweak ups, etc.

### Scope

The scope should be the name of the npm package affected (as perceived by the person reading the changelog generated from commit messages.

### Subject

The subject contains a succinct description of the change:

* use the imperative, present tense: "change" not "changed" nor "changes"
* don't capitalize the first letter
* no dot (.) at the end

## Pull Request Guidelines

Pull Request name must be the same as Commit Message.

Use [wip](https://github.com/apps/wip) to mark pull request is in progress.