Friday, March 7, 2014

For next week...

Based on the client meeting today, I think we need to have some good demos to show at the next meeting because I feel that we are falling behind in expectations. We also somehow added an extra week to our timeline, which means that we need to get twice as much done by next week in order to get back on track.

So for the next client meeting, Fernando and I are tasked with updating the progress bar based on information from the user's challenge history. I have a feeling this is going to be a bit tricky because it seems like, from the initial research I've been doing, that there is no consensus on the "best" way to do this. I did find this example which shows three different ways of passing data to Javascript: script tag, data attribute, or a gem called "gon". I am going to try experimenting with using the script tag and the data attribute and see if there is one that seems more appropriate for what we are doing. However, since we are not using CoffeeScript or ERB (embedded Ruby), we are going to have to do some modifications to most of the example code we find since a significant portion of it seems to involve either CoffeeScript or ERB. I also looked at using the gon gem, and it seems like a really simple and straightforward way to get Rails data into Javascript code.

We are also going to have to figure out how to update the user history once the user clicks Success. This is going to be tricky as well since, depending on the type of challenge, we will have to determine whether the user is allowed to update their progress (for instance, if they have to complete a task twice a week, we can't let them click "Success" twice in a row and call it good). Thus, when the Success button is clicked, the code will have to go check the database and determine if the user has already completed their check-in for the day. If they have, then we should put a message stating this. Otherwise, we should update the user's history and update the progress bar. Eventually, we should also probably include some text with the progress bar that reminds the user how many times per week they have to check in, how long the challenge is (duration) and how many times they have already checked in.

No comments:

Post a Comment