Closed maxme closed 7 years ago
The switch to CommentStatusCriteria
in CommentsListFragment
means that these two equals()
calls are now comparing different objects:
and
Note.java now contains several unused methods, including canEdit(), which relies on localBlogId. Should we clear them out?
done in e256bb7 (some other methods were not used, I kept them and they should work)
If I'm not mistaken, here are the remaining tasks before your second pass:
setCommentIsModerating
(or implement a better way to display them).getCommentsForSite
CommentStore getter, (and use the same order in getCommentsForSite
and Collection.sort
calls)CommentStatus(Criteria) comparisons fixed in 21fdd34fafe0dfe210900d7f0a22b88a41f2c2ff and 703b52c5c9b3fae682a36343bd16b2c654d70242 (not a big fan of fromComment()
since it's just a one liner)
Drop the commented setCommentIsModerating (or implement a better way to display them).
I enabled this, (via https://github.com/wordpress-mobile/WordPress-FluxC-Android/pull/250 and 592b167) I'm not a big fan of this - I liked the optimistic approach (no loading indicator at all when moderating).
Add asc/desc option in the getCommentsForSite CommentStore getter, (and use the same order in getCommentsForSite and Collection.sort calls)
Fixed in https://github.com/wordpress-mobile/WordPress-FluxC-Android/pull/249 and bbbf93b
There is still one thing that bother me in this PR, the notification list is not refreshed after an action is applied in a comment from the notification list. I'll have to modify the note, save it and refresh the which is a bit sad since it's also done in the comment store (would be great to have a NotificationStore to fix this cleanly).
Drop the commented setCommentIsModerating (or implement a better way to display them).
I enabled this, (via wordpress-mobile/WordPress-FluxC-Android#250 and 592b167) I'm not a big fan of this - I liked the optimistic approach (no loading indicator at all when moderating).
I'm getting an issue with this change. when moderating items from the comment list the moderation action will complete server-side, and the status of the comments in the list will update, but the loading animation on the author icon continues indefinitely.
I'm not a big fan of this - I liked the optimistic approach (no loading indicator at all when moderating)
FWIW I prefer the optimistic approach as well, my original comment was only intended to point out the stale commented out code. If you want to drop the loading indicators I'm all for it.
The filter list labels in the comment list are now capitalized (I don't think this was intentional):
Original view:
Also, the list now says UNAPPROVED
, but we use Pending
elsewhere (e.g. the empty view message shown in the first screenshot).
If you mark a comment as spam or trash and go to spam/trash filter, that comment sometimes show up there and sometimes doesn't. If you refresh the list, the comment shows up OK. However, as @aforcier mentioned, there is an indefinite progress bar on top of gravatar AND you can't go into the detail view for that comment. You need to go back to the My Site page for it to properly work.
Edit: Interestingly enough marking approved/unapproved works perfectly. Both the list and the detail page works as expected.
Suggestions don't seem to be working on Comment page anymore, it still works on Reader though. I've verified that it was working before on 6.1 on my phone.
Remaining issues are:
Note: I fixed the loading indicator issue in a5cc0dd in case we want to add it back
If I'm in a filtered view and change a comment's status, it still remains in the filtered view - shouldn't it disappear (it does on current develop
)?
For example, select the 'Pending' filter and approve a pending comment (by long-pressing and using the action bar, not by going into detail view). The comment loses its PENDING
label, but stays in the Pending list until you refresh or switch filters.
I'm unable to edit the comment author name, email, and URL fields on either WP.com or self-hosted sites. It looks like we're not sending those fields in the edit comment requests at all.
For WP.com the edit appears to succeed but the comment is actually unchanged.
For self-hosted we get a 500
error from the server (presumably because the wp.editComment
request wasn't modifying the comment) and display a An error occurred while editing the comment
message to the user.
If I'm in a filtered view and change a comment's status, it still remains in the filtered view - shouldn't it disappear (it does on current develop)?
Fixed a29debf
I'm unable to edit the comment author name, email, and URL fields on either WP.com or self-hosted sites. It looks like we're not sending those fields in the edit comment requests at all.
I'll remove these fields
Note update, save and Notification list refresh on comment modified.
Fixed in 85f4eb9 - but only when a comment is moderated
@aforcier should be ready for another pass.
There is at least one bug: when you edit the comment text from the notication list, the text is not modified when you get back to the list (This happens on develop
as well). And there is also a backend issue: the note is not updated on our server when a comment has been modified.
If this was just me, I'd simply remove that feature from the app, not because it's bugged, but because moderating someone else comment is fine, but editing it, it's a bit weird.
I noticed an issue while testing the filter changes. Since we're not clearing existing comments on fetch (like we do with posts), we can have 'ghost' comments that no longer exist on the server but still exist in the local db and show up on the list. Example:
The above is the worst case scenario, though there are other problematic cases. If, e.g., the comment is only trashed on the web, it will still show up in the All
filter, but refreshing the Trashed
filter will update the comment in the db with its new status, and it won't show up under the All
filter anymore.
...we can have 'ghost' comments that no longer exist on the server but still exist in the local db and show up on the list.
Confirming that this is fixed with the changes in https://github.com/wordpress-mobile/WordPress-FluxC-Android/pull/256.
Comment actions from push notifications aren't working for me.
Liking or replying to a comment from a PN (not from the notifications list in the app) starts a loading animation that never ends, and sniffing shows that no network request is made at all.
Comment actions from push notifications aren't working for me.
Fixed in b98706a
:shipit:
Features reworked / tested:
General tests
Self hosted (without Jetpack)
Comment list:
.com / jetpack
Comment list:
Notification list:
Push notification:
Note: if we wanted to refactor this, we should remove the
mNote
references inCommentDetailFragment
andEditCommentActivity
, that complicates a lot of things and we could probably get the comment from theNotification[List/Activity]
before.