vscode icon indicating copy to clipboard operation
vscode copied to clipboard

SCM history: Show details on hover (fix #200378)

Open gjsjohnmurray opened this issue 5 months ago • 10 comments

This PR fixes #200378

gjsjohnmurray avatar Jan 11 '24 17:01 gjsjohnmurray

/assign @lszomoru

gjsjohnmurray avatar Jan 11 '24 17:01 gjsjohnmurray

image

gjsjohnmurray avatar Jan 12 '24 12:01 gjsjohnmurray

@gjsjohnmurray, thank you very much for the pull request. I was thinking that for each incoming/outgoing entry we would want to show a rich hover similar to the timeline entry. If you do not have bandwidth to update the PR, I am happy to take it from here.

lszomoru avatar Jan 15 '24 15:01 lszomoru

I have pushed a change to make this display a Markdown-capable tooltip. I think the proposed API will probably need a tooltip? : MarkdownString property adding to SourceControlHistoryItem and wiring through to ISCMHistoryItem so the Git extension can pass a Git-appropriate tooltip.

gjsjohnmurray avatar Jan 15 '24 23:01 gjsjohnmurray

I have added vscode.SourceControlHistoryItem.tooltip to the proposed API and used it from the Git extension.

gjsjohnmurray avatar Jan 17 '24 18:01 gjsjohnmurray

image

gjsjohnmurray avatar Jan 17 '24 18:01 gjsjohnmurray

Please can this be reviewed (and merged 🤞) soon. I really like the new incoming/outgoing feature but it's tedious to have to widen my side bar to see the full commit messages and the authors.

gjsjohnmurray avatar Feb 02 '24 10:02 gjsjohnmurray

@lszomoru any chance this can be merged in time for February?

gjsjohnmurray avatar Feb 13 '24 07:02 gjsjohnmurray

Sorry for not getting back to you on this until now. The "Timeline" proposed API is "UI driven" so it makes sense for it to have a property with which the extension describes how the hover should look. "The History Provider" API is model driven so I do not think that we should be making any changes to the existing API. We should just use the existing information (author, message, etc) to render a rich hover.

lszomoru avatar Feb 16 '24 17:02 lszomoru

@lszomoru I think a history item "rich" hover will be impoverished if all it does is display untruncated the label and description properties of the item (which is what my original commit did, using a native tooltip). Please help me understand why you oppose allowing the extension that provides the item to also provide a markdown tooltip conveying whatever additional information the extension deems relevant.

gjsjohnmurray avatar Feb 18 '24 22:02 gjsjohnmurray

@lszomoru can I do anything to progress this?

gjsjohnmurray avatar Mar 18 '24 11:03 gjsjohnmurray

@lszomoru I guess this has been made obsolete by your #209373

gjsjohnmurray avatar Apr 05 '24 04:04 gjsjohnmurray

Closing in favour of https://github.com/microsoft/vscode/pull/209373.

lszomoru avatar Apr 05 '24 07:04 lszomoru