refactoring state & view for category to properly handle editing on
right panel