Skip to content

Commit f40cb29

Browse files
committed
docs: improve how to contribute documentation
1 parent a5498a4 commit f40cb29

File tree

1 file changed

+127
-3
lines changed

1 file changed

+127
-3
lines changed

CONTRIBUTING.md

Lines changed: 127 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,130 @@
1-
We appreciate all feedback and support of the project.
2-
Please use the issue tracker at GitHub to submit bug reports or feature requests:
1+
# How to contribute
32

4-
https://github.com/cypht-org/cypht/issues
3+
Thank you for choosing Cypht webmail and for your willingness to contribute to its development! Your support helps make it better for everyone. There are many ways to get involved, regardless of your technical skill level: you can **report a bug** you've encountered, **propose an exciting new feature**, submit a **code fix** for an existing issue, or **improve our documentation** to make it clearer for other users. Every contribution, big or small, is valued and makes a real difference to the project and our community.
4+
5+
## Reporting Bugs
6+
7+
Bugs are tracked as [GitHub issues](https://github.com/cypht-org/cypht/issues). Before creating a new issue:
8+
- **Search existing issues** to see if the problem has already been reported.
9+
- If it's a new bug, **create a new issue**.
10+
11+
Please provide the following information in your bug report:
12+
- A clear, descriptive title.
13+
- A detailed description of the behavior and what you expected to happen instead.
14+
- Steps to reproduce the problem.
15+
- Your environment: OS (name and version), Browser, and any other relevant details.
16+
17+
## Suggesting new features
18+
19+
We welcome ideas for new features and improvements. For any new proposed feature, you need to create also a **new issue**. This allows maintainers and the community to discuss the approach before you write any code. Before submitting the issue:
20+
- **search existing ideas** to avoid duplicates,
21+
- **Provide a clear description** of the proposed feature and the problem it solves.
22+
23+
## Submit a bug fix
24+
25+
Always link your code changes to a GitHub issue. If one doesn't exist for your change, please create it first. Next you will need to follow the Git workflow.
26+
27+
## Git contribution workflow
28+
29+
1. Fork the Official Repository
30+
31+
Navigate to the official Cypht repository on GitHub (https://github.com/cypht-org/cypht) and click the "Fork" button in the top-right corner.
32+
33+
2. Clone Your Fork Locally
34+
35+
```
36+
git clone https://github.com/YOUR_USERNAME/cypht.git
37+
cd cypht
38+
```
39+
40+
3. Configure Remote Repositories (origin & upstream)
41+
42+
```
43+
# Check the existing remote name (it should be 'origin' pointing to your fork)
44+
git remote -v
45+
46+
# Add the official Cypht repository as the 'upstream' remote
47+
git remote add upstream https://github.com/cypht-org/cypht.git
48+
49+
# Verify both remotes are set correctly
50+
git remote -v
51+
```
52+
53+
4. Create a new Branch (for the new Feature or a bug fix)
54+
55+
```
56+
git checkout -b feature-amazing-new-feature
57+
# or
58+
git checkout -b fix-issue-123-description
59+
```
60+
61+
5. Write Code and run tests
62+
63+
**Code **
64+
65+
This is the core development phase where you implement your change. Before writing a line of code, take a moment to explore Cypht's architecture and code style.
66+
67+
Make changes that are minimal and specific to the issue you are solving. Avoid unnecessary refactoring or style changes in unrelated code.
68+
69+
Match the existing code style (indentation, bracket placement, naming conventions for variables and functions). This makes your code feel like a natural part of the project.
70+
71+
Add clear comments for complex logic, but strive to write code that is self-documenting through good variable and function names.
72+
73+
**Manual test**
74+
75+
Manual testing is your first line of defense to catch obvious issues and logic errors. **Do not skip this**.
76+
77+
Example:
78+
79+
**For a Backend/Bug Fix** (e.g., fixing IMAP connection errors):
80+
81+
- **Reproduce the Bug**: First, confirm you can reproduce the original issue described on GitHub.
82+
83+
- **Test the Fix**: Apply your change and verify the specific error no longer occurs.
84+
85+
- **Check for Regressions**: This is vital. Does your fix break any other existing functionality?
86+
87+
- Can you still read emails?
88+
- Can you still send emails?
89+
- Do all the other modules still load correctly?
90+
91+
- **Test with Different Configurations**: If possible, test with different mail servers to ensure robustness.
92+
93+
**Write Automated tests (for the new feature... if possible)**
94+
95+
6. Run automated tests (if possible)
96+
97+
- Unit Tests and integration tests with PHPUnit
98+
- End to end tests with Selenium
99+
100+
You can learn about how to run these tests [here](https://www.cypht.org/developers-documentation/) in the **Run Tests** section.
101+
102+
7. Commit Changes
103+
104+
Stage and commit your changes with clear, descriptive messages.
105+
106+
```
107+
# Stage changes
108+
git add .
109+
110+
# Commit changes (be specific!)
111+
git commit -m "feat(backend): allow search flagged in all folders if enabled in settings"
112+
```
113+
114+
8. Push to Your Fork and Create a Pull Request (PR)
115+
116+
```
117+
git push -u origin feature-allow-flagged-emails-search
118+
```
119+
120+
Go to your fork on GitHub. You will see a prompt to "Compare & pull request" for the newly pushed branch. Click it.
121+
122+
Fill out the PR template:
123+
124+
- Title: Clear summary
125+
- Description: Detail what you did, why you did it, and how it can be tested (if possible).
126+
127+
128+
**We appreciate all feedback and support of the project.**
5129

6130
If you have questions, please join our chat at: https://gitter.im/cypht-org/community

0 commit comments

Comments
 (0)