contributing.mdx 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. # Contributing
  2. Pull requests are welcome. For major changes, please [open an issue](https://github.com/excalidraw/excalidraw/issues/new) first to discuss what you would like to change.
  3. We have a [roadmap](https://github.com/orgs/excalidraw/projects/3) which we strongly recommend to go through and check if something interests you.
  4. For new contributors we would recommend to start with *Easy* tasks.
  5. In case you want to pick up something from the roadmap, comment on that issue and one of the project maintainers will assign it to you, post which you can discuss in the issue and start working on it.
  6. ## Setup
  7. ### Option 1 - Manual
  8. 1. Fork and clone the repo
  9. 1. Run `yarn` to install dependencies
  10. 1. Create a branch for your PR with `git checkout -b your-branch-name`
  11. > To keep `master` branch pointing to remote repository and make pull requests from branches on your fork. To do this, run:
  12. >
  13. > ```bash
  14. > git remote add upstream https://github.com/excalidraw/excalidraw.git
  15. > git fetch upstream
  16. > git branch --set-upstream-to=upstream/master master
  17. > ```
  18. ### Option 2 - CodeSandbox
  19. 1. Go to https://codesandbox.io/p/github/excalidraw/excalidraw
  20. 1. Connect your GitHub account
  21. 1. Go to Git tab on left side
  22. 1. Tap on `Fork Sandbox`
  23. 1. Write your code
  24. 1. Commit and PR automatically
  25. ## Pull Request Guidelines
  26. Don't worry if you get any of the below wrong, or if you don't know how. We'll gladly help out.
  27. ### Title
  28. Make sure the title starts with a semantic prefix:
  29. - **feat**: A new feature
  30. - **fix**: A bug fix
  31. - **docs**: Documentation only changes
  32. - **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
  33. - **refactor**: A code change that neither fixes a bug nor adds a feature
  34. - **perf**: A code change that improves performance
  35. - **test**: Adding missing tests or correcting existing tests
  36. - **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  37. - **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
  38. - **chore**: Other changes that don't modify src or test files
  39. - **revert**: Reverts a previous commit
  40. ### Changelog
  41. Add a brief description of your pull request to the changelog located here: [changelog](https://github.com/excalidraw/excalidraw/blob/master/CHANGELOG.md)
  42. Notes:
  43. - Make sure to prepend to the section corresponding with the semantic prefix you selected in the title
  44. - Link to your pull request - this will require updating the CHANGELOG _after_ creating the pull request
  45. ### Testing
  46. Once you submit your pull request it will automatically be tested. Be sure to check the results of the test and fix any issues that arise.
  47. It's also a good idea to consider if your change should include additional tests. This is highly recommended for new features or bug-fixes. For example, it's good practice to create a test for each bug you fix which ensures that we don't regress the code in the future.
  48. Finally - always manually test your changes using the convenient staging environment deployed for each pull request. As much as local development attempts to replicate production, there can still be subtle differences in behavior. For larger features consider testing your change in multiple browsers as well.
  49. :::note
  50. Some checks, such as the `lint` and `test`, require approval from the maintainers to run.
  51. They will appear as `Expected — Waiting for status to be reported` in the PR checks when they are waiting for approval.
  52. :::
  53. ## Translating
  54. To translate Excalidraw into other languages, please visit [our Crowdin page](https://crowdin.com/project/excalidraw). To add a new language, [open an issue](https://github.com/excalidraw/excalidraw/issues/new) so we can get things set up on our end first.
  55. Translations will be available on the app if they exceed a certain threshold of completion (currently **85%**).