x5engine / react-time-tracking

time tracker app on react

Home Page:https://vivid-trace.firebaseapp.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React time tracking CircleCI codecov

Time tracking app on React, try demo.

The app is inspired by toggl.com.

Tech stack

Web application based on React (clientside) and Firebase (serverside)

Features

Authentication

  • Signup using email/password

Time entry

  • Can add time entry
  • Can track time spent on time entry and stop a time entry tracking
  • Can list time entries
  • Delete time entry
  • Report

Tag

  • Add tag to time entry
  • CRUD tag

Demo

Try demo at https://vivid-trace.firebaseapp.com/ and storybook

React time tracking demo

Developer notes

Enzyme

Simulate onClick event in shallow (github)

const componentWrapper = shallow(<Component />)
componentWrapper.simulate('click', { preventDefault() {} })

Simulate change event in material-ui's TextField (github)

const input = wrapper.find('input[name="text"]')
input.node.value = "newvalue"
input.simulate('change', input)

Sass and create-react-app

Enable guide

Material UI 0.16.7

Click on button in a Table's Row without select that row (github)

Doesn't support responsive (github)

Storybook

Use storyshots to enable unit test. Need install story book addon packages and babel preset

Add .babelrc to project's root directory

{
  "presets": ["babel-preset-es2015", "react-app"]
}

Install packages

npm install storyshots @kadira/storybook-addons @kadira/storybook-channel --save-dev
npm install babel-core babel-preset-es2015 babel-preset-react-app --save-dev

Add src/__tests__/Storyshots.test.js:

import initStoryshots from 'storyshots'
initStoryshots()

Explicitly add material ui component id so Jest snapshot test doesn't get failed because of auto generated id

Run npm test

About

time tracker app on react

https://vivid-trace.firebaseapp.com/

License:MIT License


Languages

Language:JavaScript 97.9%Language:CSS 1.1%Language:HTML 1.0%