Skip to content

Improve issue context popup#36908

Draft
silverwind wants to merge 3 commits intogo-gitea:mainfrom
silverwind:refpop
Draft

Improve issue context popup#36908
silverwind wants to merge 3 commits intogo-gitea:mainfrom
silverwind:refpop

Conversation

@silverwind
Copy link
Member

@silverwind silverwind commented Mar 16, 2026

Show context popup everywhere, not just in markup. This makes them work in the repo file table, latest commit and on frontpage.

  • Remove loading state on the tooltip, it was ugly and shifted the element size
  • Make both links in tooltip work, prevent nested tooltips
  • Fetch outside the component, making it stateless
  • Add a cache so the same issue/pr info is not fetched twice
  • Add small delay to prevent tooltips when mouse passes over
  • Fix feed title <a> width so tooltip only shows on link hover
Screenshot 2026-03-16 at 07 35 31 Screenshot 2026-03-16 at 07 35 47

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 <a> 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) <noreply@anthropic.com>
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 16, 2026
@github-actions github-actions bot added modifies/templates This PR modifies the template files modifies/frontend labels Mar 16, 2026
@silverwind silverwind changed the title Show issue/PR context popup on any issue/PR link site-wide Improve issue context popup Mar 16, 2026
silverwind and others added 2 commits March 16, 2026 07:52
Delay popup fetch by 300ms so casual mouse passes don't trigger
network requests. Extract the popup creation logic into a separate
showRefIssuePopup function for clarity.

Co-Authored-By: Claude (Opus 4.6) <noreply@anthropic.com>
Copy link
Contributor

@bircni bircni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just an Idea but what about also showing the actions state? so X or whatever to see PRs state

@wxiaoguang
Copy link
Contributor

Is it really right to show the popup everywhere?

Is it your decision or your AI's decision?

image image image

@wxiaoguang wxiaoguang marked this pull request as draft March 16, 2026 07:52
@silverwind
Copy link
Member Author

Right, on issue list it probably make no sense, project is debatable. Will investigate how GitHub does this.

@wxiaoguang
Copy link
Contributor

Please make sure the framework is designed by the correct approach:

let callers tell framework what they want, but not let framework guess what it should do for different callers.

You need to explicitly declare "the links need to show issue ref popup", but not make the popup logic try to guess and exclude.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/frontend modifies/templates This PR modifies the template files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants