# Alternative Voting Category Style

**URL:** https://meta.discourse.org/t/alternative-voting-category-style/101532
**Category:** Theme component
**Tags:** official, topic-voting
**Created:** [November 7, 2018, 1:54pm UTC](https://meta.discourse.org/t/alternative-voting-category-style/101532 "2018-11-07T13:54:40Z")
**Posts on this page:** 20
**Page:** 2

<div class="post-metadata">

### Author: ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)
#### Post date: [January 13, 2022, 11:27pm UTC](https://meta.discourse.org/t/alternative-voting-category-style/101532/22 "2022-01-13T23:27:42Z")

</div>

> [@mattdm](#):
>
> Is there a theme component which makes the vote indicator on individual topics have that same look?

Not that I am aware of, but I think it probably makes sense to have more consistency in the styling there.

> [@mattdm](#):
>
> This component also hides the columns showing participants, views, and activity time. It might be nice to have that separated

Sure, I can add some better flexibility here.

I have a huge update to this component that’s been in the works, but I’ve not had the time to finish it. If an opportunity doesn’t open up soon, I’ll try to get these quick fixes in at the very least.

---

<div class="post-metadata">

### Author: ![wlandgraf](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wlandgraf/32/154660_2.png) [@wlandgraf](https://meta.discourse.org/u/wlandgraf)
#### Post date: [January 14, 2022, 2:12pm UTC](https://meta.discourse.org/t/alternative-voting-category-style/101532/23 "2022-01-14T14:12:08Z")

</div>

@tshenry, I have just installed the plugin, thank you for providing it! But it’s not correctly showing votes in the main page, do you have any idea why this might be happening? See the screenshot below.

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

---

<div class="post-metadata">

### Author: ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)
#### Post date: [January 15, 2022, 3:53am UTC](https://meta.discourse.org/t/alternative-voting-category-style/101532/24 "2022-01-15T03:53:29Z")

</div>

Hmm, I’m not immediately sure based on your screenshot. I just checked and the component is working fine on my site. Based on the vote count box displaying at all, I’m pretty sure you had refreshed the page and enabled voting in that category before that screenshot was taken.

A few questions that might help:

- What version of Discourse you are running?
- Are you running any third-party plugins?
- When you open your browser’s console, do you see any errors?
- Are subcategories involved at all?

---

<div class="post-metadata">

### Author: ![wlandgraf](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wlandgraf/32/154660_2.png) [@wlandgraf](https://meta.discourse.org/u/wlandgraf)
#### Post date: [January 15, 2022, 8:55am UTC](https://meta.discourse.org/t/alternative-voting-category-style/101532/25 "2022-01-15T08:55:10Z")

</div>

@tshenry: Using Discourse 2.8.0.beta11.

These are my installed plugins:

 ![image](https://global.discourse-cdn.com/meta/original/3X/a/8/a886838c4428fe0470f8e409ca9057fbfdb09ed3.png)

Here are my installed theme components:

 ![image](https://global.discourse-cdn.com/meta/original/3X/7/a/7af602cd96ea69ed8a47f0ffad3d74053c39d6ba.png)

There are no subcategories, and no errors in browser’s console.

If you want to check it yourself, I kept the theme enable in this category, just go to [BIZ Feature Requests - TMS Support Center](https://support.tmssoftware.com/c/business/biz-feature-requests/103).

Thank you very much for your help.

---

<div class="post-metadata">

### Author: ![Luke\_Cousins](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/luke_cousins/32/223644_2.png) [@Luke\_Cousins](https://meta.discourse.org/u/Luke_Cousins)
#### Post date: [August 5, 2022, 3:50pm UTC](https://meta.discourse.org/t/alternative-voting-category-style/101532/26 "2022-08-05T15:50:27Z")

</div>

Thanks for the great component.

We’ve just noticed that the boxes with the number of votes have stopped showing. We’ve also recently upgraded to Discourse 2.9.0.beta8 ([89d43235c4](https://github.com/discourse/discourse/commits/89d43235c46a4899acb42f759b1654d1b1efec4b)) which might be related?

 ![Screenshot 2022-08-05 at 16.49.34](https://global.discourse-cdn.com/meta/original/4X/d/c/c/dcc35d78c01740c724219a492674fec5f7c85f8f.png)

To see it live, please see:

[https://community.breww.com/c/ideas-feature-requests/11](https://community.breww.com/c/ideas-feature-requests/11)

Thanks 🙂

---

<div class="post-metadata">

### Author: ![Luke\_Cousins](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/luke_cousins/32/223644_2.png) [@Luke\_Cousins](https://meta.discourse.org/u/Luke_Cousins)
#### Post date: [August 14, 2022, 7:38pm UTC](https://meta.discourse.org/t/alternative-voting-category-style/101532/27 "2022-08-14T19:38:20Z")

</div>

Sorry, has anyone any suggestions? Anyone else also having this issue?

---

<div class="post-metadata">

### Author: ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)
#### Post date: [August 14, 2022, 7:54pm UTC](https://meta.discourse.org/t/alternative-voting-category-style/101532/29 "2022-08-14T19:54:09Z")

</div>

Give me a few more days. Big update is almost done that will fix everything and add some new features. Thanks for your patience.

EDIT: I didn’t quite wrap up the changes this week. Will do my best next week!

---

<div class="post-metadata">

### Author: ![Luke\_Cousins](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/luke_cousins/32/223644_2.png) [@Luke\_Cousins](https://meta.discourse.org/u/Luke_Cousins)
#### Post date: [August 14, 2022, 7:55pm UTC](https://meta.discourse.org/t/alternative-voting-category-style/101532/30 "2022-08-14T19:55:52Z")

</div>

Thank you, much appreciated 👍

---

<div class="post-metadata">

### Author: ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)
#### Post date: [August 25, 2022, 3:52am UTC](https://meta.discourse.org/t/alternative-voting-category-style/101532/31 "2022-08-25T03:52:55Z")

</div>

Thanks for your patience @Luke_Cousins! Everything should be fixed up now.

[https://github.com/tshenry/discourse-alternative-voting-category-style/commit/ff972a0fd4c0bd453021871d46e0563a2c80f435](https://github.com/tshenry/discourse-alternative-voting-category-style/commit/ff972a0fd4c0bd453021871d46e0563a2c80f435)

⚠ Note to everyone that uses this component – you will likely need to re-add categories to the `voting categories` theme setting. Unfortunately that is the cost of improving the setting to use the new category picker.

There are some surprise new settings that I added (default off) that hopefully some of you will find useful. I’ll announce them in more detail and update the OP at some point soon.

Please be sure to report any issues 🙂

---

<div class="post-metadata">

### Author: ![Luke\_Cousins](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/luke_cousins/32/223644_2.png) [@Luke\_Cousins](https://meta.discourse.org/u/Luke_Cousins)
#### Post date: [September 3, 2022, 9:18am UTC](https://meta.discourse.org/t/alternative-voting-category-style/101532/32 "2022-09-03T09:18:14Z")

</div>

Sorry, for the delay getting back to you @Taylor, I have been away.

This update is excellent, thank you! Being able to vote directly from the list is a great improvement. The only issue I see now is that the vote button is off-centre versus the number of votes. Does anyone else have this issue?

 ![Screenshot 2022-09-03 at 10.17.11](https://global.discourse-cdn.com/meta/original/4X/6/c/d/6cdb952e624bf886d4da437351a9fa66933820ef.png)

Thanks again!

---

<div class="post-metadata">

### Author: ![Luke\_Cousins](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/luke_cousins/32/223644_2.png) [@Luke\_Cousins](https://meta.discourse.org/u/Luke_Cousins)
#### Post date: [October 21, 2022, 7:33am UTC](https://meta.discourse.org/t/alternative-voting-category-style/101532/33 "2022-10-21T07:33:17Z")

</div>

Any update on this button positioning?

Also, it might not be related to this theme-component, but we also have this issue with the “Latest” sorting:

> [@Topic List Sort By Votes in voting plugin](https://meta.discourse.org/t/topic-list-sort-by-votes-in-voting-plugin/63281/30):
>
> I’d also like help on where to put that code, @awesomerobot? I’ve also noticed that if I use these below settings, this makes the “Latest” tab show the most votes instead of the latest and therefore you cannot see the latest topics at all. Is this a bug or something I’m doing wrong? I’d like the category by default to be sorted by votes (desc), with users having the option to sort by latest if they’d like too. Thanks.

Thanks for your help.

---

<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: [December 26, 2022, 1:14pm UTC](https://meta.discourse.org/t/alternative-voting-category-style/101532/34 "2022-12-26T13:14:44Z")

</div>

> [@Luke\_Cousins](#):
>
> Does anyone else have this issue?

[Yes](https://bitwish.top/c/features/5), we are also seeing the misaligned arrow. And what about the tags without a space in between, are you able to reproduce this as well?

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

---

<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: [December 26, 2022, 3:30pm UTC](https://meta.discourse.org/t/alternative-voting-category-style/101532/35 "2022-12-26T15:30:32Z")

</div>

Actually, I think I just caught a much nastier bug. Can it be that this component breaks the category page for anonymous users?

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

[The page](https://bitwish.top/c/features/5) renders correctly if the component is disabled.

---

<div class="post-metadata">

### Author: ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)
#### Post date: [December 26, 2022, 8:44pm UTC](https://meta.discourse.org/t/alternative-voting-category-style/101532/36 "2022-12-26T20:44:32Z")

</div>

> [@Luke\_Cousins](#):
>
> Sorry, for the delay getting back to you `@Taylor`, I have been away.

My turn to apologize 😊 Sorry for the delay here @Luke_Cousins. The alignment issue should be fixed now! Thank you for the report!

> [@icaria36](#):
>
> Actually, I think I just caught a much nastier bug. Can it be that this component breaks the category page for anonymous users?

Thanks for reporting this! There was an additional check that needed to be added to account for anonymous users.

* * *

Both issues are fixed with the following commit. Please update the component when you have a moment and let me know if you run into any other issues.

[https://github.com/tshenry/discourse-alternative-voting-category-style/commit/c5ce7fb9c8fed14734f9c96d41304dccb2ca0f82](https://github.com/tshenry/discourse-alternative-voting-category-style/commit/c5ce7fb9c8fed14734f9c96d41304dccb2ca0f82)

---

<div class="post-metadata">

### Author: ![Luke\_Cousins](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/luke_cousins/32/223644_2.png) [@Luke\_Cousins](https://meta.discourse.org/u/Luke_Cousins)
#### Post date: [December 27, 2022, 11:34am UTC](https://meta.discourse.org/t/alternative-voting-category-style/101532/37 "2022-12-27T11:34:40Z")

</div>

Thanks @Taylor for those fixes, much appreciated and I can confirm both work for us 👍

> [@icaria36](#):
>
> And what about the tags without a space in between, are you able to reproduce this as well?

@icaria36 We do also have this issue, but you can fix it by creating your own Theme Component and adding this CSS. There’s probably a better solution (and of course a fix in the actual package), but this did the trick for us for now 😄

```scss
.voting-category.list-container {
    .discourse-tag {
        margin-right: 6px !important;
    }
}

```

---

<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: [December 27, 2022, 11:11pm UTC](https://meta.discourse.org/t/alternative-voting-category-style/101532/38 "2022-12-27T23:11:33Z")

</div>

@tshenry Thank you so much! I can also confirm that both problems are fixed in the new version.

About the lack of space between tags:

> [@Luke\_Cousins](#):
>
> We do also have this issue, but you can fix it by creating your own Theme Component and adding this CSS.

Thank you @Luke_Cousins ! I felt too lazy about creating a component and just slapped your code under the main CSS. It seems to do the job as well. 🎉

---

<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: [January 8, 2023, 2:26pm UTC](https://meta.discourse.org/t/alternative-voting-category-style/101532/39 "2023-01-08T14:26:28Z")

</div>

I think I’ve found a bug…

If the category settings are set to `Default List Filter: all topics`, everything is fine. However, if this setting is set to `no subcategories`, then the compoennt doesn’t render when clicking to the category. Once there, if you reload, then and only then it will render.

---

<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: [January 9, 2023, 7:45am UTC](https://meta.discourse.org/t/alternative-voting-category-style/101532/40 "2023-01-09T07:45:20Z")

</div>

Another bug reported by a user. The number of votes cannot be seen in dark mode:

 ![image](https://global.discourse-cdn.com/meta/original/4X/6/c/4/6c4c134c735dad2c207d347d727c1e47d94a1a61.png)

This is Discourse’s default theme, with the user selecting Dark mode in their preferences.

---

<div class="post-metadata">

### Author: ![hoangphuctran93](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hoangphuctran93/32/290976_2.png) [@hoangphuctran93](https://meta.discourse.org/u/hoangphuctran93)
#### Post date: [January 29, 2023, 3:01am UTC](https://meta.discourse.org/t/alternative-voting-category-style/101532/41 "2023-01-29T03:01:42Z")

</div>

I want to ask about showing “vote-count-before-title” on mobile interface, can you add this option? I really like how to display listing or discus on product page, hope this can inspire you to develop theme-component

---

<div class="post-metadata">

### Author: ![hoangphuctran93](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hoangphuctran93/32/290976_2.png) [@hoangphuctran93](https://meta.discourse.org/u/hoangphuctran93)
#### Post date: [February 12, 2023, 10:10pm UTC](https://meta.discourse.org/t/alternative-voting-category-style/101532/42 "2023-02-12T22:10:38Z")

</div>

This is a mod by @Don to get theme-component working on phone after i asked for help, i really appreciate it. [FKB Pro - Social theme - #83 by Don](https://meta.discourse.org/t/fkb-pro-social-theme/234323/83)

[Previous page](https://meta.discourse.org/t/alternative-voting-category-style/101532.md?page=1)

[Next page](https://meta.discourse.org/t/alternative-voting-category-style/101532.md?page=3)
