Skip to content
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

TreeItem should support highlights #61313

Closed
jrieken opened this issue Oct 19, 2018 · 3 comments · Fixed by #61482
Closed

TreeItem should support highlights #61313

jrieken opened this issue Oct 19, 2018 · 3 comments · Fixed by #61482
Assignees
Labels
api api-proposal feature-request Request for new features or functionality tree-views Extension tree view issues
Milestone

Comments

@jrieken
Copy link
Member

jrieken commented Oct 19, 2018

It would be nice if the tree view supports some kind of highlights in its label. This would be helpful when showing search-result-like things. Maybe something like this

export class TreeItem {

  label?: string;

  // start, end tuples
  labelHighlights?:[number,number][]
}

or something more elaborated that allows to reference a theme color or allows to express the highlighting style (background color or bold text etc)

@sandy081 sandy081 added feature-request Request for new features or functionality api tree-views Extension tree view issues labels Oct 19, 2018
@sandy081 sandy081 added this to the October 2018 milestone Oct 19, 2018
@sandy081
Copy link
Member

sandy081 commented Oct 19, 2018

@jrieken How about

export class TreeItem {

  label?: string | {label: string, highlights?:[number,number][]};

}

This will avoid providing highlights without giving label.

@jrieken
Copy link
Member Author

jrieken commented Oct 19, 2018

yeah, much better. it will give us a place to refer to the style

sandy081 added a commit that referenced this issue Oct 22, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 7, 2018
@alexr00 alexr00 modified the milestones: October 2018, Backlog Nov 29, 2019
@alexr00 alexr00 reopened this Nov 29, 2019
@alexr00 alexr00 assigned alexr00 and unassigned sandy081 Nov 29, 2019
@alexr00
Copy link
Member

alexr00 commented Jan 6, 2021

This is already done now!

@alexr00 alexr00 closed this as completed Jan 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api api-proposal feature-request Request for new features or functionality tree-views Extension tree view issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants