This week I did a lot of updates in design and some bug fixes with some suggestions and help from mentors. The updates I did this week can be found here. I had a headstart to this week with Sage assisting me in implementing and fixing several parts of the code.

  1. Adding the Feedback button to Assigned Articles section Screenshot from 2017-07-05 12-48-30
  2. And giving relevant feedback for the sandbox page when the assigned article doesn’t exist mainspace

Extending Feedback to Sandbox Articles

And one of the most important changes was to add feedback to Sandbox pages which unfortunately wasn’t there in the previous release. I ran into an interesting problem doing this. Previously the route configuration was such that

get '/revision_feedback/:article_id' => 'revision_feedback#index'

Obviously, in Rails, this parameter is intended to be a number. When I had to use article_title instead of article_id because Sandbox articles’ article_id wasn’t available in the props I got a no path matching error as article_title of Sandbox pages were like User:KeerthanaS/sandbox which took the / in it as a path. So I instead changed it to a query parameter /revision_feedback?title=${articleTitle}

Shallow Rendering

My code failed some tests after Feedback component was added as it was also a Container Component and need to be embedded in a <Provider> element or a store to passed to it as a prop. A fix was to use enzyme’s Shallow Rendering which doesn’t render the child componentsScreenshot from 2017-07-05 13-20-32

How it looks now

  • As brought up by Jonathan I added more info about the Wikipedia Assessment scale in the feedback modal so users can infer what the predicted class refers to.
  • I added a way for users to give in-line suggestions which are definitely an improvement over the suggestions button redirecting to some other page where the user has to provide suggestions.

Screenshot from 2017-07-05 12-12-38

Advertisements