With this sprint (Sprint 10) coming to an end, the deliverables weren’t been met. I was assigned the task of completing the avatar name to show/hide on the stage function (#204) and the avatar:drag and drop (#138) ticket and I wasn’t able to complete it.
For this sprint, I was working on issue (#204) I encountered a problem where the function (name (data) -> …) wasn’t able to retrieve data from the avatar channel. I recognize this problem was quite similar to Joe’s mirror function issue (#258) then went to Joe to see if he could help. The problem was in avatar.coffee, we were calling the name function “when ‘name’ then name data.avatar_name” but the function name was expecting an object data on which to find an avatar_name attribute. We were close to complete my issue (#204) multiple times however we experienced problems after problems, at first the avatar name was able to be displayed or hidden when the button for it was clicked however it was just only showing/hiding 1 avatar name. We used an conditional statement if..else to check the conditions whether to show or hide the names and if so, it will draw/fill the text within the action cable file i.e cable.js but since we needed the function to be used on placing the avatar on the canvas and clicking the show/hide name button, will only get the name shown/hidden when it ran the place function. Then we tried adding more parameters to the cable file and run the function from both ‘place’ and ‘name’ function. As this approach worked but we realized that this is not ideal, as we should keep data local and not pushing it to the cable file. We have since been working with Thong(one of the newer developers in the UpStage team) and the progress is going better than before. Instead of passing parameters, creating an object ‘avatar’ we get its state, avatar = App.state.avatars[data.avatar_id] then getting its data from the current avatar id to draw/fill the text, basically passing the variables to the cable to update the image show value when button is clicked. This issue is apparently completed and is on the github’s PR, getting Paul’s review.
As for the review, I had a looked on Joe’s code before he submitted his PR and requesting my review. Paul was able to merge his PR. As for my PR (#204), Paul has reviewed it and provided suggestions for improvement, we will look into it and get it sorted in order to move onto my next ticket/issue and get it done by the end of the next sprint.
-Kit(Team 2017, Kit and Joe)