Pull Request: SiteSetting to anonymous users to "like" posts

Hi all,

I’ve opened a PR to allow anonymous users to “like” posts. It’s a SiteSetting so admins have the option of enabling or disabling the feature.

Could I please get a code review? :smile:

Context: I’m part of a 501(c)3 discourse where our accounts are registered under our actual names.
We encourage anonymous discussion, as some people want to share about personal experiences and sensitive topics. (mental health, difficult past memories, etc). The anonymous discussion has been extremely rich and helpful, and adding an anonymous “like” feature would help us gauge community interaction on topics where people might strongly empathize or agree but not feel comfortable putting their name out there.

Thank you!!

10 Likes

Could someone please point me towards the process getting Maintainer review and approval? :smiley:

Thanks!

2 Likes

Thanks for the PR and this topic @meltingmettle_gh, a team member will review the PR shortly.

4 Likes

Hiya, we reviewed and have left some comments about translations and UX.

4 Likes

Hello! I’ve updated the PR and it is ready for another review. Thank you!

3 Likes

Reviewed – needs more work. Thanks for the ping here!

3 Likes

Could I please get a quick tip on where to invoke the disallow icon? I’ve taken another look but I can’t quite figure it out. :sweat_smile:

From GH comment:

Hi @nattsw, thank you for the second review. I’m having a bit of trouble figuring out where the disallow is supposed to happen since post_undo_action_window_mins is only referenced in can_delete_post_action?, and the method is correctly returning false once the post_undo_action_window_mins has passed.

However, despite this method returning false correctly after the window has closed, the disallow symbol does not appear, but there is no other method that references post_undo_action_window_mins. I realize that can_delete_post_action? is called when the page is loaded, but I can’t quite locate where the actual disallow icon is invoked.

Could you please point me towards the block of code that calls the disallow symbol? Thank you!

2 Likes

Thank you for the tip! That was super helpful! I’ve pushed a patch, manually verified the behavior, and added additional test coverage. It’s ready for another round of review when you have the chance. :smiley:

5 Likes

Thanks a lot for this feature Emmett, good tests! We look forward to your future contributions.

:git_merged:

and sorry the reviews took a while!

7 Likes

This topic was automatically closed after 4 days. New replies are no longer allowed.