9/13/2016 - 7:07 PM


Leave comments on someone elses pages #47

These page contains details for the implementation of the comments section for BookStack. Issue is [here] (https://github.com/ssddanbrown/BookStack/issues/47).

Functionality to implement

  • Add a simple editor with Markdown support.
  • Ability to add comments.
  • Ability to edit own comments.
  • Ability to delete your own comments
  • Ability to link directly to a comment in the page
  • Ability to reply to a comment (upto 2 levels?)
  • Display total comments on the page summary maybe.
  • User should not be able to edit other's comments.

Future enhancements

  • Comment change history
  • Add roles to comment.
  • Inline document comments where users can highlight sections of pages and comment on those.
  • Like comments
  • Highlight people via your comments with a "@Abijeet", similar to Facebook.

Database schema

The database schema will be a simple tree based schema.

Reviewed various tree based schema's structure for SQL described here http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/

After analyzing the various schema structures, I've finally decided to go ahead with the Adjacency List based on its simplicity. Following will be the schema structure -