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 reactions to images #344

Closed
wants to merge 0 commits into from
Closed

Conversation

kaustubh-nair
Copy link
Member

Fixes #126
Here is a screenshot for the star button!
mapknitter

@jywarren How do I test this? I am not sure how to load images into tests. Also there isn't a warpable controller. Should I make an integration test to test this?

I haven't added multiple reactions for images. It only has a star button for now, since I was not sure how to place all the reactions in the view. And I didn't know to show the reactions. I tried to make the code as dynamic as possible to include multiple reactions for the future so maybe we can make a follow up issue after this to deal with that.

Thanks!

@welcome
Copy link

welcome bot commented Feb 18, 2019

Thanks for opening this pull request! Dangerbot will test out your code and reply in a bit with some pointers and requests.
There may be some errors, but don't worry! We're here to help! 👍🎉😄

Copy link
Member

@jywarren jywarren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, this looks really great! Thanks so much!!! Just a few changes requested!

app/assets/javascripts/reactions.js Outdated Show resolved Hide resolved
@@ -0,0 +1,40 @@
function changeReactionCount(value, warpableId) {
$('#reaction-count-' + warpableId).html(value);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use classes here, in case we start wanting to have the star buttons shown in multiple places? Like, for example, on the toolbars that popup on the images, for example. Thanks!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm unable to add the functions in a class here..The class was not getting loaded.
It said 'Reaction is undefined'
But I don't see why we need a class for this?
The functions are publicly accessible so they can be accessed from anywhere

app/models/warpable_reaction.rb Outdated Show resolved Hide resolved
config/routes.rb Outdated Show resolved Hide resolved
@kaustubh-nair
Copy link
Member Author

@jywarren I've made the changes requested
Please review!
Thanks!

@jywarren
Copy link
Member

Hi, can you check out the errors in Travis and see if you can get them fixed? If you get stuck, please ask for help and we'll do our best! Thank you!

@codeclimate
Copy link

codeclimate bot commented Aug 13, 2019

Code Climate has analyzed commit d5c9565 and detected 128 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 57
Duplication 30
Security 31
Bug Risk 10

Note: there are 13 critical issues.

View more on Code Climate.

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.

Liking (stars) for maps
2 participants