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

Likes: Make posts with manually enabled likes still be likeable if Likes are enabled for all posts #9076

Merged
merged 3 commits into from
Mar 23, 2018

Conversation

oskosk
Copy link
Contributor

@oskosk oskosk commented Mar 19, 2018

Fixes #2044

Changes proposed in this Pull Request:

  • Makes the single post edit metabox not have likes forcedly unchecked when Likes are enabled for all posts.
  • Replace a xor comparsion for a regular or when deciding whether to show the Likes button or not based on the metadata of the post and the global setting for Likes

Testing instructions:

  1. Likes module enabled, Settings->Sharing set to likes on a per post basis
  2. On a post, check the box to enable likes for that post, save.
  3. Confirm likes are visible.
  4. Change the setting on Settings->Sharing to enable likes for all posts.
  5. View the previously likeable post.
  6. Confirm you see the Likes button.
  7. Edit the post and see the checkbox remains checked.

Proposed changelog entry for your changes:

Made manually enabled likes to still be likeable if Likes are enabled for all posts

oskosk added 2 commits March 19, 2018 12:32
… posts and likes were previously turned on for when likes were just enabled per post
@oskosk
Copy link
Contributor Author

oskosk commented Mar 19, 2018

@kraftbj regarding the #2044 issue. Would it be expectable to have Likes enabled for all posts and still be able to disable Likes for a single post ? (The implementation on this PR does not do this currently)

@oskosk oskosk changed the title Likes: Make manually enabled likes still be likeable if Likes are enabled for all posts Likes: Make posts with manually enabled likes still be likeable if Likes are enabled for all posts Mar 19, 2018
@oskosk oskosk added [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. and removed [Status] In Progress labels Mar 19, 2018
@oskosk oskosk self-assigned this Mar 20, 2018
@rachelmcr
Copy link
Member

Would it be expectable to have Likes enabled for all posts and still be able to disable Likes for a single post ?

Yes, my understanding is this is the expected behavior. From the Jetpack Likes support doc:

If you’d rather, you can turn off the Like button for specific posts. When editing a post, find the Likes and Shares section near the bottom (you might have to scroll down to find it).

You can then uncheck the box to disable the “Show likes.” option for that post only. When you’ve set it, either publish or update your post to save the change.

@oskosk oskosk force-pushed the fix/likes-intent branch from ccc9a65 to a8dcddb Compare March 21, 2018 14:17
@oskosk oskosk added [Status] In Progress and removed [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Mar 21, 2018
@ghost ghost removed the [Status] In Progress label Mar 21, 2018
@oskosk
Copy link
Contributor Author

oskosk commented Mar 22, 2018

@vindl can I bother you with a review of the code here? Just pinging you because the code was introduced with #7175. The problem this PR tackles is #2044

Copy link
Member

@zinigor zinigor left a comment

Choose a reason for hiding this comment

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

Works great, the logic is closer to what I intuitively expect from such settings.

@zinigor zinigor added the [Status] Ready to Merge Go ahead, you can push that green button! label Mar 22, 2018
Copy link
Member

@vindl vindl left a comment

Choose a reason for hiding this comment

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

@vindl can I bother you with a review of the code here? Just pinging you because the code was introduced with #7175. The problem this PR tackles is #2044

FWIW I don't remember writing this code 😄 - I probably just moved it to separate file so the similar logic can be reused for comment likes. Having said that, the changes here look fine to me.

@dereksmart dereksmart merged commit 5080d7e into master Mar 23, 2018
@dereksmart dereksmart deleted the fix/likes-intent branch March 23, 2018 18:54
@ghost ghost removed the [Status] Ready to Merge Go ahead, you can push that green button! label Mar 23, 2018
oskosk added a commit that referenced this pull request Mar 26, 2018
dereksmart pushed a commit that referenced this pull request Mar 27, 2018
* Changelog 6.0: create base for changelog.

* Add #8938 to changelog

* Add #8962 to changelog

* Add #8974 to changelog

* Add #8975 to changelog

* Add #8978 to changelog

* Add #8867 to changelog

* Add #8937 to changelog

* Add #8961 to changelog

* Add #8855 to changelog

* Add #8944 to changelog

* Add #8973 to changelog

* Add #8977 to changelog

* Add #8979 to changelog

* Add #8980 to changelog

* Add #8982 to changelog

* Add #8983 to changelog

* Add #8984 to changelog

* Add #8986 to changelog

* Add #9005 to changelog

* Add #9010 to changelog

* Add #9012 to changelog

* Add #9021 to changelog

* Add #9022 to changelog

* Add #9056 to changelog

* Add #9061 to changelog

* Add #9079 to changelog

* Add #9080 to changelog

* Add #9088 to changelog

* Add #9096 to changelog

* Add #9097 to changelog

* Add #9100 to changelog

* Add #9107 to changelog

* Add #8969 to changelog

* Add #8993 to changelog

* Add #9003 to changelog

* Add #9031 to changelog

* Add #8945 to changelog

* Add #9052 to changelog

* Add #9058 to changelog

* Add #9066 to changelog

* Add #9076 to changelog

* Add #9053 to changelog

* Add #9108 to changelog

* Add #9135 to changelog

* Add #9148 to changelog

* Add #9125 to changelog

* Add #9137 to changelog

* Added testing instructions for 6.0.

* Added IS testing instructions, huge props to @tiagonoronha.

* Added #8498 to changelog.

* Added #8954 to changelog.

* Added #8985 to changelog.

* add #9027

* add #9112 to changelog

* add #9136 to changelog

* add #9102 to changelog

* add #9093 to changelog

* add #9062 to changelog

* add #9172 to changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants