Skip to content

Instantly share code, notes, and snippets.

@Abijeet
Last active September 30, 2016 19:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Abijeet/ac2e80f473359b2860b8bb6d33f6b541 to your computer and use it in GitHub Desktop.
Save Abijeet/ac2e80f473359b2860b8bb6d33f6b541 to your computer and use it in GitHub Desktop.

Leave comments on someone elses pages #47

These page contains details for the implementation of the comments section for BookStack. Issue is [here] (BookStackApp/BookStack#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 -

Schema

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment