If you are a translators, please see translating guideline for more information.
If you want to make edit to this repository, make sure you're familiar with Typescript, CSS and React, with the exception of grammar fixes of course.
We use Geist-UI as our component library. You might want to read and get familier with it before starting your contribution.
We use Prettier as formatter. All jsx naming should follow Airbnb style, and all css classes should use dash-case with the exception of BEM naming. 2 spaces as indent.
To start your contribution, please follow the steps below
-
Fork this repo
-
Clone your fork
git clone url://to.your/github/fork.git
VSC Tip: You can clone your fork in VSC by clicking on
clone git repository
in the start menu, clicking on clone from GitHub, and selecting your repository.
- Install dependencies
cd src && npm install
VSC Tip: If you have code-runner installed, you can open src/package.json and hit the run button. This will install all dependencies for you automatically.
- Run server
npm run dev
You can now go to https://localhost:3000 in your browser and it will update in real time.
VSC Tip: If you have code-runner installed, you can click on run button anywhere in VSC and the code will just run.
- Make changes as you want
Tip: To make the webpage compatible with mobile screen, try the
dynamic-width.ts
library in lib folder (JSDoc is available).
- Commit & push your changes
git commit -m "concise commit message"
git push
VSC Tip: you can do all of this work with GUI in the built in Source Control extension tab
- Create pull request on GitHub
You need to import the translation library by add this code to the beginning of your code
import { TranslatableText } from "../locale/TranslatableText";
Then wrap your text in TranslatableText tag, like this:
<TranslatableText>I will be translated</TranslatableText>
Then just wait for translators to add the translation.
Currently, TranslatableText only support text, hence why it is name TranslatableText and not Translate or TranslatableComponent. Link injection is possible by wrapping the hyperlinked text in [%a] and manipulating the link property in TranslatableText (can be both relative or absolute url), and the styling for hyperlinked text can be manipulated through linkStyle property. Wrapping text in [%b] will make it bold.
To make the review process faster, it's recommended to have list of changes in comment section and include screenshots if there are changes in the design. List of changes should be concise.
[nothing]
❌ : What did you change? Reviewer need to guess what your code does
Make browsing experience better on mobile
❌ : Better is subjective, and we still don't know what you did
Make pages respond to mobile screen
Meh: It's acceptable
Footer: implement adaptive layout on small screen
✅ : Now we know why a file changed and what it's suppose to do.
Since commits to the dev branch will automatically get deployed, please make sure all pull requests are complete. Run npm run build
in the src directory to double check there is no error. You can create draft pull requests, which will allow other people to see changes, give feedbacks, and request changes.
Even if you're in the organisation, pull requests should be reviewed and approved by another member before merging, with exceptions of fixing a build fail or security breach. Complete redesign of an existing webpage will need approval from a team lead.
PLEASE SUBMIT A PR, NO DIRECT COMMITS!!!