Skip to content

Commit a3f8125

Browse files
byigitterbilnas
andauthored
docs: revamp contributing guidelines with visuals (#970)
For closing #952 Co-authored-by: Erbil <[email protected]>
1 parent 63e0bcc commit a3f8125

File tree

4 files changed

+90
-29
lines changed

4 files changed

+90
-29
lines changed

CONTRIBUTING.md

+90-29
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,113 @@
1-
# How to contribute Baklava Design System
1+
# Contributing to Baklava Design System 🎨
22

3-
You are very welcome if you want to contribute to the Baklava Design System. You can make several types of contributions, such as:
3+
Welcome to Baklava! We're excited that you're interested in contributing. This guide will help you get started with making contributions to our design system.
44

5-
* Fixing bugs in code
6-
* Implementing new features
7-
* Improving documentation
8-
* Suggesting design ideas
5+
![Baklava Design System](./docs/images/contributing-header.png)
96

10-
## Making a contribution using an Issue
7+
## Ways to Contribute 🚀
118

12-
Did you notice a bug? Or a missing/wrong part in documentation? Or do you have a suggestion about implementation or design? Please feel free to [create an issue](https://github.com/Trendyol/baklava/issues/new) for that. Please provide clear and detailed information about your request or report as much as possible. Anyone can join to share their ideas/experiences about the issue you created.
9+
There are several ways you can contribute to Baklava:
1310

14-
If you have a question about how to use our design system or a specific component, please use our [discussion board](https://github.com/Trendyol/baklava/discussions).
11+
- 🐛 **Fix Bugs**: Help us squash bugs in the codebase
12+
-**Add Features**: Implement new components or enhance existing ones
13+
- 📝 **Improve Docs**: Make our documentation clearer and more helpful
14+
- 💡 **Share Ideas**: Suggest improvements to our design system
1515

16-
## Making a contribution using a PR
16+
## Getting Started 🌟
1717

18-
If you notice a problem in our repository (whether it's in the code or docs) and are able to fix it, just fork the project, make your changes, and create a PR for it. You can refer to [GitHub documentation](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches) if you are not sure how to propose a change to a repository.
18+
### 1. Creating an Issue 📋
1919

20-
## Baklava contribution rules
20+
Found a bug or have a suggestion? [Create an issue](https://github.com/Trendyol/baklava/issues/new)!
2121

22-
We have some rules to make contribution process smooth and as automated as possible.
22+
![Creating an Issue](./docs/images/create-issue.gif)
2323

24-
### Coding conventions
24+
**Tips for a great issue:**
25+
- Clearly describe what you observed
26+
- Include steps to reproduce (for bugs)
27+
- Add screenshots if relevant
28+
- Use our issue templates
29+
- Share any relevant context or examples
2530

26-
We implemented several linters and static code checkers to be sure if every new code is synced with the style of current codebase. Please run the `npm run lint` to check if your changes conflict with our rules.
31+
> 💬 For questions about using Baklava, please use our [discussion board](https://github.com/Trendyol/baklava/discussions).
2732
28-
### 100% Code coverage with unit tests
33+
### 2. Making a Pull Request 🔄
2934

30-
We expect to cover every line of code we wrote in our unit tests. If you make changes in the code, please ensure that you cover those changes inside the related test file. To do that, you can run the `npm test` command and check the `coverage` folder for a detailed report. This command is automatically executed in every commit, and if coverage is under 100%, your PR checks will fail.
35+
If you notice a problem in our repository (whether it's in the code or docs) and are able to fix it, follow these steps:
3136

32-
### Commit rules
37+
1. Fork the repository
38+
2. Create your feature branch
39+
3. Make your changes
40+
4. Submit a pull request
3341

34-
The Baklava library has an automated release flow, and our release versions and release notes are automatically generated from git commit messages. So commit messages are very important to release changes properly. We have a specific guideline about committing rules, please refer it.
42+
![PR Process](./docs/images/pr-process.gif)
43+
Need help? Check out the [GitHub documentation](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches) on creating PRs.
3544

36-
### Design review
45+
## Contribution Guidelines ✅
3746

38-
In every push to a PR, we are running automated visual regression tests to be sure we are not breaking any components visual output accidentally. When you are done with your changes and created a PR, if you have some changes that effects visual output of any components, then our automated flow will notice this and block PR for a design review. Design reviews are done by designers involved in project. If the changes are intentional, they will be approved, and once the PR is merged, the new designs will serve as references for upcoming PRs. If there are no visual changes, this step will pass automatically, and there will be no need for a review from a designer.
47+
### 1. Coding Conventions 💻
3948

40-
### Should be RTL-Aware
49+
We maintain strict code quality standards:
50+
- Run `npm run lint` before submitting your changes
51+
- Follow our code style guidelines
52+
- Ensure your code syncs with our current codebase style
53+
- Fix any linting errors before submitting
4154

42-
Baklava components support Right-to-Left (RTL) text direction, which is crucial for languages written from right to left. When developing or modifying components, ensure proper RTL support by following these guidelines:
55+
### 2. Test Coverage Requirements 🧪
4356

44-
1. Use the `--bl-text-x-direction` CSS custom property for transformations and directional styling.
45-
2. Utilize CSS logical properties (e.g., `inline-start`, `inline-end`, `margin-inline-start`) instead of directional properties.
46-
3. Use `inset` with logical values for positioning.
57+
We maintain 100% code coverage:
58+
- Write unit tests for all new code
59+
- Run `npm test` to check coverage
60+
- Review the `coverage` folder for detailed reports
61+
- Tests run automatically on commit
62+
- PRs will fail if coverage drops below 100%
4763

48-
For a comprehensive guide on RTL support and detailed examples, please refer to our [Right-to-Left (RTL) documentation](/docs/documentation-right-to-left-rtl--documentation).
64+
### 3. Commit Message Guidelines 📝
4965

50-
### Enough approvals to merge
66+
Our release process is automated:
67+
- Release versions are generated from commit messages
68+
- Release notes are automatically created
69+
- Follow our specific commit message format
70+
- Each commit should be meaningful and descriptive
5171

52-
Every PR should be reviewed and approved by at least one of the core contributors. Please add needed information to PR description to help making review process quicker and easier.
72+
### 4. Design Review Process 🎨
73+
74+
We protect our visual consistency:
75+
- Automated visual regression tests run on each PR
76+
- Changes affecting component visuals require design review
77+
- Design team must approve visual changes
78+
- Approved changes become reference for future work
79+
- Non-visual changes skip design review automatically
80+
81+
### 5. RTL Support Requirements 🌐
82+
83+
All components must support Right-to-Left (RTL) languages:
84+
85+
1. Use `--bl-text-x-direction` CSS property for transformations
86+
2. Implement CSS logical properties:
87+
```css
88+
/* ✅ Do this */
89+
margin-inline-start: 1rem;
90+
padding-inline-end: 1rem;
91+
92+
/* ❌ Not this */
93+
margin-left: 1rem;
94+
padding-right: 1rem;
95+
```
96+
3. Use `inset` with logical values for positioning
97+
98+
### 6. PR Review Requirements 👥
99+
100+
Every PR must meet these criteria:
101+
- At least one core contributor approval
102+
- Detailed PR description
103+
- All automated checks passing
104+
- Documentation updates if needed
105+
- Test coverage requirements met
106+
107+
## Need Help? 💬
108+
109+
- Check our [documentation](https://baklava.design/)
110+
- Join our [discussion board](https://github.com/Trendyol/baklava/discussions)
111+
- Reach out to core team members
112+
113+
Thank you for contributing to Baklava! 🙏

docs/images/contributing-header.png

47.6 KB
Loading

docs/images/create-issue.gif

5.48 MB
Loading

docs/images/pr-process.gif

8.18 MB
Loading

0 commit comments

Comments
 (0)