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

Notifications > Comment Details: show previous/next comments #17923

Merged
merged 6 commits into from
Feb 14, 2022

Conversation

ScoutHarris
Copy link
Contributor

@ScoutHarris ScoutHarris commented Feb 9, 2022

Ref: #17790

In the Comment Notifications details view, the previous and next buttons now display the previous and next comments.

Note: this only works in the Comments filter. The All and Unread filters have not been updated yet.

To test:

  • Enable the notificationCommentDetails feature.
  • Go to Notifications > Comments.
  • Select a notification.
  • Tap the previous and next arrows in the nav bar.
  • Verify the previous and next comments are displayed.

Regression Notes

  1. Potential unintended areas of impact
    N/A. Feature is disabled.

  2. What I did to test those areas of impact (or what existing automated tests I relied on)
    N/A

  3. What automated tests I added (or what prevented me from doing so)
    N/A

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.

@ScoutHarris ScoutHarris requested a review from frosty February 9, 2022 21:29
@ScoutHarris ScoutHarris marked this pull request as ready for review February 9, 2022 21:29
@jkmassel
Copy link
Contributor

jkmassel commented Feb 9, 2022

You can test the Jetpack changes on this Pull Request by downloading it from AppCenter here with build number: pr17923-c8256c3. IPA is available here. If you need access to this, you can ask a maintainer to add you.

@jkmassel
Copy link
Contributor

jkmassel commented Feb 9, 2022

You can test the WordPress changes on this Pull Request by downloading it from AppCenter here with build number: pr17923-c8256c3. IPA is available here. If you need access to this, you can ask a maintainer to add you.

Copy link
Contributor

@frosty frosty left a comment

Choose a reason for hiding this comment

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

Functionally this is working great for me 👍

However, I after I saw the note about the non-weak reference to the navigation delegate I did some testing with the memory graph debugger and I saw that there's a retain cycle going on – the coordinator and detail view controller were never being released if you tapped in and out of numerous comment notifications. There were also some strong self references used in the various actions used in CommentContentTableViewCell. I've fixed these up on a separate branch – you can see the commits here: https://github.com/wordpress-mobile/WordPress-iOS/compare/feature/17790-arrow_functionality...feature/17790-retain-cycle-fix?expand=1. Hope this helps!

@@ -57,6 +56,15 @@ class NotificationCommentDetailCoordinator: NSObject {

private extension NotificationCommentDetailCoordinator {

func configureWith(notification: Notification) {
Copy link
Contributor

Choose a reason for hiding this comment

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

To avoid the duplicate notification when calling this method (e.g. configureWith(notification: notification)) I would suggest naming it configure(with notification: Notification). A call then becomes configure(with: notification).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What? You don't appreciate ObjC + Swift mashups? 😉 Thank you. Tis been fixed. 😄

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Feb 10, 2022

You can test the Jetpack changes on this Pull Request by downloading it from AppCenter here with build number: pr17923-95cb093. IPA is available here. If you need access to this, you can ask a maintainer to add you.

@ScoutHarris
Copy link
Contributor Author

I've fixed these up on a separate branch

You're a star!! Thank you!! Clearly I didn't see the problem, so yes that most definitely helped.

I've merged your branch, so ready for another go please.

@ScoutHarris ScoutHarris requested a review from frosty February 10, 2022 20:58
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Feb 10, 2022

You can test the WordPress changes on this Pull Request by downloading it from AppCenter here with build number: pr17923-95cb093. IPA is available here. If you need access to this, you can ask a maintainer to add you.

Copy link
Contributor

@frosty frosty left a comment

Choose a reason for hiding this comment

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

Changes look good! I just remembered something else I forgot to mention previously, however I don't think it should hold this PR up – are we able to do something to stop the view jumping around when you switch comment?

Screen.Recording.2022-02-10.at.10.06.33.mov

@ScoutHarris
Copy link
Contributor Author

Hey @frosty .

are we able to do something to stop the view jumping around when you switch comment?

In short, @dvdchr had some issues getting the view to resize correctly after the content was loaded, so yea it jumps a bit due to refreshing. I won't be addressing that with this project, but maybe we can look at it in the future.

Thanks!

@ScoutHarris ScoutHarris merged commit 9c4b2fb into trunk Feb 14, 2022
@ScoutHarris ScoutHarris deleted the feature/17790-arrow_functionality branch February 14, 2022 18:28
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.

4 participants