ColinEberhardt / applause-button

A zero-configuration medium-style button for adding applause / claps / kudos to web pages and blog posts
http://applause-button.com/
MIT License
427 stars 41 forks source link

Missing style when "clap-limit-exceeded" is added to applause button #69

Closed android10 closed 3 years ago

android10 commented 3 years ago

Hello, first of all thanks for such a great Job!. I'm proudly donating/contributing to the project. :).

This issue might be related to this one: https://github.com/ColinEberhardt/applause-button/issues/57

I have a problem when someone reaches the rate limit, the logic behind returns class="clapped clap clap-limit-exceeded":

<applause-button color="#fa8c51" url="http://fernandocejas.com/projects/soundcloud/" class="clapped clap clap-limit-exceeded" style="display: block;">
...

Which leads to the button not to display correctly:

issue_clapp

Whereas when everything works as expected the html returned leaves this class empty and prints accordingly:

<applause-button color="#fa8c51" url="http://localhost:4000/projects/soundcloud/" class="" style="display: block;">

Any suggestion on how this can be fixed? Maybe a fallback style or something like that with the button disabled?

Maybe I'm missing something since I'm not expert in this field but I would like to display something more user-friendly (meaningful).

Thank you very much!

ColinEberhardt commented 3 years ago

Thanks for backing - very much appreciated!

That sounds a bit odd, previously I've not applied any styling on clap-count-exceeded. I have made a few changes as detailed here:

https://github.com/ColinEberhardt/applause-button/issues/57#issuecomment-757898063

Perhaps you could give it a go and see whether you still have an issue?

android10 commented 3 years ago

@ColinEberhardt it is weird because I have been trying to reproduce the issue and I could not anymore. Maybe some inconsistent state on my side? 🤔

I also checked your last commit and comment on #57. Thanks for taking care of it. ❤️

I will close this so it does not generate any further noise. We can re-open if needed and I will also send a PR next time if required.