Don
27 Agosto, 2025 13:52
1
Install this theme component
Hello
This theme component adds a new button next to the Create Topic button, allowing you to change the topic list order. One of the main goals was to make topic ordering easily accessible on mobile devices as well and themes where the topic list header section is hidden.
Clicking on an item will show the sort order direction (ascending or descending) on the right side of the item.
Descending (icon)
Ascending (icon)
Settings
This component contains several settings for customization.
Object setting
With the object setting you can change each item’s icon , label , action and order .
icon → icon name from the Discourse icon set
label → translation key (see /admin/customize/site_texts
)
action → sorting action identifier
order → position of the item in the dropdown
Example for label
:
In this case the label field should be: js.likes
14 Me gusta
Moin
27 Agosto, 2025 14:24
2
Great component! I thought about creating something similar.
I noticed you did not add a license to the GitHub repo.
Would you accept a pull request that adds more order options like op_likes
?
SORTABLE_MAPPING = {
"likes" => "like_count",
"op_likes" => "op_likes",
"views" => "views",
"posts" => "posts_count",
"activity" => "bumped_at",
"posters" => "participant_count",
"category" => "category_id",
"created" => "created_at",
5 Me gusta
Lilly
(Lillian Louis)
27 Agosto, 2025 14:35
3
this is a great component Don, nice work! thanks for creating this
4 Me gusta
Don
27 Agosto, 2025 14:36
4
Sure! PR welcome thanks @Moin
4 Me gusta
Lilly
(Lillian Louis)
27 Agosto, 2025 14:42
5
One thing I noted is that I sort of expect the drop down to disappear after I’ve clicked one of the selections. I have to click outside it after the view changes to make it go away. But maybe that is by design - I’m not sure lol.
3 Me gusta
Don
27 Agosto, 2025 14:48
7
Yeah this is by design — if you click the same item again the sorting direction changes.
3 Me gusta
Lilly
(Lillian Louis)
27 Agosto, 2025 14:49
8
yea i was thinking that after playing with it more. i love this component - very useful for me on my own instance. thanks again
3 Me gusta
Lilly
(Lillian Louis)
27 Agosto, 2025 14:54
9
I notice the sort by
button appears on the categories page, but doesn’t do anything there. could probably hide it in that case.
3 Me gusta
Don
27 Agosto, 2025 15:29
10
3 Me gusta