DrupalGap icon indicating copy to clipboard operation
DrupalGap copied to clipboard

Threaded comments and reply forms support

Open pribeh opened this issue 8 years ago • 2 comments

Thanks for this superb module. Any idea how we might go about supporting threaded comments? Seems like comments could use a UX update to accommodate threaded comments:

  • comments listed newest to oldest
  • comment form at the top of the list
  • comments inserted via the top comment form are appended to the top of the list
  • threaded comments listed oldest to newest
  • reply links on comments which trigger either a) the existing comment form to move underneath the respective comment or, b) a new comment form appears underneath
  • comments inserted via the reply form are appended to the bottom of the respective thread

Any pointers or assistance would be appreciated.

BTW, not sure I should make this a new issue but I can't find any documentation for this. Is there a way to support comment paging? Ideally a "more comment" type paging?

pribeh avatar Oct 28 '17 22:10 pribeh

@pribeh You're welcome. Thank you for trying DrupalGap, and for taking the time to provide feedback on it. I agree the comment system can be improved.

For starters...

comments listed newest to oldest comment form at the top of the list

This can be modified in node_page_view_pageshow() https://github.com/signalpoint/DrupalGap/blob/7.x-1.x/src/modules/node/node.js#L244

comments inserted via the top comment form are appended to the top of the list

This can be modified in comment_services_postprocess() https://github.com/signalpoint/DrupalGap/blob/7.x-1.x/src/modules/comment/comment.js

Ideally the code changes would be dynamic and listen to the settings specified on the content type. If you do a console.log(drupalgap); it's possible to dig through and find this configuration per content type.

As for the rest of the issues, I will follow up as time allows, thank you for your patience.

signalpoint avatar Oct 30 '17 16:10 signalpoint

This is a great start. Thanks so much for these pointers. I'll take a look and see what I can do. I'll report back with my progress.

pribeh avatar Oct 30 '17 17:10 pribeh