-
-
Notifications
You must be signed in to change notification settings - Fork 32
Guidelines for developing the user interface
Christoph Stoll edited this page Oct 11, 2021
·
4 revisions
As with everything, these are evergreen pragmatic rules and should be taken with a grain of salt!
- Designing and implementing responsively (for mobile devices)
- Designing and implementing accessibly
List of high level codebase guidelines to follow when working on the frontend (FE) portion of Climate Connect. This should document anything that's external to our already opinionated linting and formatting rules (e.g. https://prettier.io/docs/en/option-philosophy.html).
- Alphabetize props when possible
- Delineate relative and 3rd party imports with a new line or space
- Ensure all text is added to
frontend/public/texts...so that translations can be added for German - Prefer newlines for
ifandelseblocks over same line - When introducing new elements or components try to always use Material UI components where possible for consistency. This also allows you to easily use spacing, colors and more from our theme and the Material UI default theme where we didn't override it. Watch out when working with the docs, we are still on V4!
- Use Javascript ES6 functions wherever possible and applicable. This includes using map, reduce, ... instead of manually looping through arrays/objects,
let/constinstead ofvar, arrow functions for everything except a component's default function.
-
<>overReact.Fragment - Favor direct calls to hooks like
useEffectoverReact.useEffect
Join the Slack for the most up to date discussion on Climate Connect work.