[Utopian Dev] Bug Fix for Inline Category, Repo, and Tags not Properly Set

Words
136
Reading
1 min
Listen
Play
9y

This was a bug fix for an issue raised by Nico in wehmoen@wehmoen in slack regarding the wrong category displayed for a contribution for review.

Issue

  • Inline category, repository, and tags were not properly set when transitioning from one for review contribution to another

image.png

Solution

Before Fix
After Fix
bug-inline-repo-tags-category-not-correctly-set.gifbugfix-inline-repo-tags-category-not-correctly-set.gif
  • src/components/Story/InlineCategoryEdit.js
    • initialized component's value in state to empty string in constructor
    • added setting of initial value from props in componentWillMount()
    • added componentWillReceiveProps() to set incoming property value to state

image.png

  • src/components/Story/InlineRepoEdit.js
    • initialized component's value in state to empty string in constructor
    • added setting of initial value from props in componentWillMount()
    • added componentWillReceiveProps() to set incoming property value to state
    • Fixed space indentions

image.png

image.png



Posted on Utopian.io - Rewarding Open Source Contributors