- Package:
- tracker.debian.org
- Source:
- tracker.debian.org
- Submitter:
- Cyril Brulebois
- Date:
- 2017-12-04 23:03:03 UTC
- Severity:
- wishlist
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.
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.
Merged, changed from <a name=... to <span id=... and deploying.
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.
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