Skip to content

Commit a095e7e

Browse files
authored
Show category in node search box instead of description (#360)
1 parent fe0d63e commit a095e7e

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

src/components/node/NodePreview.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ const truncateDefaultValue = (value: any, charLimit: number = 32): string => {
178178
font-style: italic;
179179
font-weight: 500;
180180
font-size: 0.9rem;
181+
word-break: break-word;
181182
}
182183
183184
._sb_table {

src/components/searchbox/NodeSearchBox.vue

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
:python_module="option.python_module"
3535
/>
3636
</div>
37-
<div v-if="option.description" class="option-description">
38-
{{ option.description }}
37+
<div class="option-category">
38+
{{ option.category.replaceAll('/', ' > ') }}
3939
</div>
4040
</div>
4141
</template>
@@ -144,17 +144,11 @@ const setHoverSuggestion = (index: number) => {
144144
@apply flex flex-col px-4 py-2 cursor-pointer overflow-hidden w-full;
145145
}
146146
147-
.option-container:hover .option-description {
148-
@apply overflow-visible;
149-
/* Allows text to wrap */
150-
white-space: normal;
151-
}
152-
153147
.option-display-name {
154148
@apply font-semibold;
155149
}
156150
157-
.option-description {
151+
.option-category {
158152
@apply text-sm text-gray-400 overflow-hidden text-ellipsis;
159153
/* Keeps the text on a single line by default */
160154
white-space: nowrap;

0 commit comments

Comments
 (0)