Deprecating WPTableViewController (YAY!) - #3865
Conversation
There was a problem hiding this comment.
Maybe move the import into the implementation and define it here via a @class ?
There was a problem hiding this comment.
Might be nice to have consts for the batch size and the spam status in the predicate. Maybe something for another PR targeting cleanup?
There was a problem hiding this comment.
Turns out, there was already a spam constant in Comment.h. Updating right here, thanks!
There was a problem hiding this comment.
Thinking about this a bit... In the reader, it makes sense to fetch comments fresh everytime its comment list loads because they are post centric and we always expect different results. But I think in a blog's Comments list, we expect the content to change less frequently. The previous implementation included a mechanism for automatically refreshing only "if needed," which basically meant at least 5 minutes after the last time the list was synced. There is a similar implementation in the current version of the Post and Page lists. Would it make sense to retain something along the same lines here?
There was a problem hiding this comment.
This guy existed so WPTableViewController subclasses could specify what sort of content needed to be fetched. If we wanted to, we could kill it to simplify things a bit.
There was a problem hiding this comment.
It's being used, currently, by the fetchRequest getter. I've just kept it because, in Notifications, we also have it there. Felt consistent! =D
|
Hiya @jleandroperez :) I tested the three scenarios and they worked great. Thanks for the fast code changes, I could barely stay ahead of you in the review :D. |
|
@aerych thanks so much!! So long, WPTableViewController!! |
…-controller Deprecating WPTableViewController (YAY!)
Details:
In this PR we'll nuke WPTableViewController, and update the last ViewController that was still depending on it, to rely on WPTableViewHandler + WPContentSyncHelper instead.
This is based on the work already done by Eric in
ReaderCommentsViewController.Test Scenario 1: Infinite Scroll
Expected: a spinner shows up at the bottom, and the app begins loading more comments
Test Scenario 2: Empty State
Expected: A label shows up onscreen, indicating that there are no comments to be displayed.
Test Scenario 3: Pull to Refresh
Expected: A spinner shows up onscreen, and after a couple seconds, the new comment shows up onscreen.
@aerych can i poke you with this one?. I think you'd love the WPTableViewController part!
Thank you!