-
Notifications
You must be signed in to change notification settings - Fork 30.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce tree item highlights #61482
Conversation
@jrieken Please review the API changes |
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.
Looking good but please move to vscode.proposed.d.ts
so that we can still make changes here. Also, we don't have a way yet to define the highlight style. I think the default is a color and font weight change but I am looking for a background color change...
src/vs/vscode.d.ts
Outdated
/** | ||
* Ranges in the label to highlight. | ||
*/ | ||
highlights?: { start: number, end: number }[]; |
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.
We have been using tuples instead of objects so far, e.g valueSelection
and ParameterInfo#label
use [number,number]
src/vs/vscode.d.ts
Outdated
/** | ||
* Label describing the [Tree item](#TreeItem) | ||
*/ | ||
export interface TreeItemLabel { |
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.
Having this as a separate type means, this will only work when the label is a string, right. Or putting it the other way, highlights will not work when the label is an Uri
, right?
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.
Yes. You can only provide highlights to the labels you contribute. Otherwise it is not correct to allow providing highlights to computed labels.
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.
Yes, you can only have highlights for labels you contribute, otherwise it is not correct to allow them for computed labels.
@jrieken Updated |
src/vs/vscode.proposed.d.ts
Outdated
/** | ||
* Ranges in the label to highlight. | ||
*/ | ||
highlights?: [number][number][]; |
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.
highlights?: [number][number][]; | |
highlights?: [number,number][]; |
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 think like that. Not even sure what [number][number][]
means?
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 also do not know 😄 . It was a typo. Fixed.
@jrieken Fixed |
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.
👍
Introduce tree item highlights in Tree item api
Fixes #61313