[PATCH RFC] hgweb: improve annotate flow

Matt Mackall mpm at selenic.com
Fri Nov 18 18:08:27 CST 2011


On Fri, 2011-11-18 at 21:15 +0100, Patrick Mézard wrote:
> Le 18/11/11 19:55, Laurens Holst a écrit :
> > Op 18-11-2011 19:37, Patrick Mézard schreef:
> >> It actually exists but there is nothing to scroll so it gives the impression the anchor is not there. Just look for 'id="t1.372"' in the page source. That said, the anchor generation is a little ad-hoc and I would not be surprised to find bugs in this area with complicated patches mixing binaries and renames.
> >>
> >> Also, Javascript could be used here to highlight the target line or the target hunk and avoid this no-scroll issue (or even CSS if the id passed as a parameter as well).
> > 
> > Actually there’s an easier way to do this, without scripting; If you move the ID from the <a> tag to the <td> tag, you can use the CSS :target pseudo-class to highlight the line, something like:
> > 
> > td:target { background-color: yellow }
> 
> Thanks, I have updated the demo server. And mpm link now looks like:
> 
>   http://mezard.eu/hg/hg-does-it-look-good-for-you/rev/5868dd69fb03/#t1.372

That highlighting is a fine idea, we should have that elsewhere where we
have anchors. Something paler like #ffd would be better though, at least
for paper.

Perhaps we should make the diff line itself link to the annotation,
perhaps with a hover-over "annotate this line".

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list