Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vote levels #260

Merged
merged 4 commits into from
Sep 20, 2016
Merged

Vote levels #260

merged 4 commits into from
Sep 20, 2016

Conversation

panta82
Copy link
Contributor

@panta82 panta82 commented Jul 16, 2016

b0f8606 removes hard-coded behavior that vote count must be hidden when the value is 0. This is now done through CSS.

Use case:

  • Ability to disable the default behavior of hiding 0 votes (using CSS overrides)

The other two commits introduce the ability to attach custom classes on comments based on the number of votes. See the changes in documentation for more details.

Use cases:

  • Red number when votes < 0, green when >0
  • Collapse or gray out comments with many negative votes
  • Award good comments with visual flair (eg. a different background color)

@posativ posativ merged commit a52a086 into isso-comments:master Sep 20, 2016
@pozitron57
Copy link
Contributor

pozitron57 commented Sep 21, 2016

For some reason I wasn't able to make this work. I edited manually my embed.dev.js to match the proposed changes. Comments without votes do have the class isso-no-votes, but comments with votes do not get the class isso-vote-level-* (though the class isso-no-votes dissapears). What I may be doing wrong? Here is my embed.dev.js.

@panta82
Copy link
Contributor Author

panta82 commented Sep 21, 2016

@pozitron57

Did you configure vote levels in the script tag?
As per: https://github.com/panta82/isso/blob/fd3f6f820d15e09153b89d9385a7443845425b6b/docs/docs/configuration/client.rst

Eg:

<script data-isso="/prefix/"
        data-vote-levels="-5,5,15"
        src="/prefix/js/embed.js"></script>

@pozitron57
Copy link
Contributor

pozitron57 commented Sep 25, 2016

@panta82, Thanks for the reply, I was missing this configuration. I added it but it didn't help. Probably I messed something up while editing embed.dev.js, I'll look into it.

UPDATE

Now it should be data-isso-vote-levels, not data-vote-levels as I tried.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants