Plots2: Display Notification When User Likes Research Note

Created on 23 Mar 2021  路  9Comments  路  Source: publiclab/plots2

Description

Let's display a notyNotification when a user likes a research note. And also a second notification when the user dislikes a research note.

See this thread for more context.

Why Do This?

Here's a video of what happens when a user likes a research note:

https://user-images.githubusercontent.com/4361605/112049294-aa6bec00-8b0c-11eb-81dd-403a9dfc418b.mov

  1. It's not clear to the user what this star button does. No hover tooltip, no notification.
  2. There is a slight delay (probably due to slowness in the controller) between when the user clicks, and the star gets filled in. A hover tooltip can really help here to reduce UX confusion.

For example, here's the notification that we use when a user posts a comment (in the top-right corner):

https://user-images.githubusercontent.com/4361605/112049959-88bf3480-8b0d-11eb-820b-2ba880b15217.mov

How to Implement

The comment example above is done here in create.js.erb:
https://github.com/publiclab/plots2/blob/07a243da39702501d0f5d4de8a3683a24d680a38/app/views/comments/create.js.erb#L42

We can add similar notyNotifications here in like.js, depending on if the research note is liked or disliked:
https://github.com/publiclab/plots2/blob/07a243da39702501d0f5d4de8a3683a24d680a38/app/assets/javascripts/like.js#L14-L25

JavaScript easy feature help wanted

Most helpful comment

@noi5e here's what I came up with:

Screencast-2021-03-28-171020

What do you think?

All 9 comments

Can I work on this one?

@jcads Yeah, go for it! Post a comment here if you need any pointers, or if you need some help. :)

Hi @jcads 馃憢馃従 I see you've already worked on another first-timer issue here https://github.com/publiclab/plots2/pull/9306
We usually recommend that you pick another issue that is not a first-timer to allow other contributors who are new to pick issues like these ones out. If you have not already worked on this, is it okay to leave this issue to another first timer?

oh, sorry this is not a first-timer issue... my bad @jcads sorry for the confusion...

As there is no update on this, can I take up this issue?

@sahilsaha7773 I am assuming that @jcads is working on it, they'll let you know if they stop working on it.

@sahilsaha7773 I am assuming that @jcads is working on it, they'll let you know if they stop working on it.

okay sure, thanks!

@sahilsaha7773 I am assuming that @jcads is working on it, they'll let you know if they stop working on it.

Yes I am still working on this. Will open a PR in a couple of days, I just have to finish some internship stuff.

@noi5e here's what I came up with:

Screencast-2021-03-28-171020

What do you think?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

divyabaid16 picture divyabaid16  路  3Comments

keshavsethi picture keshavsethi  路  3Comments

grvsachdeva picture grvsachdeva  路  3Comments

keshavsethi picture keshavsethi  路  3Comments

shapironick picture shapironick  路  3Comments