Hello everyone, I am heiyu. About Ant Design, I believe everyone is very familiar with it. Before I contributed to Ant Design, I have used Ant Design in many background management system projects at work. The biggest feeling for me is that it is easy to use, beautiful, simple and stable. Now that the v5 version has been released, I strongly recommend everyone to try it. I am also fortunate to have developed the v5 version of the Tour
component and App
component, as well as some other maintenance work. Let me share with you the PR process of Ant Design, hoping to provide a reference for who are interested in building together for the community.
How to gracefully contribute code on github
Become a Community Collaborator
git clone https://github.com/[yourGithubAccount]/ant-design.git
Note: [yourGithubAccount]
changed to your own github username
cd ant-designgit remote add upstream https://github.com/ant-design/ant-design
git pull upstream master
Now we are on the master branch from the fork, and this master is reserved for remote code tracking upstream
git pullgit checkout fix-branch
Now we can change the code on the branch
To help you start your first attempt, we use good first issues marks bugs and small features that are relatively easy to fix, and these issues are good as your first try. help wanted After all, it is easy to take over as a developer some problems.
npm start
A website running Ant Design locallynpm run test
. Tips: You can use npm test -- --watch TestName
to run specified tests during development.npm test -- -u
to update jest snapshot and put These updates are also committed (if any).npm run lint
.A common problem is that the remote upstream (ant-design/master) has a new update, which will lead to conflicts when we submit the Pull Request, so we can put the commits of other remote developers and our commit is merged.
Switch to the master
branch with the following code:
git checkout master
git pull upstream master
git checkout fix-branch
commit
of master
into fix-branch
, and resolve conflicts if there are conflicts:git rebase master
fix-branch
:git push origin fix-branch
You can switch to the branches page on your github code repository page, click the fix-branch branch, click the New pull request
button, add relevant comments and submit. Or switch to the code repository of the fix-branch branch, click the Compare & pull request
button, add relevant comments and submit.
On the PR page, carefully fill in the submission description according to the default format, and you can refer to the merged PR.
Check whether all the checks are passed. If you don’t click details
, check the corresponding error report, and push again after repairing.
Repair method:
npm run install-react-16npm run test component/XXX
After a period of continuous maintenance, Collaborators will start the invitation mechanism and initiate a vote in #3222. When enough votes are met, you will be officially invited to become a Collaborator.
To learn more about Ant Design's development process and considerations, see: