Githawk: Edit comments

Created on 29 Jul 2017  ·  8Comments  ·  Source: GitHawkApp/GitHawk

  • Check if viewer can edit
  • Show "..." icon on comments
  • Alert controller with options (e.g. Edit)
  • Use Slack TV for editing
🆕 feature request

Most helpful comment

Made some progress on this. Now have original markdown String and viewerCanUpdate for each item. Also wired up "..." and action menu on each comment. Plan is to:

  • Add edit action item if viewerCanUpdate == true
  • Send delegate event to IssueViewController
  • Set editing = true and reload IssueCommentSectionController

    • Changes all cells to 50% transparent

  • Issue VC puts rawMarkdown in Slack text field, becomes first responder
  • On cancel, set editing = false and reload section controller
  • On send, show spinner somewhere (maybe overlay whole VC?)

    • Receive updated comment model on finish

    • Parse

    • Put new model in feed (replace original model)

Pretty complex, but chipping away.

All 8 comments

Looking forward to it.

Good reminder, gonna get on this!

Thanks for the app. Our app is much cleaner then other apps and I think it is the correct way to do.

*Your

This is the reason of this issue.

Made some progress on this. Now have original markdown String and viewerCanUpdate for each item. Also wired up "..." and action menu on each comment. Plan is to:

  • Add edit action item if viewerCanUpdate == true
  • Send delegate event to IssueViewController
  • Set editing = true and reload IssueCommentSectionController

    • Changes all cells to 50% transparent

  • Issue VC puts rawMarkdown in Slack text field, becomes first responder
  • On cancel, set editing = false and reload section controller
  • On send, show spinner somewhere (maybe overlay whole VC?)

    • Receive updated comment model on finish

    • Parse

    • Put new model in feed (replace original model)

Pretty complex, but chipping away.

Scratch that on using Slack TV... too complicated. Instead:

  • Show "Edit" menu option
  • Modally show a new IssueEditCommentViewController that is just a UITextView w/ the actions bar

    • Actions bar needs bundled into its own class or something...

    • Give VC original markdown text

  • Modal has "Cancel" and "Update"
  • On success, return to the section controller w/ a new markdown model. Section controller creates new IssueCommentModel (or something) w/ new markdown and overwrites its view models.

Ya, I think this should work and be a _lot_ easier than trying to handle inline editing.

Made more progress on this on my flight home:

  • Created edit VC
  • Wired up alert actions when viewerCanUpdate

Networking and UI updating is next.

Giving this a test on TestFlight and then ready to go!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rnystrom picture rnystrom  ·  3Comments

rizwankce picture rizwankce  ·  3Comments

BasThomas picture BasThomas  ·  3Comments

rnystrom picture rnystrom  ·  3Comments

BasThomas picture BasThomas  ·  3Comments