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

[WIP] Turn off notifications for posts' reactions #3391

Closed

Conversation

nicolas-amabile
Copy link

@nicolas-amabile nicolas-amabile commented Jul 7, 2019

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Documentation Update

Description

This PR adds the feature of disabling notifications for post reactions.

Related Tickets & Documents

Feature request here: #3244

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

demo

Added to documentation?

  • docs.dev.to
  • readme
  • no documentation needed

@pr-triage pr-triage bot added the PR: unreviewed bot applied label for PR's with no review label Jul 7, 2019
@CLAassistant
Copy link

CLAassistant commented Jul 7, 2019

CLA assistant check
All committers have signed the CLA.

Fix for missing post_reaction_notifications on organizations
@nicolas-amabile nicolas-amabile force-pushed the customize-notifications branch 2 times, most recently from 48ade8e to 09fb929 Compare July 7, 2019 02:37
@nicolas-amabile nicolas-amabile mentioned this pull request Jul 7, 2019
7 tasks
@rhymes
Copy link
Contributor

rhymes commented Jul 7, 2019

Hi @nicolas-amabile, thanks for the PR! I'm going to leave my feedback there are few things missing / to discuss, I always encourage people to start a discussion on new features on the issue, in this case #3244, than to start coding right away. This way both the team and the contributor knows how and what.

In this case I think your PR is incomplete:

  • the receiver can be an organization, yet you're adding the field only to the user table
  • receiver_data is a Hash with two fields: the class (User or Organization) and the ID, which means that receiver_data.fetch(:post_reaction_notifications, true) it's always going to return true.
  • the migration that adds the field post_reaction_notifications is missing
  • the UI for the organization needs a little bit of thinking
  • there are no tests

If it's otherwise incomplete because you're working on it, please mark it as [WIP] so that it will be reviewed only at the end.

My suggestion is to start a conversation on the issue itself at least about the UI and then go back to the code from there.

Copy link
Contributor

@rhymes rhymes left a comment

Choose a reason for hiding this comment

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

See my comment here #3391 (comment)

@pr-triage pr-triage bot added PR: reviewed-changes-requested bot applied label for PR's where reviewer requests changes and removed PR: unreviewed bot applied label for PR's with no review labels Jul 7, 2019
@nicolas-amabile nicolas-amabile changed the title Turn off notifications for posts' reactions [WIP] Turn off notifications for posts' reactions Jul 7, 2019
@pr-triage pr-triage bot removed the PR: reviewed-changes-requested bot applied label for PR's where reviewer requests changes label Jul 7, 2019
@nicolas-amabile
Copy link
Author

@rhymes thank you for the feedback!
I misinterpreted the status: approved tag, my bad ✋I just added the [WIP] and I'll comment on the issue.

the receiver can be an organization, yet you're adding the field only to the user table

Yes, it makes sense to have the same feature for both, users and organizations.

receiver_data is a Hash with two fields: the class (User or Organization) and the ID, which means that receiver_data.fetch(:post_reaction_notifications, true) it's always going to return true.

Got it, typo when I extracted the logic into the shoud_send_reaction_notification function.
It should be receiver instead of receiver_data.
Screen Shot 2019-07-07 at 12 18 48 PM
Screen Shot 2019-07-07 at 12 20 13 PM

  • the migration that adds the field post_reaction_notifications is missing
  • the UI for the organization needs a little bit of thinking
  • there are no tests

Agree, I'll need some help here, I've never used ruby before.

@mstruve
Copy link
Contributor

mstruve commented May 6, 2020

Hey @nicolas-amabile!

Thank you so much for jumping in and trying to fix this issue! With that said, we are in the process of going through and cleaning up some of our PR history to help us better prioritize what we need to be focusing on. Since this PR has not been active for a while and has some conflicts I am going to close it for now. If you would still like to get this merged please feel free to resolve the conflicts, add the additional suggested content, and then open the PR back up. We would be more than happy to help push this through if you would like!

Thanks so much for contributing! Ping us anytime if you have questions!

@mstruve mstruve closed this May 6, 2020
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.

None yet

4 participants