Hide details if there are none (#181384)

* try this again

* use display to follow separator and make smoke tests only grab label not description or detail
This commit is contained in:
Tyler James Leonhardt 2023-05-03 00:34:14 -07:00 committed by GitHub
parent 6384b9bcdf
commit 9af6054416
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View file

@ -195,14 +195,14 @@ class ListElementRenderer implements IListRenderer<ListElement, IListElementTemp
// Meta
if (element.saneDetail) {
data.detail.element.style.display = '';
data.detail.setLabel(element.saneDetail, undefined, {
matches: detailHighlights,
title: element.saneDetail
});
} /* else {
// TODO investigate potential detail bleeding into next quickpicks
data.detail.setLabel('');
} */
} else {
data.detail.element.style.display = 'none';
}
// Separator
if (element.item && element.separator && element.separator.label) {

View file

@ -11,7 +11,8 @@ export class QuickInput {
private static QUICK_INPUT_INPUT = `${QuickInput.QUICK_INPUT} .quick-input-box input`;
private static QUICK_INPUT_ROW = `${QuickInput.QUICK_INPUT} .quick-input-list .monaco-list-row`;
private static QUICK_INPUT_FOCUSED_ELEMENT = `${QuickInput.QUICK_INPUT_ROW}.focused .monaco-highlighted-label`;
private static QUICK_INPUT_ENTRY_LABEL = `${QuickInput.QUICK_INPUT_ROW} .label-name`;
// Note: this only grabs the label and not the description or detail
private static QUICK_INPUT_ENTRY_LABEL = `${QuickInput.QUICK_INPUT_ROW} .quick-input-list-row > .monaco-icon-label .label-name`;
private static QUICK_INPUT_ENTRY_LABEL_SPAN = `${QuickInput.QUICK_INPUT_ROW} .monaco-highlighted-label`;
constructor(private code: Code) { }