clkao / ep_author_neat

Use colored underline for authorship instead of background color
9 stars 8 forks source link

optionally show aggregated author name as line prefix #2

Closed clkao closed 11 years ago

clkao commented 11 years ago

see #1

it seems updateLineNumbers is the right place to add hook.

JohnMcLear commented 11 years ago

What about if there are multiple authors?

clkao commented 11 years ago

Each line will have exactly one primary author, who contributed the most character for that line. for ties, just pick a random one, since the contributions from other author(s) will still be marked in that line.

If consecutive lines have the same primary author, only the first line will show the that author's name, like: 2013-06-09 4 57 24

JohnMcLear commented 11 years ago

That's fine, but what about if HisnYi modifies some of your content, how is that reflected /visible on the pad? IE how can someone tell that you didn't actually author that content but HisnYi did

clkao commented 11 years ago

then his changes are underlined with his authorColor, for example, cliff (as shown by author hover) modified part of the content that i was the primary author:

2013-06-09 5 02 28

I think hackpad does a bit more heuristics weighting paragraph primary author a bit more (since cliff is the primary author for that line, but I am primary for the surrounding paragraph), but this can come later ;)

clkao commented 11 years ago

for displaying the primary author names, we can do something like how the line numbers are done, so the heights are already adjusted and we don't need to touch the inner dom.

JohnMcLear commented 11 years ago

Okies :)