Skip to content

Commit fe63802

Browse files
authored
docs(contributing): include guidance for ai generated contributions (#11904)
* docs(contributing): include guidance for ai generated contributions, contributor hall of fame, and general clean up * revert AI guidelines until they can be approved * oops * add link to PatternFly organizations AI guidance * updates per PR review
1 parent e8f9fc0 commit fe63802

File tree

1 file changed

+91
-70
lines changed

1 file changed

+91
-70
lines changed

CONTRIBUTING.md

Lines changed: 91 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Contributing to PatternFly React
22

3-
> ### Looking for a quick guide to PatternFly React Contribution? [Go Here](./packages/react-core/CONTRIBUTING.md)
3+
> **Looking for a quick guide to PatternFly React Contribution?** [Go Here](./packages/react-core/CONTRIBUTING.md)
44
55
## Outline
66

7+
- [Quick Start for New Contributors](#quick-start-for-new-contributors)
8+
- [Community Contributors Hall of Fame](#community-contributors-hall-of-fame)
79
- [Code of Conduct](#code-of-conduct)
810
- [Issues and Project Board](#issues-and-project-board)
911
- [Issue Labels](#issue-labels)
@@ -14,21 +16,58 @@
1416
- [Creating Issues for New Components](#creating-issues-for-new-components)
1517
- [Contributing Components](#contributing-components)
1618
- [Adding Styling for your Components](#adding-styling-for-your-components)
17-
- [Using Generators](#using-generators)
19+
1820
- [Guidelines and Requirements](#guidelines-and-requirements)
1921
- [React Component Requirements](#react-component-requirements)
2022
- [Code Consistency](#code-consistency)
2123
- [Code Contribution Guidelines](#code-contribution-guidelines)
24+
- [Troubleshooting](#troubleshooting)
2225
- [Becoming a Maintainer](#becoming-a-maintainer)
2326
- [How do I become a maintainer?](#how-do-i-become-a-maintainer)
2427
- [How do I lose maintainers status?](#how-do-i-lose-maintainers-status)
2528
- [Quick Tips for New Maintainers](#quick-tips-for-new-maintainers)
2629

30+
## Quick Start for New Contributors
31+
32+
New to contributing to PatternFly React? Here's how to get started quickly:
33+
34+
1. **🍴 Fork and Clone**: Fork the repository and clone it locally
35+
2. **📦 Install Dependencies**: Run `yarn install` to install dependencies
36+
3. **🏗️ Build**: Run `yarn build` to build the project
37+
4. **🔍 Find an Issue**: Look for issues labeled [`good first issue`](https://github.com/patternfly/patternfly-react/labels/good%20first%20issue)
38+
5. **🌿 Create a Branch**: Create a new branch for your changes
39+
6. **✅ Test**: Run `yarn test` to ensure tests pass
40+
7. **📝 Submit PR**: Create a pull request with a clear description
41+
42+
**Need help?** Join us on [PatternFly Slack](https://patternfly.slack.com/) in the `#patternfly-react` channel!
43+
44+
## Community Contributors Hall of Fame
45+
46+
We want to recognize and celebrate our amazing community contributors who have made significant contributions to PatternFly React in the past year! 🎉
47+
48+
### Top Community Contributors (Last 12 Months as on July 1, 2025)
49+
50+
The following contributors (excluding PatternFly team members and bots) have made outstanding contributions to the project:
51+
52+
1. **@Mash707** - 49 contributions
53+
2. **@adamviktora** - 10 contributions
54+
3. **@logonoff** - 5 contributions
55+
56+
### Notable Contributors
57+
58+
Thank you to all our community contributors for helping make PatternFly React better! Every contribution, whether it's code, documentation, bug reports, or feature requests, helps improve the library for everyone.
59+
60+
*This list is updated periodically and reflects contributions over the past 12 months. If you'd like to join this list, check out our [contribution guidelines](#contribution-process) below!*
61+
2762
## Code of conduct
2863

2964
This project is governed by the [Contributor Covenant version 2.1][1]. All contributors and participants
3065
agree to abide by its terms. To report violations, send an email to [[email protected]][2].
3166

67+
## AI-assisted development guidelines
68+
69+
Please reference [PatternFly's AI-assisted development guidelines](https://github.com/patternfly/.github/blob/main/CONTRIBUTING.md) if you'd like to contribute code generated using AI.
70+
3271
## Issues and project board
3372

3473
We use issues to track work items, such as bug reports and feature requests. Issues can be found in the [issue tracker](https://github.com/patternfly/patternfly-react/issues) or [project board](https://github.com/orgs/patternfly/projects/7). We use the project board to help visualize and manage status of an issue, and we use labels to help prioritize and identify issues.
@@ -124,22 +163,7 @@ Inside the package directory:
124163
- Add a Sass file to the `sass/patternfly-react/` directory and use the file name `_<component>.scss`
125164
- Import the Sass file into `sass/patternfly-react/_patternfly-react.scss` using `@import "<component>";`
126165

127-
### Using generators
128-
129-
To make contributing components and packages easier a generator utility has been provided.
130-
131-
To start the generator run:
132-
133-
```sh
134-
yarn generate
135-
```
136166

137-
Follow the prompts to generate the desired component or package.
138-
139-
Currently the following generators are provided
140-
141-
- PatternFly component
142-
- Package
143167

144168
## Guidelines and requirements
145169

@@ -179,51 +203,36 @@ Please ensure that all React UI components contributed meet the following guidel
179203

180204
Adhering to the following process is the best way to get your work included in the project:
181205

182-
1. [Fork](https://help.github.com/fork-a-repo/) the project, clone your fork, and configure the remotes:
183-
184-
```sh
185-
# Clone your fork of the repo into the current directory
186-
git clone https://github.com/<your-username>/patternfly-react.git
187-
# Navigate to the newly cloned directory
188-
cd patternfly-react
189-
# Assign the original repo to a remote called "upstream"
190-
git remote add upstream https://github.com/patternfly/patternfly-react.git
191-
# Fetch the code and branches from remote repo "upstream"
192-
git fetch upstream
193-
```
206+
1. **Fork and set up the repository** ([More information about forks from GitHub](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo))
194207

195-
2. Set up tooling
208+
2. **Set up your development environment**
196209

197-
[Install Node.js](https://nodejs.org/en/download/package-manager) version 22 (or higher), and make sure to [enable Corepack](https://nodejs.org/api/corepack.html). Then install the project dependencies and build it by running:
210+
**Prerequisites:**
211+
- [Node.js](https://nodejs.org/en/download/package-manager) version 22 or higher
212+
- [Enable Corepack](https://nodejs.org/api/corepack.html) for package manager management
213+
- Git configured with your GitHub account
198214

215+
**Setup commands:**
199216
```sh
217+
# Install dependencies
200218
yarn install
201-
yarn build
202-
```
203-
204-
3. Create a branch:
205219

206-
```sh
207-
git checkout -b my-branch upstream/main
208-
```
220+
# Build the project
221+
yarn build
209222

210-
4. Generate your component
223+
# Run tests to verify setup
224+
yarn test
211225

212-
```sh
213-
# Run the tool to Generate the component scaffolding
214-
yarn generate
226+
# Start development server (optional)
227+
yarn start
215228
```
216229

217-
- When you select the option to generate a PatternFly component, a structure resembling the following is generated
218-
```text
219-
packages/react-core/src/[type]/[ComponentName]/
220-
index.js - Barrel File exporting public exports
221-
ComponentName.js - Component Implementation
222-
ComponentName.test.js - Component Tests
223-
ComponentName.md - Component Docs
224-
```
230+
**Verify your setup:**
231+
- All tests should pass
232+
- Build should complete without errors
233+
- Development server should start (if running yarn start)
225234

226-
5. Develop your component. After development is complete, run build and ensure tests and lint standards pass.
235+
3. **Develop your component** - After development is complete, run build and ensure tests and lint standards pass.
227236

228237
```sh
229238
yarn build
@@ -234,26 +243,9 @@ Ensure no lint errors are introduced in `yarn-error.log` after running this comm
234243

235244
***Note to Windows users:*** you may need to change the path for the lint script in package.json to be `node_modules/eslint/bin/eslint`
236245

237-
6. Add a commit using `git commit`:
238-
239-
This project uses [`lerna`](https://lernajs.io/) to do automatic releases and generate a changelog based on the commit history. So we follow [a convention][3] for commit messages. Please follow this convention for your commit messages.
240-
241-
7. Rebase
242-
243-
Use `git rebase` (not `git merge`) to sync your work from time to time. Ensure all commits related to a single issue have been [squashed](https://github.com/ginatrapani/todo.txt-android/wiki/Squash-All-Commits-Related-to-a-Single-Issue-into-a-Single-Commit).
244-
245-
```sh
246-
git fetch upstream
247-
git rebase upstream/main
248-
```
246+
4. **Follow commit conventions** - This project uses [`lerna`](https://lernajs.io/) to do automatic releases and generate a changelog based on the commit history. So we follow [conventional commit formatting](https://www.conventionalcommits.org/en/v1.0.0/) for all commit messages. Please follow this convention for your commit messages.
249247

250-
8. Push
251-
252-
```sh
253-
git push origin my-branch
254-
```
255-
256-
9. Create a pull request
248+
5. **Create a pull request**
257249

258250
[Open a pull request](https://help.github.com/articles/using-pull-requests/) with a clear title and description against the `main` branch. Please be sure to include all of the following in your PR:
259251

@@ -276,6 +268,35 @@ Please help in ensuring all relevant issues are closed and that any subsequent i
276268
- If an issue in Core will affect a component in PF-React, this issue should link to the main PF-React issue.
277269
- The CSS Developers and UX Designers should be tagged to review their respective PF-React issue.
278270

271+
## Troubleshooting
272+
273+
### Common Issues and Solutions
274+
275+
**Build Failures:**
276+
- Ensure you're using Node.js version 22 or higher: `node --version`
277+
- Clear node_modules and reinstall: `rm -rf node_modules && yarn install`
278+
- Clear yarn cache: `yarn cache clean`
279+
280+
**Test Failures:**
281+
- Run tests in watch mode for debugging: `yarn test --watch`
282+
- Update snapshots if components have intentionally changed: `yarn test -u`
283+
284+
**Linting Errors:**
285+
- Auto-fix linting issues: `yarn lint --fix`
286+
- Format code with Prettier: `yarn prettier`
287+
288+
**Development Server Issues:**
289+
- Clear cache and restart: `rm -rf node_modules/.cache && rm -rf packages/react-docs/.cache && yarn start`
290+
291+
**Integration Issues:**
292+
- Ensure your branch is up to date with the latest changes before submitting PR
293+
- Squash commits related to a single issue before submitting
294+
295+
**Still having issues?**
296+
- Check existing [GitHub issues](https://github.com/patternfly/patternfly-react/issues)
297+
- Ask for help in [PatternFly Slack](https://patternfly.slack.com/) `#patternfly-react` channel
298+
- Create a new issue with detailed error information
299+
279300
## Becoming a maintainer
280301

281302
The documentation for becoming a maintainer has been taken from [Foreman](https://theforeman.org/handbook.html#Becomingamaintainer) and adapted for the PatternFly project.

0 commit comments

Comments
 (0)