Skip to content

Commit 9ae7928

Browse files
Merge pull request galaxyproject#22330 from ahmedhamidawan/use_help_popover_in_trs_search
Use a help popover for TRS search field
2 parents 2ec4a40 + 4df298b commit 9ae7928

2 files changed

Lines changed: 24 additions & 13 deletions

File tree

client/src/components/Workflow/Import/TrsSearch.vue

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
import { faQuestion, faTimes } from "@fortawesome/free-solid-svg-icons";
2+
import { faTimes } from "@fortawesome/free-solid-svg-icons";
33
import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
44
import axios from "axios";
55
import { BAlert, BFormInput, BInputGroup, BInputGroupAppend, BTable } from "bootstrap-vue";
@@ -14,6 +14,7 @@ import { withPrefix } from "@/utils/redirect";
1414
import type { TrsSelection } from "./types";
1515
1616
import GButton from "@/components/BaseComponents/GButton.vue";
17+
import HelpText from "@/components/Help/HelpText.vue";
1718
import LoadingSpan from "@/components/LoadingSpan.vue";
1819
import TrsServerSelection from "@/components/Workflow/Import/TrsServerSelection.vue";
1920
import TrsTool from "@/components/Workflow/Import/TrsTool.vue";
@@ -64,10 +65,6 @@ const itemsComputed = computed(() => {
6465
return computeItems(results.value);
6566
});
6667
67-
const searchHelp = computed(() => {
68-
return "Search by workflow description. Tags (key:value) can be used to also search by metadata - for instance name:example. Available tags include organization and name.";
69-
});
70-
7168
const services = new Services();
7269
7370
watch(query, async () => {
@@ -173,7 +170,7 @@ defineExpose({ triggerImport });
173170
</script>
174171

175172
<template>
176-
<div class="container workflow-import-trs-search" title="GA4GH Tool Registry Server (TRS) Workflow Search">
173+
<div class="container workflow-import-trs-search">
177174
<BAlert :show="hasErrorMessage" variant="danger">
178175
{{ errorMessage }}
179176
</BAlert>
@@ -187,8 +184,8 @@ defineExpose({ triggerImport });
187184
@onError="onTrsSelectionError" />
188185
</div>
189186

190-
<div>
191-
<BInputGroup class="mb-3">
187+
<div class="trs-search-field">
188+
<BInputGroup>
192189
<BFormInput
193190
id="trs-search-query"
194191
v-model="query"
@@ -198,15 +195,12 @@ defineExpose({ triggerImport });
198195
@keyup.esc="query = ''" />
199196

200197
<BInputGroupAppend>
201-
<GButton tooltip size="small" data-description="show help toggle" :title="searchHelp">
202-
<FontAwesomeIcon :icon="faQuestion" />
203-
</GButton>
204-
205198
<GButton size="small" title="clear search" @click="query = ''">
206199
<FontAwesomeIcon :icon="faTimes" />
207200
</GButton>
208201
</BInputGroupAppend>
209202
</BInputGroup>
203+
<HelpText uri="galaxy.workflows.import.searchHelp" info-icon />
210204
</div>
211205

212206
<div class="vertical-scroll">
@@ -247,7 +241,7 @@ defineExpose({ triggerImport });
247241
</div>
248242
</template>
249243

250-
<style>
244+
<style scoped lang="scss">
251245
.trs-description {
252246
position: relative;
253247
overflow: hidden;
@@ -256,6 +250,18 @@ defineExpose({ triggerImport });
256250
-webkit-line-clamp: 3;
257251
line-clamp: 3;
258252
}
253+
254+
.trs-search-field {
255+
display: flex;
256+
gap: var(--spacing);
257+
align-items: center;
258+
margin-bottom: var(--spacing-4);
259+
260+
:deep(.popper-element) {
261+
max-width: 30vw;
262+
}
263+
}
264+
259265
.vertical-scroll {
260266
max-height: 600px;
261267
overflow-y: auto;

lib/galaxy/schema/terms.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,11 @@ galaxy:
280280
exportOnComplete:
281281
Enabling this option will automatically export the workflow results to a remote file source when the
282282
invocation completes. You can configure the destination and format in the export wizard.
283+
import:
284+
searchHelp: |
285+
Search by workflow description. Tags (key:value) can be used to also search by metadata.
286+
287+
For instance `name:example`. Available tags include `organization` and `name`.
283288
284289
tools:
285290
ontologies:

0 commit comments

Comments
 (0)