enhance: add permalinks to pull request reviews (#38849)

1. Make review threads linkable via `#pullrequestreview-<reviewID>`
2. Improve CSS so username and timestamp go colored on hover.
3. CSS cleanup, remove dead rules, nonexistant class name, make `.suppressed` actually do what it says in the doc above.
This commit is contained in:
silverwind
2026-08-22 04:13:43 +02:00
committed by GitHub
parent 1f349eb1eb
commit 2d6fea5bdf
10 changed files with 45 additions and 26 deletions
+3 -2
View File
@@ -197,8 +197,9 @@ export async function handleReply(el: HTMLElement) {
}
export function initRepoPullRequestReview() {
if (window.location.hash && window.location.hash.startsWith('#issuecomment-')) {
const commentDiv = document.querySelector(window.location.hash);
const currentHash = window.location.hash;
if (currentHash.startsWith('#issuecomment-') || currentHash.startsWith('#pullrequestreview-')) {
const commentDiv = document.querySelector(currentHash);
if (commentDiv) {
// get the name of the parent id
const groupID = commentDiv.closest('div[id^="code-comments-"]')?.getAttribute('id');