Giter VIP home page Giter VIP logo

quoll's People

Contributors

dependabot[bot] avatar mzogheib avatar

Stargazers

 avatar  avatar

Watchers

 avatar

quoll's Issues

Add testing

BE unit tests first, since that's where a lot of the important data transformations happen

When updating a filter the existing map data flickers

Current Behaviour

  1. Update a filter
  2. Existing map data will blink off then on again
  3. After the new data has been received it replaces the existing data

Expected Behaviour

  1. Update a filter
  2. Existing map data stays as is, no flickering
  3. After the new data has been received it replaces the existing data

Send place data back with the Moves response

Currently it just sends back activities that are intended to be displayed as a polyline.

Implement to satisfy figma designs, i.e. an entry can be a single place (coordinate) and any activities that happen at this place are wrapped up into that feed entry.

This should then mean that all feed entries have a corresponding map element.

Implement async actions

Currently network requests are done inside the components and don't know much about the redux store.

Handle failed logins

  1. Attempt login
  2. If it fails on server then respond appropriately
  3. Delete localstorage on FE and BE
  4. FE then signs up

Send generic filter options to the server

Currently plain text dates are sent in the format YYYY-MM-DD, which is what the toshl API expects.

Send something more generic that can then be converted to the expected formats for the toshl, strava and any other APIs. This will likely involve creating a proper date picker on the client side.

Be careful of timezones.

Persist the data source connections between sessions

Currently you have to re-connect to the data source(s) every time the server restarts. Implement a basic login and user profile that saves your settings, e.g. access tokens, so that you can login again in future and not have to reconnect.

  • Login/signup page or dialog
  • Should be able to cancel but nothing will be saved (possible to auth more than one data source at a time? local storage with an expiry?)
  • Save to profile when a data source is authorized/deauthorized
  • Delete your profile

Stop page reload during dev when a syntax error is resolved.

Now with HMR + RHL (#43) the following happens:

  1. yarn start
  2. Save some code that has a syntax error
  3. See in the console output that the code could not be compiled
  4. Resolve the syntax error so that the code can be compiled ok
  5. See that the entire page refreshes

Ideally, it would just hot swap the fixed module ... but not sure if this is possible.

Issue #418 in the webpack repo might be related.

Create an interactive menu item for each data source

  • If not connected then show connect button
  • If connected then show that day's summary, e.g. $45, 12kms, or "none"
  • Has an expand icon which grows the item to show the list of activities and a disconnect button

Toshl auth will need to be mocked

Make map data clickable

Toshl

  • Time
  • Amount
  • Location name
  • Category
  • Tag
  • Description

Strava

  • Time start and end
  • Duration (moving and elapsed)
  • Total distance
  • Average speed
  • Description

Single Feed

  • Fetch the feed for a date range:
    GET /feed?from=2018-06-01&to=2018-06-01
  • Fetch the oauth url for a feed
    GET /feed-auth?source=strava
  • Authenticate a feed with an Oauth code
    POST /feed-auth?source=strava&code=1234&userId=1234
  • Delete authentication for a feed
    DELETE /feed-auth?source=strava&userId=1234

Support production builds for new packages

The solution for #48 only supported local development, i.e. through yarn workspaces.

In order to deploy the app to heroku with these new packages, they'll need to be published to npm so that heroku can run npm install etc.

Lerna will likely be a useful tool here.

This will be a good time to implement an automated changelog solution like conventional commits.

References:

End of Toshl Oauth flow sometimes fails at the state parsing stage

Looks like the queryParams parser is not carrying out uri decoding properly but this only happens sometimes, e.g. = at the end of the base64 encoded string is returned as %25D or whatever.

Can recreate with the following state object
{id: "toshl", token: "z38ph0sozo"}

Nodemon keeps complaining about port in use after a reload

This seems to only happen in this project. Have recreated a simpler version of this project with the exact same structure and it's not an issue there. No idea why.

Observations:

  • It was happening on every second reload, i.e. save a file -> ok, save again -> error
  • const server = app.listen(app.get('port'), () => {}) in server.js appears to be the culprit. Commenting this out stops the issue altogether. Perhaps it's unable to properly close the server?
  • For a while adding nodemon --delay 1 server.js was helping but not anymore
  • Handling termination and interrupt signals through graceful shutdown seems to help. But it comes up every now and then.
  • This looks related remy/nodemon#1247
[0]       throw er; // Unhandled 'error' event
[0]       ^
[0]
[0] Error: listen EADDRINUSE :::3001
[0]     at Object._errnoException (util.js:1024:11)
[0]     at _exceptionWithHostPort (util.js:1046:20)
[0]     at Server.setupListenHandle [as _listen2] (net.js:1351:14)
[0]     at listenInCluster (net.js:1392:12)
[0]     at Server.listen (net.js:1476:7)
[0]     at Function.listen (/Users/marwan/Documents/dev/#projects/quoll/node_modules/express/lib/application.js:618:24)
[0]     at Object.<anonymous> (/Users/marwan/Documents/dev/#projects/quoll/packages/server/server.js:16:20)
[0]     at Module._compile (module.js:635:30)
[0]     at Object.Module._extensions..js (module.js:646:10)
[0]     at Module.load (module.js:554:32)```

Improve the OAuth ux for each feed

Currently it all stays on the same tab/window so you leave then come back and lose your state.

Launch in a different tab/window and handle all the logic on the settings page.

Integrate with Moves app

https://dev.moves-app.com/

Ideas:

  • Don't overlap with other path based activity integrations, e.g. Strava
  • Could be manual, e.g. choose which integration takes priority for a particular activity type. So, only show cycling on strava and not moves.
  • Could be smart. If activity from one integration is fully between another and it has more resolution then display that instead. This could be tricky.
  • Display place markers. Ok to overlap with other markers, e.g. Toshl

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.