Possible Bug - Reorganising Categories

I was reordering some of our categories earlier and I noticed a minor issue.

If you type the position into the text box, as soon as you enter the first character it gets moved, this isn’t too bad but the focus on the page doesn’t scroll with it. At this point the cursor is still focused in the text box. You enter the second number and again the category moves, but you arent scrolled to find it. When you try to enter the third number (we have over 100 categories) you discover the cursor is no longer focused within the text box.

The possible bug is that it seems only auto-shuffling is enable for positions up to 99.

Another possible issue is that if you enter a position, but then use the up or down arrow icons, the green tick disappears, presumably committing the change that the green tick would have?

As wish-list enhancement ideas, it would be nice if;

  • the page scrolled to the position of the auto-shuffled category
  • when moving a category, all sub-categories were also moved at the same time. Currently they appear to get updated only when the “Save” button is pressed, e.g if you immediately go back into the Reorder Categories option they have moved
  • drag control for categories instead of (as well as?) the up/down arrows
  • smaller modal and scroll within that rather than with entire height of page, current model is quite user-navigation intensive when there are lots of categories

I hope the above is of use :slight_smile:

4 Likes

I did few improvements in below commit. Indented alignment is used to differentiate subcategories from main categories.

https://github.com/discourse/discourse/commit/d5df746cc318c9422f5704edd7fd652b0eab9fd3

:white_check_mark:

:white_check_mark: Now categories will reorder only when you leave the textbox. If you press Tab key to leave the textbox then the page will get scrolled to the correct position.

9 Likes

Oh wow, I wasn’t expecting anyone to do anything so quickly! Thank you Vinoth. :slight_smile:

Any idea when this will make its way to our hosted solution?

6 Likes

I will make sure to update it to your site sooner.

7 Likes

Thank you, that’s really kind, I appreciate your help and support :slight_smile:

6 Likes