-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 new details view for cached comment #17850
Conversation
…omment details view for a comment notification.
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just one very minor comment, otherwise
let notificationCommentDetailCoordinator = NotificationCommentDetailCoordinator(notification: note) | ||
|
||
// For now, NotificationCommentDetailCoordinator only loads the Comment if it is cached. | ||
// If the comment is not cached, fall back to showing the old comment view. | ||
// This is temporary until NotificationCommentDetailCoordinator can fetch the comment from the endpoint. | ||
|
||
if let commentDetailViewController = notificationCommentDetailCoordinator.viewController { | ||
commentDetailViewController.navigationItem.largeTitleDisplayMode = .never | ||
self.showDetailViewController(commentDetailViewController, sender: nil) | ||
} else { | ||
// TODO: remove when NotificationCommentDetailCoordinator updated to fetch comment. | ||
self.performSegue(withIdentifier: NotificationDetailsViewController.classNameWithoutNamespaces(), sender: note) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick, but as this method is already pretty long, could we extract these into a presentCommentDetail(for: note)
method or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. I'll do it in the next PR.
Thanks @frosty ! |
Ref: #17790
This is the first step in showing the new Comment Details view for a Comment Notification. Specifically, when a comment notification is selected, if the comment is already cached, it will be displayed with the new view.
Technical details: because
CommentDetailViewController
requires aComment
object, theComment
must first be loaded with information from theNotification
.NotificationCommentDetailCoordinator
has been added to facilitate comment loading, as well as other Notification specific functionality that will be added later.Of course since this is the first step in showing this view, there are a number of outstanding tasks, which are listed in the referenced issue.
To test:
notificationCommentDetails
feature.Regression Notes
Potential unintended areas of impact
N/A. Feature is incomplete and disabled.
What I did to test those areas of impact (or what existing automated tests I relied on)
N/A. Feature is incomplete and disabled.
What automated tests I added (or what prevented me from doing so)
N/A. Feature is incomplete and disabled.
PR submission checklist:
RELEASE-NOTES.txt
if necessary.