Any idea for when the plugin API will offer the functionality to let sorting by votes be included in the plugin?
Hoping “soon” is soon. ![]()
I have added the required plugin API in discourse#7158 and used it in discourse-voting#38.
Sorry for taking me so long. ![]()
This is awesome, sorting by votes is now an option, but is there any way to make it a category default through the plugin per OP?
The Wyze Wishlist appears to sort by votes by default, but I’ve not had time to dig through their page to see if they’re using another method.
With the voting plugin installed these are the two available options:
Did I miss a step?
You can add the option like this
<script type="text/discourse-plugin" version="0.8.25">
api.modifyClass('component:edit-category-settings', {
availableViews: Ember.computed(function() {
let views = this._super();
let voteView = {};
voteView["name"] = "Votes";
voteView["value"] = "votes";
views.push(voteView);
return views;
})
});
</script>
Seems like it would be a nice option to include in the plugin.
Thanks, that gets most of the way.
For some reason items in the extra-nav-item-outlet apply the active class to the list item rather than the link, so ‘Votes’ isn’t shown as active. Is that intentional?
I’ve created a CSS workaround for now, styling both .nav-pills>li.active a and .nav-pills>li a.active.
A post was split to a new topic: Topics that were voted on disappear from user profile after being closed
스티븐, 안녕하세요.
Boxes의 Featured Topics 데스크톱 카테고리 페이지 스타일에서 제 주제들이 투표 수순으로 정렬되도록 @awesomerobot 님의 코드를 어디에 배치해야 하는지 설명해 주실 수 있을까요?
감사합니다.
AGEID
그 코드를 어디에 넣어야 하는지에도 도움이 필요해요, @awesomerobot?
아래 설정을 사용하면 “최신” 탭에 최신 게시글이 아니라 최다 투표수가 표시되어 최신 게시글을 전혀 볼 수 없다는 점도 발견했어요. 이건 버그인가요, 아니면 제가 잘못 설정하고 있는 건가요?
기본적으로 카테고리가 투표수(내림차순)로 정렬되길 원하고, 사용자가 원하면 최신순으로 정렬할 수 있는 옵션이 있으면 좋겠어요. 감사합니다.
아니요, 의도된 동작으로 보입니다. 다만 사용자 경험이 최선은 아닙니다. "토픽 목록 정렬 기준"을 "Votes"로 변경했는데도 여전히 "Latest"라고 표시되는 것이 혼란스럽습니다.
테마의 Head 섹션에 넣으실 수 있습니다. 관리자 → 사용자 정의 → 테마 경로로 들어가시면 됩니다.

