iFixit / iFixitAndroid

Official iFixit Android App
https://play.google.com/store/apps/details?id=com.dozuki.ifixit
GNU General Public License v3.0
162 stars 88 forks source link

Add commenting to Guides / Steps #190

Closed timothyasp closed 10 years ago

timothyasp commented 10 years ago

This adds commenting features to guide and step views.

Features:

timothyasp commented 10 years ago

Just retested, and this is looking good after all the changes made in the API

scotttherobot commented 10 years ago

This is lovely -- except for reloading comments. If you load a guide on the device, then make a comment on the website, you'll be hard pressed to get the comment to show up in the app. The reload guide button doesn't seem to help. (I talked to @timothyasp about this in more detail).

Everything else looks good.

Nice work, @timothyasp!

timothyasp commented 10 years ago

@scotttherobot Fixed with dca056f

marczych commented 10 years ago

I can't leave a comment on an image diff so I'm leaving it here instead. We already have 2 overflow menu resources: ic_menu_moreoverflow_normal_holo_light and ic_menu_spinner. I don't think adding another one (ic_action_overflow) into the mix makes any sense.

In fact none of those are actually used... we probably have a lot of unused resources that we should removed.

marczych commented 10 years ago

I'm still going through it but here is my list so far:

Disabled comment box when logged out

  1. While logged out, view some comments.
  2. Type something into the comment box.
  3. Hit the send button.
  4. The login dialog pops up. Cancel it by hitting back or tapping outside of the dialog.
  5. The comment box is disabled. However, the send button is still enabled so you can still send it after logging in.

Canceling the login dialog should probably enable the comment box.

timothyasp commented 10 years ago

Unfortunatly it's not possible to apply the transformations to the error image https://github.com/square/picasso/issues/337

We'd have to go with a whole new approach

timothyasp commented 10 years ago

Addressed the important bugs and usability concerns.

marczych commented 10 years ago

Comment deletion

  1. Delete a comment.
  2. Change orientation. Notice how the spinner on the menu is gone.
  3. Delete the comment again.
  4. First API call comes back and the comment is removed.
  5. Second API call comes back and results in a crash:
 Caused by: java.lang.NullPointerException
     at com.dozuki.ifixit.ui.guide.CommentsActivity.onCommentDeleted(CommentsActivity.java:216)
     at java.lang.reflect.Method.invokeNative(Native Method)
     at java.lang.reflect.Method.invoke(Method.java:515)
     at com.squareup.otto.EventHandler.handleEvent(EventHandler.java:89)
     at com.squareup.otto.Bus.dispatch(Bus.java:384)
     ... 16 more
timothyasp commented 10 years ago

Issues handled - thanks for the testing @marczych!

timothyasp commented 10 years ago

Merging...

marczych commented 10 years ago