|
| 1 | +# Contributing |
| 2 | + |
| 3 | +Thanks for considering contributing to our platform. We really appreciate the help and would |
| 4 | +like to give you some tips on how to contribute in the most effective way. |
| 5 | + |
| 6 | +Please make sure to check out our [Code of Conduct](CODE_OF_CONDUCT.md) and |
| 7 | +make sure to follow it in all your interactions within this project and the |
| 8 | +ReasonML community. |
| 9 | + |
| 10 | +## Ways to contribute |
| 11 | + |
| 12 | +- Writing docs for Belt (later on BuckleScript, Reason, ReasonReact) |
| 13 | +- Joining in discussions on our [issue tracker](https://github.com/reason-association/reasonml.org/issues) |
| 14 | +- Give feedback for improvements (incomplete / missing docs, bad wording, |
| 15 | + search user experience / design, etc.) |
| 16 | +- Advanced: Help building platform features (design system, automatic testing, markdown parsing, etc.) |
| 17 | + |
| 18 | +## How to get started? |
| 19 | + |
| 20 | +### Find an issue |
| 21 | + |
| 22 | +Before you start any work or submit any PRs, make sure to check our [issue |
| 23 | +tracker](https://github.com/reason-association/reasonml.org/issues) for any |
| 24 | +issues or discussions on the topic. |
| 25 | + |
| 26 | +If you can't find any relevant issues, feel free to create a new one to start a |
| 27 | +discussion, or contact @ryyppy / @nikgraf on the [Reason |
| 28 | +Discord](https://discord.gg/reasonml) channel for quick feedback. We usually |
| 29 | +assign issues to a responsible person to prevent confusion and duplicate |
| 30 | +work, so always double check if an issue is currently being worked on, or talk |
| 31 | +to the current assignee to take over the task. |
| 32 | + |
| 33 | +**Always make sure to get feedback from the core maintainers before starting any work** |
| 34 | + |
| 35 | +The project follows very specific goals and tries to deliver the highest value |
| 36 | +with the least amount of resources. Please help us focus on the tasks at hand |
| 37 | +and don't submit any code / bigger refactorings without any proper discussion |
| 38 | +on the issue tracker. Otherwise your PR might not be accepted! |
| 39 | + |
| 40 | +If you need inspiration on what to work on, you can check out issues tagged |
| 41 | +with [`good first |
| 42 | +issue`](https://github.com/reason-association/reasonml.org/issues?q=is%3Aissue+is%3Aopen+label%3A"good+first+issue"). |
| 43 | + |
| 44 | +### Discuss an issue |
| 45 | + |
| 46 | +We really appreciate all input from users, community members and potential |
| 47 | +contributors. Please make sure to consider the other person's opinion and |
| 48 | +don't assume any common knowledge. |
| 49 | + |
| 50 | +**Most importantly: Keep it professional and be nice to eachother** |
| 51 | + |
| 52 | +There might be situations where others don't understand a proposed feature or |
| 53 | +architectural change. That's fine, discussions are always welcome! Communicate |
| 54 | +in clear actionables, make your plans clear and always to stick to the original |
| 55 | +topic. |
| 56 | + |
| 57 | +If other contributors disagree with certain proposals and don't change their |
| 58 | +mind after longer discussions, please don't get discouraged when an issue gets |
| 59 | +closed / postponed. Everyone tries their best to make the platform better, and |
| 60 | +to look at it in another perspective: Closed issues are also a highly valuable |
| 61 | +resource for others to understand technical decisions later on. |
| 62 | + |
| 63 | +### Communication Channels |
| 64 | + |
| 65 | +- [Issue Tracker](https://github.com/reason-association/reasonml.org/issues) |
| 66 | +- [ReasonML Discord Chat](https://discord.gg/reasonml) -> [#docs](https://discord.gg/fscQAnj) Channel |
| 67 | +- [ReasonML Discourse (General / mostly unrelated discussions)](https://reasonml.chat) |
| 68 | + |
| 69 | +## Working on the reasonml.org codebase |
| 70 | + |
| 71 | +We try to keep our contribution guidelines to a minimum. Please keep following |
| 72 | +rules in mind whenever writing code. |
| 73 | + |
| 74 | +### Keep it simple |
| 75 | + |
| 76 | +The less code we write, the better. If there's a way to do rendering on the |
| 77 | +server, or enhance existing markdown files, we prefer that over client-side |
| 78 | +rendering and external loading. |
| 79 | + |
| 80 | +We also try to keep our third-party dependencies to a minimum. We use specific |
| 81 | +high value frameworks to make things work (`unified`, `remark`, `mdx`, |
| 82 | +`bs-platform`, etc). Please try to keep a small JS footprint, especially for |
| 83 | +client side code (to keep the bundle size small). |
| 84 | + |
| 85 | +### Think about the target audience & UX |
| 86 | + |
| 87 | +The reasonml.org project aims to be the best documentation experience for |
| 88 | +Reason / BuckleScript users. We don't necessarily need to target OCaml users as |
| 89 | +well (at least for the start), so keeping the docs minimalistic is important. |
| 90 | + |
| 91 | +Also check if there are any designs for certain UI components and always think |
| 92 | +about how to get the best user experience for the users. Jumpy UI, slow |
| 93 | +loading, bloaty JS bundles and bad accessibility is not what we stand for. |
| 94 | + |
| 95 | +### Comply to our CSS ways |
| 96 | + |
| 97 | +We use [TailwindCSS](https://tailwindcss.com) for our component styling. Check |
| 98 | +out the [tailwind.config.js](tailwind.config.js) file for configured tailwind |
| 99 | +features, colors, border-radius values etc.. If you are not familiar with |
| 100 | +Tailwind, check out existing components for inspiration. |
| 101 | + |
| 102 | +We sometimes also need to fall back to common css (with tailwind `@apply` |
| 103 | +directives to enforce our style system). You can find the CSS main entrypoint |
| 104 | +in [styles/main.css](styles/main.css). |
| 105 | + |
| 106 | +**Only fall back to plain CSS if absolutely necessary** |
| 107 | + |
| 108 | +Most of the stuff we want to build can be built as components with Tailwind |
| 109 | +classes. We mostly use global CSS if we need to interact with 3rd party code |
| 110 | +(such as `highlightjs`), or if we need features like child selectors (markdown |
| 111 | +rendering with nested lists). |
| 112 | + |
| 113 | +## PR process |
| 114 | + |
| 115 | +- Clone the project and follow the [README](README.md) instructions |
| 116 | +- Always run the page locally and verify your changes (especially when working on code examples) |
| 117 | +- When writing markdown with code examples, always run `yarn test` to prevent broken code |
| 118 | +- Feel free to open `Draft PRs` when you are working on bigger features (good |
| 119 | + for visibility and asking for feedback) |
0 commit comments