You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The standard workflow for working with forks is to clone the fork and
add the main repository as upstream. Also recommend using git switch
instead of checkout.
Copy file name to clipboardExpand all lines: Documentation/GettingStartedContributing.md
+20-8Lines changed: 20 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,11 @@
1
1
# Getting started contributing to Ladybird
2
+
2
3
Welcome to the Ladybird web browser project!
3
4
4
5
This document aims to be a beginner-friendly guide to your first Ladybird contribution; remember to read the linked documentation for more information.
5
6
6
7
## Getting familiar with the project
8
+
7
9
Ladybird is a large project making use of many homegrown and third-party libraries, written primarily in C++.
8
10
9
11
It is recommended you read the README and FAQs in case they already answer any questions you have:
@@ -15,14 +17,17 @@ It is recommended you read the README and FAQs in case they already answer any q
15
17
The [Discord server](https://discord.gg/nvfjVJ4Svh) is the preferred way to get in contact with the maintainers and community.
16
18
17
19
## Getting familiar with browser engineering in general
20
+
18
21
If you’ve never worked on browser-engine code before, and you’re not sure where to begin — one great place to get started is by reading the book [Web Browser Engineering](https://browser.engineering/). It explains how browser engines in general work, and how they’re built — by walking you through real code for actually building all the parts of a basic but complete browser engine (networking code, HTML parsing, layout engine, JavaScript handling, and more), in a couple thousand lines of Python.
19
22
20
23
## Building the code
24
+
21
25
Ladybird must be built from source during this pre-alpha stage of development, and currently natively supports Linux and macOS; running it on Windows requires WSL.
22
26
23
27
Carefully follow the steps outlined in the [build instructions](BuildInstructionsLadybird.md). If you are facing issues, consult the [troubleshooting guide](Troubleshooting.md) and the #build-problems channel on Discord.
24
28
25
29
## Finding bugs and other issues
30
+
26
31
Here are some of the ways you can find an issue in Ladybird:
27
32
28
33
* By checking the [issue tracker](https://github.com/LadybirdBrowser/ladybird/issues).
@@ -41,15 +46,19 @@ That said, if you _do_ want to start learning some C++ programming yourself, the
41
46
The list of [beginner-friendly issues](https://github.com/LadybirdBrowser/ladybird/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) is usually very short, and there currently isn't a strict roadmap of issues to address first. It is ultimately up to you to choose a task that you feel comfortable working on.
42
47
43
48
## Submitting an issue
49
+
44
50
If you have found an issue that is not already in the [issue tracker](https://github.com/LadybirdBrowser/ladybird/issues), you may submit it. Do not submit general questions about the project, please use the Discord server instead.
45
51
46
52
Read the [full contribution guidelines](/CONTRIBUTING.md), in particular the Issue policy and Human language policy. It is recommended you reduce the website to the most minimal amount of HTML/CSS/JS which still results in the error (if applicable), and provide the result expected from other browsers vs Ladybird. Read the [detailed issue-reporting guidelines](/ISSUES.md) for the exact steps to do so.
47
53
48
54
## Submitting your code
55
+
49
56
### Getting familiar with C++
57
+
50
58
Ladybird requires at least a basic knowledge of C++, consult a tutorial website like [Learn C++](https://www.learncpp.com/) and online references if you need help. Start small before attempting to make large changes, as they require more in-depth C++ knowledge.
51
59
52
60
### Getting familiar with the codebase
61
+
53
62
Ladybird makes use of the included AK library instead of the C++ STL, and employs a specific coding style based around it. Unfortunately most AK and internal library facilities are not documented; you may need to look for the header files, and examples of usage in existing code.
54
63
55
64
Developer documentation:
@@ -60,34 +69,37 @@ Developer documentation:
60
69
*[String formatting](StringFormatting.md)
61
70
62
71
### Using `git`
63
-
The recommended way to work on Ladybird is by cloning the main repository locally, then forking it on GitHub and adding your repository as a Git remote:
72
+
73
+
The recommended way to work on Ladybird is by forking the main repository on GitHub, then cloning the fork and adding the main repository as a git remote:
You can then create a new branch and start making changes to the code:
80
+
69
81
```sh
70
-
git checkout -b mybranch
82
+
git switch -c mybranch
71
83
```
72
84
73
85
And finally push the commits to your fork:
86
+
74
87
```sh
75
-
# ONLY run this the first time you push
76
-
git push --set-upstream myfork mybranch
77
-
# This will work for further pushes
78
88
git push
79
89
```
80
90
81
91
If you wish to sync your branch with master, or locally resolve merge conflicts, use:
92
+
82
93
```sh
83
94
# On mybranch
84
-
git fetch origin
85
-
git rebase master
95
+
git fetch upstream
96
+
git rebase upstream/master
86
97
```
87
98
88
99
You may be asked to perform actions like squashing, rewording, or editing commits. See the [Rewriting history in Git](https://www.youtube.com/watch?v=ElRzTuYln0M) YouTube tutorial for more information.
89
100
90
101
### Creating a pull request
102
+
91
103
Make sure your code meets the requirements in the [full contribution guidelines](/CONTRIBUTING.md) and [coding style](CodingStyle.md). Additionally:
92
104
93
105
* Make correctly formatted, atomic commits (building the project at every commit should succeed).
0 commit comments