add shared logic for tag sorting
Merge branch 'Fandekasp-sortable_tags' into develop