Show category in node search box instead of description (#360)

This commit is contained in:
Chenlei Hu
2024-08-10 14:52:37 -04:00
committed by GitHub
parent fe0d63e16c
commit a095e7ecae
2 changed files with 4 additions and 9 deletions

View File

@@ -178,6 +178,7 @@ const truncateDefaultValue = (value: any, charLimit: number = 32): string => {
font-style: italic;
font-weight: 500;
font-size: 0.9rem;
word-break: break-word;
}
._sb_table {

View File

@@ -34,8 +34,8 @@
:python_module="option.python_module"
/>
</div>
<div v-if="option.description" class="option-description">
{{ option.description }}
<div class="option-category">
{{ option.category.replaceAll('/', ' > ') }}
</div>
</div>
</template>
@@ -144,17 +144,11 @@ const setHoverSuggestion = (index: number) => {
@apply flex flex-col px-4 py-2 cursor-pointer overflow-hidden w-full;
}
.option-container:hover .option-description {
@apply overflow-visible;
/* Allows text to wrap */
white-space: normal;
}
.option-display-name {
@apply font-semibold;
}
.option-description {
.option-category {
@apply text-sm text-gray-400 overflow-hidden text-ellipsis;
/* Keeps the text on a single line by default */
white-space: nowrap;