Skip to content

Commit

Permalink
Chore: Updates FastStore Contributing Guide (#2476)
Browse files Browse the repository at this point in the history
## What's the purpose of this pull request?

Updates contributing guide to reduce friction for contributors.

## How it works?

- Updates the contributing file (added more details and instructions
about the process and label)
- Updates the pull request template

## How to test it?

Check the modified files and review it.

[Preview](https://github.com/vtex/faststore/blob/4adeb901b5bc031161111f0078d3fcd2b8716efb/CONTRIBUTING.MD)
  • Loading branch information
hellofanny committed Sep 27, 2024
1 parent 1cc987d commit 2416791
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 24 deletions.
21 changes: 19 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

## How it works?

<!--- Tell us the role of the new feature, or component, in its context. --->
<!--- Tell us the role of the new feature, or component, in its context. Provide details about what you have implemented and screenshots if applicable. --->

## How to test it?

<!--- Describe the steps with bullet points. Is there any external link that can be used to better test it or an example? --->

### Starters Deploy Preview

<!--- Add a link to a deploy preview from `gatsby.store` AND `nextjs.store` with this branch being used. --->
<!--- Add a link to a deploy preview from `starter.store` with this branch being used. --->

<!--- Tip: You can get an installable version of this branch from the CodeSandbox generated when this PR is created. --->

Expand All @@ -21,3 +21,20 @@
<!--- Spread the knowledge: is there any content you used to create this PR that is worth sharing? --->

<!--- Extra tip: adding references to related issues or mentioning people important to this PR may be good for the documentation and reviewing process --->

## Checklist

<em>You may erase this after checking them all :wink:</em>

**PR Title and Commit Messages**

- [ ] PR title and commit messages follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification
- Available prefixes: `feat`, `fix`, `chore`, `docs`, `style`, `refactor` and `test`

**PR Description**

- [ ] Added a label according to the PR goal - `breaking change`, `bug`, `contributing`, `performance`, `documentation`..

**Dependencies**

- [ ] Committed the `yarn.lock` file when there were changes to the packages
96 changes: 75 additions & 21 deletions CONTRIBUTING.MD
Original file line number Diff line number Diff line change
@@ -1,56 +1,110 @@
# How to contribute
# How to contribute 🌟

1. Fork this repository.
Thank you for your interest in contributing! We welcome all kinds of contributions, whether they are bug fixes, new features, documentation improvements, or any other suggestions. This guide will walk you through the process of contributing to FastStore framework.

2. Clone your forked `faststore` repository.
## 1. Requirements

3. Create a new branch for the changes you are working on.
Before you begin, make sure you have the following installed on your local machine to run the project:

## Developing Locally
- [Git](https://git-scm.com)
- [Node.js](https://nodejs.org/en)
- [Yarn](https://yarnpkg.com/)
- [Turbo](https://turbo.build/repo/docs/getting-started/installation#installing-turbo)
- Your Preferred Code Editor (VSCode, Sublime, etc.)

### Developing Packages
## 2. Getting Started

1. Run `yarn` at the root of the repo.
### Forking the Repository

2. Run `yarn build` at the root of the repo.
**If you don’t have write access to this repository**, you'll need to fork it (else, skip this step):

Fork the repository (click the <kbd>Fork</kbd> button at the top right of
[this page](https://github.com/vtex/faststore)).This will create a copy of the repository in your GitHub account.

### Cloning the Repository

1. Open a terminal and clone the `faststore` repository.
2. Navigate into the project folder.

### Setting Up the Environment

1. Run `yarn` at the root of the repository.

2. Run `yarn build` at the root of the repository.

3. Run `yarn turbo run dev --filter={packageName}` to run a package individually.

> For example, if you want to run the `@faststore/core` package, at the root of the repo run:
> For example, if you want to run the `@faststore/core` package, at the root of the repository run:
>
> `yarn turbo run dev --filter=@faststore/core`
### Developing packages while also testing on a store
**Note**: If you encounter issues during the setup process, please check if your current version of Yarn, Turbo, and Node.js are matching the versions specified in the package.json file.

## 3. Working on an Issue

### Creating a New Branch

Before starting any work, create a new branch for your changes:

```
git checkout -b feat/your-branch-name
```

Choose a branch name that reflects the work being done, such as `fix/query-typo` or `feat/add-new-component`.

### Testing Changes on a Store

To test your changes in a store, you will need to create a pull request (for more guidance, refer to the next section). You can keep your pull request in `draft` while testing.

1. After committing your changes, push them to the remote repo and open a Pull Request.
1. After committing your changes, push them to the remote repository and open a Pull Request.

2. In the checks section, find `ci/codesandbox` and click on `Details`.

<img width="502" alt="checks_details" src="https://vtexhelp.vtexassets.com/assets/docs/src/dropdown-menu-example___338a9acd1892074ba750ada043ab92b4.png"></img>

3. Use the `Local Install Instructions` provided for the PR to **add your version of the packages** as dependencies in the `package.json` file of the [starter](https://github.com/vtex-sites/starter.store) or your store.

<img width="502" alt="image" src="https://vtexhelp.vtexassets.com/assets/docs/src/fs-package-local-install___db14cf215e613a08aca9ba5d779eb37a.png"></img>
<img width="502" alt="image" src="https://vtexhelp.vtexassets.com/assets/docs/src/fs-package-local-install-cli___692a64eba8c0b3745c468176bfc610fb.png
"></img>

4. Run `yarn` to install the updates and test your changes in the store.

4. Run `yarn` to install the updates and test your changes.
**Note**: This link is intended for testing purposes only. Please avoid using it in your store. Once the published version of your package is available, make sure to update the link accordingly.

## Creating Pull Requests
## 4. Creating a Pull Request

We use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification for pull request titles and commit messages.

1. After committing your changes, push them to the remote repo and open a Pull Request.
After committing your changes, push them to the remote repository and open a Pull Request.

### Pull Request Guidelines

1. Please add a clear and concise title PR title with one of the prefixes.

- Available prefixes: `Feat`, `Fix`, `Chore`, `Docs`, `Style`
- Example: `Feat: Add Carousel component`

2. You will be presented with a pull request template. Please describe the motivation behind your changes and provide details about what you have implemented.

3. If applicable, include screenshots and steps for testing. This information will help reviewers understand your contributions better.

4. Add the `contributing` label to identify your PR. And any other [label](https://github.com/vtex/faststore/labels) that is applicable for your PR.

**Note**: If you believe your changes might cause a breaking change, or if you have any concerns about it, please mention this in the pull request description.

## 5. Review Process

Once your PR is submitted, the team will review it.

2. Please add a clear and concise title PR title with one of the prefixes.
Pull requests need only the approval 👍 of two or more maintainers to be merged.

- Available prefixes: `feat`, `fix`, `chore`, `docs`, `style`
- Example: `feat: Add Carousel component`
All contributions will go through a review process. Make sure you keep an eye on the PR, you might need to:

3. You will be presented with a pull request template. Kindly describe the motivation behind and the changes you made. This information will help reviewers in understanding your contributions.
1. Respond to any feedback from reviewers.
2. Make any requested changes by committing to your branch and pushing the updates.

4. Wait for checks to pass and reviews to be approved.
Once your PR is approved, your changes will be merged into the `main` branch and a new release will be initiated, incorporating your updates into the latest version.

5. When your changes are merged, a new release will be initiated, incorporating your updates into the latest version.
Please be patient, as this process can take some time depending on the team’s availability. However, if your changes are critical and you are a client, consider contacting customer support to request priority through a support ticket.

Thanks for contributing 🎉
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Check out our [Overview](https://www.faststore.dev/docs/getting-started-overview

## Contributing

This is still a work in progress, however, if you are also an adventurous person, you can read the code and have some fun!
This is a work in progress. If you are an adventurous person, you can read the code and have some fun! Refer to [Contributing guidelines](CONTRIBUTING.MD) for more information.

## Getting help

Expand Down

0 comments on commit 2416791

Please sign in to comment.