The code looks mostly good. Most of the comments are nitpicks.
Thanks for the review @udan11. I appreciate you’re time and feedback. I have finished making the changes you suggested and will push a new commit momentarily.
By the way, explicit
get is not needed anymore (since Ember Octane, I believe). For example, you can simply use
category.isParent instead of
Thanks! I tried to remove this and ended up with the following error.
Uncaught Error: Assertion Failed: You attempted to access the `subcategories` property (of <(unknown):ember1195>).
Since Ember 3.1, this is usually fine as you no longer need to use `.get()`
to access computed properties. However, in this case, the object in question
is a special kind of Ember object (a proxy). Therefore, it is still necessary
to use `.get('subcategories')` in this case.
To be honest, I liked the old behavior more because you could easily swap two categories by typing the position OR maintaining the relative order by pressing the arrow buttons.
That’s fair. It does add an extra step to swap two categories. However, it also saves potentially dozens of clicks if swapping is not what you were trying to do and you want to move a category from the bottom of the page near the top.
If you truly disagree that this is better UX, I am happy to start a topic on Meta about it to get more input.