Closed albertlyu closed 10 years ago
@albertlyu , I'm impressed you have it up and running. Congrats.
As for this one, I agree the data would be nice in the auto-complete. It may surprise you though, that I'm not storing the PlayerInfo data in the DB. I'm retrieving it only for drawing the individual player pages by hitting an MLB API. See this code... https://github.com/kruser/pitchfx-site/blob/master/app/lib/services/mlb.js#L13-L25
So I don't have a way to get this information in bulk, or quick enough to where I would be comfortable inserting it in between the auto-complete.
I did this on purpose as then I'm not relying on any of my own data to get the current status of a player. When a player is traded, changes positions, etc., that information is always current on their player page because we grab it on-demand from an external source.
I'm going to close this for now as to truly solve it would be quite a big endeavor.
In addition to the mug shots added in #33 and the auto-suggest priority ordering suggested by #26, I figured we could add a little more information next to the player's name. Maybe playerInfo.primary_position_txt and/or playerInfo.bats / playerInfo.throws? Is there a way we can have a short form prefix for playerInfo.team_name as well?
So for example: [mugshotpic] P Clayton Kershaw L/L LAD
We can throw an html tag around team_name to make the text smaller. Alternatively, we could use the full team_name and allow 'Los Angeles Dodgers' to be queried.
@kruser, I figured this is a relatively easier task, so if you like this improvement issue, I can set up a branch of the project and give it a shot. I successfully set up my MEAN stack and downloaded 2010-2013 using your Perl scripts, and can now view the PITCHf/x website on my local machine. In general, I think I can make my way around your html and js code, though I don't fully understand the auto-suggest functionality and how that can be customized.