From 7dacf4b3aa47d049f6913173b7bac6d049b254d1 Mon Sep 17 00:00:00 2001 From: silverwind Date: Mon, 16 Mar 2026 07:37:59 +0100 Subject: [PATCH 01/11] Show issue/PR context popup on any issue/PR link site-wide Previously, the context popup only worked on links with the .ref-issue class inside .markup containers. This meant dashboard feed links and other issue/PR references outside rendered markdown never showed popups. Replace the markup-scoped approach with a global delegated mouseover listener that uses parseIssueHref to detect issue/PR links anywhere on the page. Add response caching so hovering the same issue from different links doesn't re-fetch. Make ContextPopup a pure display component with clickable repo and issue title links. Other changes: - Fix feed title stretching full width (add tw-self-start) - Clean up Vue app on tippy destroy to prevent memory leaks - Clear cache and retry marker on fetch errors Co-Authored-By: Claude (Opus 4.6) --- templates/user/dashboard/feeds.tmpl | 2 +- web_src/js/components/ContextPopup.vue | 51 ++++++-------------- web_src/js/features/ref-issue.ts | 65 ++++++++++++++++++++++++++ web_src/js/index-domready.ts | 2 + web_src/js/markup/content.ts | 2 - web_src/js/markup/refissue.ts | 42 ----------------- 6 files changed, 83 insertions(+), 81 deletions(-) create mode 100644 web_src/js/features/ref-issue.ts delete mode 100644 web_src/js/markup/refissue.ts diff --git a/templates/user/dashboard/feeds.tmpl b/templates/user/dashboard/feeds.tmpl index c17fa2aa0d699..a43f99dc9b1f8 100644 --- a/templates/user/dashboard/feeds.tmpl +++ b/templates/user/dashboard/feeds.tmpl @@ -107,7 +107,7 @@ {{else if .GetOpType.InActions "create_pull_request"}} {{index .GetIssueInfos 1 | ctx.RenderUtils.RenderIssueSimpleTitle}} {{else if .GetOpType.InActions "comment_issue" "approve_pull_request" "reject_pull_request" "comment_pull"}} - {{(.GetIssueTitle ctx) | ctx.RenderUtils.RenderIssueSimpleTitle}} + {{(.GetIssueTitle ctx) | ctx.RenderUtils.RenderIssueSimpleTitle}} {{$comment := index .GetIssueInfos 1}} {{if $comment}}
{{ctx.RenderUtils.MarkdownToHtml $comment}}
diff --git a/web_src/js/components/ContextPopup.vue b/web_src/js/components/ContextPopup.vue index 12911aad40425..eb154952268d6 100644 --- a/web_src/js/components/ContextPopup.vue +++ b/web_src/js/components/ContextPopup.vue @@ -1,63 +1,42 @@