Git Product home page Git Product logo

stock-market-search's People

Contributors

gregdardis avatar hailey123 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

stock-market-search's Issues

Separate constants into files

  • user-facing constants
  • calculation constants
  • formatting specifiers

see the TODO in src/constants/index.js
edit: I (Greg) removed the TODO, just see this issue.

Unit test utility functions

  • stub out parseIntExact in src/utils/stockDataUtils/createStockDataEntry.test.js
  • stub out parseIntExact in src/utils/stockDataUtils/calculations.test.js
  • finish tests for src/utils/apiUtils/chartData.js

Sometimes there are gaps in the chart

Steps to (not consistently) reproduce

  1. Run app
  2. Search for GOOG
  3. Sometimes, on weekends, there will be open space in the graph where it should just skip from Friday to Monday.

Not really sure when this happens, just seems to be random

Loading indicator on search

If the user enters a valid symbol, do a progress wheel?

Otherwise tell the user the symbol doesn't exist and to try again or something

Update README

Take out the part that says some features are incomplete. It is always being worked on but now the project is more presentable.

Grid styling

Haven't put much thought into whether the grid should be styled differently.

Figure this out, and either apply the needed styling or do nothing, then close this issue.

Recharts Chart component has a space before a colon on the tooltip

Tooltip is poorly formatted. Hovering over a data point on the line chart shows a date and then the security price for that date.

This is written as price : securityPrice for some reason, with a space between the word "price" and the ":".

Tried for a little bit to fix this, seems built in and every question I have seen about recharts still has this space in that spot.

Replace placeholder text for chart

Before the user searches a symbol, there is placeholder text below the search bar.

Figure out what to do with this space in the meantime.

utils/apiUtils should be moved to server/

Trying to put a function in utils/apiUtils/chartData.js and then import & call it in client code caused many errors in the npm run dev terminal and prevented the app from running.

Example error:

ERROR in ./node_modules/request/lib/har.js
Module not found: Error: Can't resolve 'fs' in '/Users/Hailey/GitHub/stock-market-info/node_modules/request/lib'
 @ ./node_modules/request/lib/har.js 3:9-22
 @ ./node_modules/request/request.js
 @ ./node_modules/request/index.js
 @ ./node_modules/request-promise/lib/rp.js
 @ ./src/utils/apiUtils/chartData.js
 @ ./src/client/reducers/chartTimePeriodIndex.js
 @ ./src/client/reducers/index.js
 @ ./src/client/render.js
 @ multi (webpack)-dev-server/client?http://localhost:8080 webpack/hot/dev-server ./src/client/render.js

Cap characters on search

Make a maximum number of characters that will go in the search component input. Stock symbols are not that long

Proper error handling for async requests in api.js

Currently server just gets a bunch of errors but program continues to work if you search for a symbol that doesn't exist.

Make this work more as expected, handle the errors, show the user some feedback, etc

Searching a stock symbol moves search bar to the left

Steps to reproduce:

  1. Run app
  2. Search for a valid stock symbol
  3. When the search is completed and the graph is shown, the search bar is moved to the left to align with the graph and company information. Unintended!

Sending multiple requests with invalid stocks somehow caused this output:

Unhandled rejection Error: Callback was already called.
    at /Users/Hailey/GitHub/stock-market-info/src/server/node_modules/async/dist/async.js:966:32
    at /Users/Hailey/GitHub/stock-market-info/src/server/node_modules/async/dist/async.js:3885:13
    at /Users/Hailey/GitHub/stock-market-info/src/utils/apiUtils/chartData.js:304:5
    at tryCatcher (/Users/Hailey/GitHub/stock-market-info/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/Hailey/GitHub/stock-market-info/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/Users/Hailey/GitHub/stock-market-info/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/Users/Hailey/GitHub/stock-market-info/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/Users/Hailey/GitHub/stock-market-info/node_modules/bluebird/js/release/promise.js:689:18)
    at Async._drainQueue (/Users/Hailey/GitHub/stock-market-info/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/Users/Hailey/GitHub/stock-market-info/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues (/Users/Hailey/GitHub/stock-market-info/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:651:20)
    at tryOnImmediate (timers.js:624:5)
    at processImmediate [as _immediateCallback] (timers.js:596:5)

Unhandled rejection Error: Callback was already called.
    at /Users/Hailey/GitHub/stock-market-info/src/server/node_modules/async/dist/async.js:966:32
    at /Users/Hailey/GitHub/stock-market-info/src/server/node_modules/async/dist/async.js:3885:13
    at /Users/Hailey/GitHub/stock-market-info/src/utils/apiUtils/chartData.js:304:5
    at tryCatcher (/Users/Hailey/GitHub/stock-market-info/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/Users/Hailey/GitHub/stock-market-info/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/Users/Hailey/GitHub/stock-market-info/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/Users/Hailey/GitHub/stock-market-info/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/Users/Hailey/GitHub/stock-market-info/node_modules/bluebird/js/release/promise.js:689:18)
    at Async._drainQueue (/Users/Hailey/GitHub/stock-market-info/node_modules/bluebird/js/release/async.js:133:16)
    at Async._drainQueues (/Users/Hailey/GitHub/stock-market-info/node_modules/bluebird/js/release/async.js:143:10)
    at Immediate.Async.drainQueues (/Users/Hailey/GitHub/stock-market-info/node_modules/bluebird/js/release/async.js:17:14)
    at runCallback (timers.js:651:20)
    at tryOnImmediate (timers.js:624:5)
    at processImmediate [as _immediateCallback] (timers.js:596:5)

Use eslint-watch instead of eslint-loader

eslint-watch has some positives as opposed to eslint-loader which is what we are using.

  1. Not tied to webpack
  2. Can use it to lint tests and scripts instead of just things being bundled by webpack

Searching lowercase symbol creates extra stock in state

Steps to reproduce:

  1. Start up app
  2. Search a lowercase stock symbol (i.e. goog)
  3. Look at state using redux dev tools
  4. Observe there is both a stock in stockData for 'goog' which has empty strings for each part of it's state, and for 'GOOG' which has the actual information about google.

Error sometimes comes up when clicking 5 day button

Steps to (unreliably) reproduce

  1. Run the app
  2. Search for a valid stock symbol
  3. Click around through time period buttons with console open
  4. Eventually at some point an error will come up when you click the 5 day button.

This error doesn't crash the app, and the 5 day data is still displayed on the chart properly (I think).

5 day error

Make the site responsive

Learn about and implement responsive web design, so the app works well on phones and in smaller browser windows, etc

Get Nodemon working with babel-node

Currently, you have to re run the server every time you make a change to it, because when we started using babel-node, nodemon stopped working.

Figure this out.

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.