# 메인 페이지 상단 메뉴에 "Votes" 옵션 추가 요청

**URL:** https://meta.discourse.org/t/a-votes-option-for-the-top-menu-in-main-page/208424
**Category:** Feature
**Tags:** topic-voting
**Created:** [11월 6, 2021, 8:52오전 UTC](https://meta.discourse.org/t/a-votes-option-for-the-top-menu-in-main-page/208424 "2021-11-06T08:52:21Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![icaria36](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/icaria36/32/426431_2.png) [@icaria36](https://meta.discourse.org/u/icaria36)
#### Post date: [11월 6, 2021, 8:52오전 UTC](https://meta.discourse.org/t/a-votes-option-for-the-top-menu-in-main-page/208424/1 "2021-11-06T08:52:21Z")

</div>

Voting 플러그인은 활성화된 카테고리에서 상단 메뉴에 “Votes” 항목을 제공합니다. 이 옵션을 클릭하면 해당 카테고리에서 가장 많은 표를 받은 주제 목록이 표시됩니다.

이 Voting 기능을 중심으로 구축된 사이트에서는 메인 페이지 상단 메뉴에 “Votes” 옵션이 있는 것이 매우 유용할 것입니다. 관리자는 Votes 뷰를 기본값으로 설정할 수 있고, 사용자는 최신(Latest), 카테고리(Categories), 상위(Top)와 마찬가지로 설정에서 이를 선택할 수 있습니다.

Votes가 여러 카테고리에서 활성화된 경우, 이 뷰는 여러 카테고리의 투표 주제에 대한 통합 순위를 제공합니다.

---

<div class="post-metadata">

### Author: ![icaria36](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/icaria36/32/426431_2.png) [@icaria36](https://meta.discourse.org/u/icaria36)
#### Post date: [11월 6, 2021, 5:58오후 UTC](https://meta.discourse.org/t/a-votes-option-for-the-top-menu-in-main-page/208424/2 "2021-11-06T17:58:03Z")

</div>

방금 Discourse 인스턴스 URL에 "/votes"를 추가하면 통합된 투표 목록을 제공한다는 사실을 알게 되었습니다. 예:

[https://bitwish.top/votes](https://bitwish.top/votes)

따라서 현재 부족한 부분은 상단 메뉴에 “Votes” 옵션을 추가할 수 있는 기능입니다.

이것은 테마 컴포넌트로 구현할 수 있나요, 아니면 Voting 플러그인에 직접 추가해야 하나요?

---

<div class="post-metadata">

### Author: ![4ong](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/4ong/32/186618_2.png) [@4ong](https://meta.discourse.org/u/4ong)
#### Post date: [11월 6, 2021, 7:56오후 UTC](https://meta.discourse.org/t/a-votes-option-for-the-top-menu-in-main-page/208424/3 "2021-11-06T19:56:35Z")

</div>

안녕하세요 @icaria36  
[GitHub - discourse/Discourse-nav-links-component · GitHub](https://github.com/discourse/Discourse-nav-links-component) 를 사용해 보세요.  
내비게이션 메뉴에 링크를 추가하고 싶을 때 유용합니다.

모든 회원에게 표시되길 원하시나요? 아니면 특정 그룹에만 표시되길 원하시나요?

---

<div class="post-metadata">

### Author: ![icaria36](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/icaria36/32/426431_2.png) [@icaria36](https://meta.discourse.org/u/icaria36)
#### Post date: [11월 7, 2021, 11:16오전 UTC](https://meta.discourse.org/t/a-votes-option-for-the-top-menu-in-main-page/208424/5 "2021-11-07T11:16:36Z")

</div>

아, 네, [Custom Top Navigation Links](https://meta.discourse.org/t/custom-top-navigation-links/87225) 이거군요. 좋은 지적 감사합니다.

이 테마 구성 요소가 투표가 활성화된 카테고리 상단 메뉴에 표시되는 "Votes"와 “My Votes” 링크에 어떤 영향을 미칠지 궁금합니다. 이 테마 구성 요소가 카테고리 내비게이션에 미치는 영향에 대한 방대한 댓글들을 읽어봤지만 명확한 인상을 받지 못했습니다. 직접 시도해 봐야겠지만, 하나의 문제를 해결하는 대신 몇 가지 새로운 문제를 일으키게 될 것 같은 인상을 받습니다.

요청한 동작은 다른 두 개의 매우 인기 있는 플러그인이 제공하는 것과 정확히 동일합니다: [Angus' Events Plugin 📅](https://meta.discourse.org/t/events-plugin/69776) 과 [Locations Plugin 🌍](https://meta.discourse.org/t/locations-plugin/69742). 이 두 플러그인 모두 Discourse의 상단 메뉴 항목과 마찬가지로 추가 및 제거할 수 있는 상단 메뉴 항목을 제공합니다:

 ![image](https://global.discourse-cdn.com/meta/original/3X/4/b/4be8b78c5b7310ee4bb4aacd0fba434819ef943d.png)

"Votes"가 상단 메뉴의 첫 번째 항목인 경우, 기본적으로 “/votes” 페이지가 표시됩니다.

이 플러그인들에서 재사용할 수 있는 코드가 있을까요? PR이 환영되고 @angus 또는 다른 누군가가 관심 있다면, 우리는 이를 “마케팅화”(패치를 작성하고 테스트하는 것이 얼마나 간단하거나 복잡한지 전혀 모르겠습니다)할 수도 있습니다.

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [11월 10, 2021, 2:50오전 UTC](https://meta.discourse.org/t/a-votes-option-for-the-top-menu-in-main-page/208424/6 "2021-11-10T02:50:19Z")

</div>

이런 방식으로 작동할 수 있습니다:

> <https://github.com/discourse/discourse-topic-voting/pull/105>
>
> Adds settings that allow you to use the \`\`votes\`\` and \`\`my votes\`\` lists on the …homepage.
> 
> Note that \`\`/votes\`\` and \`\`/latest?order=votes\`\` currently return different results, partly because the topic list version has a secondary order attribute \`\`topics.bumped\_at\`\`. I've added that as a secondary attribute to the \`\`/votes\`\` list.

두 가지 설정을 추가합니다:

- voting\_show\_votes\_on\_homepage: ‘홈페이지에 투표 목록 내비게이션 항목을 표시할까요?’
- voting\_show\_votes\_before: ‘이 내비게이션 항목 앞에 투표 목록 내비게이션 항목을 표시’

현재 플러그인에서 `/votes`와 `/latest?order=votes` 사이에 이 기능에 영향을 미치는 차이가 있어 초안 상태로 남겨두었습니다. 먼저 유지보수자의 의견이 필요합니다.

---

<div class="post-metadata">

### Author: ![icaria36](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/icaria36/32/426431_2.png) [@icaria36](https://meta.discourse.org/u/icaria36)
#### Post date: [11월 10, 2021, 8:52오전 UTC](https://meta.discourse.org/t/a-votes-option-for-the-top-menu-in-main-page/208424/7 "2021-11-10T08:52:40Z")

</div>

@angus, 정말 대단하세요. 정말 감사합니다!

> [@angus](#):
>
> 현재 플러그인에서 `/votes`와 `/latest?order=votes` 사이에 차이가 있어 이 기능이 영향을 받고 있으므로 초안 상태로 두었습니다.

흥미롭네요. `/votes`는 투표 수가 동일한 토픽의 경우 두 번째 정렬 기준으로 '최신순’을 사용하는 것 같습니다. 이는 `/latest?order=votes`에서 예상되는 동작이지만, 어떤 이유에서인지 두 번째 정렬 기준이 다릅니다. 패턴을 찾지 못했습니다.

또한 정렬 기준을 수정할 수 있는 경우를 대비해 참고할 점입니다. 현재 0표인 토픽과 투표 개념이 없는 토픽이 모두 뒤섞여 있습니다. 0표인 토픽들을 함께 묶어두고, 투표가 비활성화된 토픽들을 마지막에 별도로 배치하는 것이 더 합리적일 것입니다.

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [11월 22, 2021, 2:55오전 UTC](https://meta.discourse.org/t/a-votes-option-for-the-top-menu-in-main-page/208424/9 "2021-11-22T02:55:58Z")

</div>

> <https://github.com/discourse/discourse-topic-voting/pull/105>
>
> Adds settings that allow you to use the \`\`votes\`\` and \`\`my votes\`\` lists on the …homepage.
> 
> Note that \`\`/votes\`\` and \`\`/latest?order=votes\`\` currently return different results, partly because the topic list version has a secondary order attribute \`\`topics.bumped\_at\`\`. I've added that as a secondary attribute to the \`\`/votes\`\` list.

이 PR은 초안에서 게시 상태로 변경되었습니다.
