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

Add an "Is Ready" class once javascript loads #37

Open
brettburwell opened this issue Jul 6, 2022 · 3 comments
Open

Add an "Is Ready" class once javascript loads #37

brettburwell opened this issue Jul 6, 2022 · 3 comments
Labels
feature request New feature or request

Comments

@brettburwell
Copy link

Howdy duder.

This plugin is nifty! One thing I'd like to do is fade / animate the vote count into place (vs. it suddenly popping into place once the javascript is loaded and it's injected into the page).

Would it be possible to add a class we could use as a styling hook? Something like .is-ready or .upvote-total-upvotes-ready?

And forgive me if there's already a simple way to do this that I'm just overlooking.

Thanks in advance.

@lindseydiloreto
Copy link
Contributor

Hey dude! 🍺

There are a few classes that are automatically added already, not sure if they are something that you can use. More specifically, the upvote-vote-match class gets added to every upvote/downvote icon after the vote has been cast.

The docs don't go into great detail about it, but here is the relevant page...

https://plugins.doublesecretagency.com/upvote/customize-your-css/#css-classes

Hope that helps! If not, feel free to DM me on Discord and we can chat about what might be possible.

@lindseydiloreto
Copy link
Contributor

After chatting on Discord, it sounds there's currently no good workaround. The number itself doesn't have any classes that change when a vote is cast.

So let's create a new class (ie: upvote-voted) which will be dynamically added to the number (and possibly arrows) of an element when a vote is cast.

Thanks for the suggestion @brettburwell! I'm not sure exactly when this will get implemented, but I'll try to work it into the next major round of changes. 👍

@lindseydiloreto lindseydiloreto added the feature request New feature or request label Jul 14, 2022
@brettburwell
Copy link
Author

Thanks again @lindseydiloreto!

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

No branches or pull requests

2 participants