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: update CONTRIBUTING.md #69

Merged
merged 10 commits into from
Jan 15, 2025
106 changes: 95 additions & 11 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,102 @@
# Contributing to Sipe Design System

We love your input! We want to make contributing to this project as easy and transparent as possible. This document outlines the process for contributing to our component library.
Welcome to our project! We want to make contributing to this project as easy and transparent as possible.
This document provides a clear guide on **how to contribute to Sipe Design System**.
SEMIN-97 marked this conversation as resolved.
Show resolved Hide resolved
We've outlined the process to ensure contributing is as easy and transparent as possible.

---

## Getting Started

1. Fork the repository
2. Clone your fork: `git clone https://github.com/your-username/3-1_sds.git`
3. Install dependencies: `pnpm install`
### Fork and Clone the Repository
First, fork the repository and then clone it locally:
```sh
git clone https://github.com/your-username/3-2_side.git
```
SEMIN-97 marked this conversation as resolved.
Show resolved Hide resolved

### Install Dependencies
Install the necessary dependencies:
```sh
pnpm install
```

### Run Development Server
Run the development server to verify the setup:
```sh
pnpm dev
```
SEMIN-97 marked this conversation as resolved.
Show resolved Hide resolved

---

## Developing

### Create New Components
Use the CLI to create new components. The generated components will be placed under the `packages/` directory:
```sh
pnpm create:component
```

- **Naming Convention:** Use kebab-case for component names (e.g., `my-button`).
- **Styling:** Prioritize using predefined styles from the `tokens` package.

### Testing
We use **Vitest** for testing.
All new features or changes must include **relevant test cases**.
```sh
pnpm test
```
SEMIN-97 marked this conversation as resolved.
Show resolved Hide resolved

### Storybook
We use **Storybook** for visual testing of components.
All components must include Storybook documentation.
Run the following command to view your components at `localhost:6006`:
SEMIN-97 marked this conversation as resolved.
Show resolved Hide resolved
```sh
pnpm dev:storybook
```

---

## How to Propose Changes
Before proposing changes, please **open an issue** to discuss the bug or feature.

### Create a Pull Request

1. **Create a Branch**
Follow the branch naming convention: `<type>/<subject>`
SEMIN-97 marked this conversation as resolved.
Show resolved Hide resolved
```sh
git checkout -b feat/your-feature
SEMIN-97 marked this conversation as resolved.
Show resolved Hide resolved
```
noahluftyang marked this conversation as resolved.
Show resolved Hide resolved

2. **Commit Changes**
Write meaningful commit messages:
```sh
git commit -m "feat: description"
```
SEMIN-97 marked this conversation as resolved.
Show resolved Hide resolved

3. **Push Changes**
Push the branch to your forked repository:
```sh
git push -u origin HEAD
```

4. **Submit Pull Request (PR)**
- Follow the PR template.
- Provide a detailed description of your changes.

### Code Review & Feedback
- Address feedback from reviewers promptly.
- Push additional commits directly to the PR branch.

---

## Issue Reporting

We use **GitHub Issues** to track and manage problems and discussions.
Please register your issue so we can discuss and decide on the next steps.

## Creating a New Component
### Bug Reporting
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

우리 이슈 템플릿도 몇 개 더 만들어야겠다.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

버그 리포트 템플릿은 바로 만들어볼게!

- Check if a similar issue already exists.
- Clearly describe **reproduction steps**, **expected results**, and **actual results**.
SEMIN-97 marked this conversation as resolved.
Show resolved Hide resolved

1. Copy the [.templates/component](.templates/component) folder to `packages/your-component-name`
2. Follow the test-driven development process:
- Write test cases first in `src/Component.test.tsx`
- Implement the component to pass the tests
- Create stories in Storybook for documentation
3. Run the test suite: `pnpm test`
### Feature Suggestions
SEMIN-97 marked this conversation as resolved.
Show resolved Hide resolved
- Describe the purpose and expected outcome of the feature in detail.
Loading