#843944 tracker.debian.org: please add “changes” anchor in news entries

#843944#5
Date:
2016-11-11 03:09:05 UTC
From:
To:
Hi,

It would be nice if an anchor could be added on the “Changes:” line of
the news entry. For example, when trying to point to recent grub2
changes, this link would lead to a page full of descriptions (one for
each binary):
https://tracker.debian.org/news/811622

while the following link could lead directly to the Changes: part which
is filled according to debian/changelog:
https://tracker.debian.org/news/811622#changes

grub2 isn't too bad; linux is… I seem to be needing 11 page downs to get
to the changes part on this entry, for example:
https://tracker.debian.org/news/811137

Thanks for considering.


KiBi.

#843944#10
Date:
2016-11-11 03:20:25 UTC
From:
To:
Cyril Brulebois <kibi@debian.org> (2016-11-11):

I think the attached patch should do the job.

But I suspect the following bits from the CSS might need updating (the
naked “a” part notably), since this anchor gets highlighted in blue,
which might not be too desirable?
| a, a:hover, a:focus {
|     color: #0530D7;
| }


KiBi.

#843944#17
Date:
2016-11-11 03:40:43 UTC
From:
To:
Merged, changed from <a name=... to <span id=... and deploying.
#843944#22
Date:
2016-11-11 13:33:50 UTC
From:
To:
Paul Wise <pabs@debian.org> (2016-11-11):

Thanks. Is the code really deployed? I suspected maybe only new news
pages would have this change (others might have been generated/cached
already) but that doesn't seem to be the case, e.g.:
https://tracker.debian.org/news/814326

Or maybe I didn't patch the right code path?


KiBi.

#843944#29
Date:
2016-11-12 00:26:45 UTC
From:
To:
Yes.

If you look in _process_package_event, you will see that it stores HTML
in the database! So your change would only affect new events indeed.
It looks like what you patched is only used for the plain text news
renderer but not for the email news renderer however.

That looks like the case indeed. These appears to be the right ones:

distro_tracker/core/templates/core/news-email.html: email-news-body
distro_tracker/core/models.py: EmailNewsRenderer