DarrenOfficial/dpaste

Ability to add inline comments

koobs opened this issue · 2 comments

koobs commented

Feature request borne from this twitter thread

A fairly thorough search identified only a single pastebin implementation that supports inline commenting, but the UX is not great. Also one-comment-per-line limited.

Summary: Ability to add inline comments to an existing paste
Value prop: Make dpaste vastly more valuable for anonymous / collaborative / iterative review use-cases, for example: code review, text/prose review

Description:

As a paste viewer I can arbitrarily select a contiguous block of text in an existing paste, and add/submit comments for subsequent viewing by others.

Details/Considerations/Specs:

  • Store information on / Distinguish between multiple commenters (for rendering)
    • ie: Distinguish Person 1, Person 2's comments at render time
  • Ability to click single line number to add comment for that line (ala github commit review)
  • Ability to click and drag over multiple line numbers to add comment for those lines (ala phabricator review)
  • Ability to arbitrarily select contiguous text, and add comment for that specific selection
  • Highlight (perhaps different colours for each comment) comments on paste render
    • Optionally: Button to hide comments/highlights

Existing real-world examples to inform design/implementation:

  • GitHub commit review/comments (limited to per-line, no multi-line, no arbitrary text selection)
  • Phabricator differential review (one or more line select, no arbitrary text selection)

Relevant/Useful Resources & References:

koobs commented

GitHub just landed multi-line commenting, so their JS implementation may be usable as a reference now for this issue in addition to Phabricators

EFz--nuWwAITekR

I am closing this. I think this is a great idea and would love to have it — and happy to accept a PR if someone has the time, but its not realistic for me to implement in near future.

I started with a dpaste4 variant that is based on React and writes into a DynamoDB endpoint (or any NoSQL db) directly, where this would be much easier to implement. So won't be forgotten.