-
Notifications
You must be signed in to change notification settings - Fork 31
🔨 Add tooltip to tree items (for calls) #73
Conversation
Signed-off-by: Babak K. Shandiz <[email protected]>
|
@jrieken Could you please review this PR? |
src/calls/model.ts
Outdated
|
|
||
| const item = new vscode.TreeItem(element.item.name); | ||
| item.description = element.item.detail; | ||
| item.tooltip = element.item.detail; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexr00 Any guidance? Looks like the custom tree defaults to the tree item's label as tooltip. Should this be the detail instead or maybe a combination of label and detail?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that browser default for a tooltip/title is to essentially make tooltip/title the same as the text that is being hovered over, I would keep the default tooltip as the label. It's not perfect, but this is why there's a tooltip property: extensions know best what their tooltip should be.
I could be convinced to do a combination of label and detail, but we've had it as just the label for a long time so I'd be hesitant to change it out from under everyone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. For this PR I believe a combination makes sense. @babkks can you make changes to use label - detail when both are available and detail otherwise?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jrieken Of course. I'm on it.
jrieken
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make changes to use "label - detail" when both are available and detail otherwise?
jrieken
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comments
Signed-off-by: Babak K. Shandiz <[email protected]>
|
@jrieken I've pushed a new commit. However, since we're assigning |
jrieken
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Closes microsoft/vscode#146085
Now the tooltip for call items is like this: