Skip to content

Latest commit

 

History

History
72 lines (49 loc) · 1.88 KB

CONTRIBUTING.md

File metadata and controls

72 lines (49 loc) · 1.88 KB

Jore-map-ui conventions

Git conventions

  • When making a PR, write closes #{issue_id(s)} or resolves #{issue_id(s)}
  • Branch name: {issue_number}-{describing_name}

Git columns

  • Backlog - tasks that are blocked or need planning
  • To do - tasks that aren't blocked. These tasks should be in priority order.
  • Sprint - tasks to do in the current sprint
  • In progress - tasks that are in progress or need review fixes
  • Done sprint - completed tasks in the current sprint
  • Done - completed tasks from previous sprints

Code conventions

  • Indent 4 whitespaces
  • Use async await instead of promises
  • /utils: files that export a class with static methods or a set of methods
  • /helpers components with state

Typescript

  • Use Date type if property's type is date
  • Enums: use pascal case

React

  • Use <div> instead of <span> (only use span if there is a reason to use it)
  • In a component, first div's className should be {componentName}View
  • Use classnames if there are multiple classes
  • Use arrow functions in components
  • Use render prefix in methods that return JSX or HTML
  • Use export and export default at the end of file
  • Put lifecycle methods on top of components after constructor

App development

  • Always use component if saving (or deleting) something from jore

IModels

  • IDs are in the same format as in jore.

MobX

  • Use @inject when importing stores whenever possible.

Annotations

Variables order:

set foo1
get foo1
set foo2
get foo2

actions
...

Cypress

  • target elements with data-cy='<className_here>'