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

Comment Detail: Add functionality for the Like button #17273

Merged
merged 4 commits into from
Oct 7, 2021

Conversation

dvdchr
Copy link
Contributor

@dvdchr dvdchr commented Oct 6, 2021

Refs #17108
Depends on #17269. Please review this one first. 🙂

As titled, this adds functionality for the Like button. I've also ported the Like button animation from the previous implementation.

To test

Ensure that the New Comment Detail is enabled.

Scenario 1: Normal flow

  • Go to My Site > Comments.
  • Select any comment (preferably comments for testing purposes 😬 ).
  • Press the Like button.
  • Verify that the animation shows correctly.
  • Verify that the Like button is recorded on the backend correctly (verify the like state on the web).
  • Verify that the event is tracked successfully.

Testing the unlike flow:

  • Press the Like button again.
  • Verify that the unlike animation is shown correctly.
  • Verify that the unlike action is reflected correctly (verify the like state on the web).
  • Verify that the event is tracked successfully.

Scenario 2: Failed network request flow

  • Set your network connection to a very slow mode (e.g. using a Network Link Conditioner).
  • Select any comment.
  • Tap on the Like button.
  • Disable your connection while the network request is ongoing.
  • Verify that after the like state is updated, it gets reverted back to the original state since the post request failed.

Scenario 3: Disabled connection flow

  • Turn off your connection / enable airplane mode.
  • Select any comment.
  • Press the Like button.
  • Verify that the state is not changed.

Regression Notes

  1. Potential unintended areas of impact
    n/a. The feature is still hidden behind a flag.

  2. What I did to test those areas of impact (or what existing automated tests I relied on)
    n/a. The feature is still hidden behind a flag.

  3. What automated tests I added (or what prevented me from doing so)
    n/a. The feature is still hidden behind a flag.

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Oct 6, 2021

You can trigger an installable build for these changes by visiting CircleCI here.

@dvdchr dvdchr changed the base branch from develop to issue/17108-share-button-logic October 6, 2021 16:58
@peril-wordpress-mobile
Copy link

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

@ScoutHarris
Copy link
Contributor

(preferably comments for testing purposes 😬 )

Haha! Take all the fun out of spamming someone! 😆

Copy link
Contributor

@ScoutHarris ScoutHarris left a comment

Choose a reason for hiding this comment

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

Nice!

:shipit:

Base automatically changed from issue/17108-share-button-logic to develop October 7, 2021 06:27
@dvdchr dvdchr enabled auto-merge October 7, 2021 06:33
@dvdchr dvdchr merged commit b0a9d96 into develop Oct 7, 2021
@dvdchr dvdchr deleted the issue/17108-like-button-logic branch October 7, 2021 06:58
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.

2 participants