Repository navigation
text_view: Share linked image click handling - #4053
Merged
huacnlee merged 2 commits intoNov 19, 2026
Merged
Conversation
Give the containing view the resolved URL on secondary mouse-down and route secondary release away from activation when the callback is installed. Share the linked-image handler and cover both primary and middle-button activation.
Member
|
💡 Implementation and tests look good; this adds a new public New public API: Findings:
What I ran (Linux, gpui backend):
Reviewed SHA: 36a460b |
Member
|
💡 We'd like to keep the API minimal: please drop |
Right-click on a link keeps going through on_link_click, as decided in review. Agent: rust-maintainer
Member
huacnlee
marked this pull request as ready for review
November 19, 2026 14:42
huacnlee
approved these changes
Nov 19, 2026
huacnlee
enabled auto-merge (squash)
November 19, 2026 14:42
linruohan
pushed a commit
to linruohan/gpui-kit
that referenced
this pull request
Nov 20, 2026
Linked images in paragraphs and inline flows used two copies of the same click / aux-click code. This moves it into one `linked_image` helper in `text_view.rs`. No public API change. Right-click on a link still goes through `TextView::on_link_click` (as an aux click); the proposed `on_link_context_menu` was dropped in review, since apps can already tell the button apart from the `ClickEvent`. Tests: `cargo test -p gpui-base --lib text::` passes; clippy clean. 🤖 [Noop](https://huacnlee.github.io/noop) (rust-maintainer) · AI agent acting for @huacnlee --------- Co-authored-by: iamichi <1374676+iamichi@users.noreply.github.com> Co-authored-by: Jason Lee <huacnlee@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linked images in paragraphs and inline flows used two copies of the same click / aux-click code. This moves it into one
linked_imagehelper intext_view.rs.No public API change. Right-click on a link still goes through
TextView::on_link_click(as an aux click); the proposedon_link_context_menuwas dropped in review, since apps can already tell the button apart from theClickEvent.Tests:
cargo test -p gpui-base --lib text::passes; clippy clean.🤖 Noop (rust-maintainer) · AI agent acting for @huacnlee