From dccfd69c8f742c8aaab009085b86f4467c1cf138 Mon Sep 17 00:00:00 2001
From: David Mendez <dmendez@ebi.ac.uk>
Date: Mon, 4 Oct 2021 10:45:56 +0100
Subject: [PATCH] Fix some bugs with the text highlighter

---
 .../free_text/FreeTextResults.vue             | 46 ++++++++++++++++---
 1 file changed, 39 insertions(+), 7 deletions(-)

diff --git a/components/search_results/free_text/FreeTextResults.vue b/components/search_results/free_text/FreeTextResults.vue
index 22947bc..e790978 100644
--- a/components/search_results/free_text/FreeTextResults.vue
+++ b/components/search_results/free_text/FreeTextResults.vue
@@ -1,22 +1,48 @@
 <template>
-  <v-tabs show-arrows :vertical="makeTabsVertical">
-    <v-tab> Compounds </v-tab>
-    <v-tab> Targets </v-tab>
-    <v-tab-item> <CompoundsResults /> </v-tab-item>
-    <v-tab-item> <TargetsResults /> </v-tab-item>
-    <v-tab-item> <HeatmapResults /> </v-tab-item>
-  </v-tabs>
+  <div>
+    <v-container>
+      <div class="d-flex flex-column align-center">
+        <div class="text-overline">Searching...</div>
+        <br />
+
+        <v-progress-linear indeterminate />
+      </div>
+      <TextHighlighter
+        full-text="The quick brown fox jumps over the lazy dog"
+        highlighted-text="bro"
+      />
+      <TextHighlighter
+        full-text="The quick brown fox jumps over the lazy dog"
+        highlighted-text="Bra"
+      />
+      <TextHighlighter
+        full-text="The aminohydrolase"
+        highlighted-text="amino"
+      />
+      <TextHighlighter full-text="The aminohydrolase" highlighted-text="box" />
+    </v-container>
+    <v-tabs show-arrows :vertical="makeTabsVertical">
+      <v-tab> Compounds </v-tab>
+      <v-tab> Targets </v-tab>
+      <v-tab-item> <CompoundsResults /> </v-tab-item>
+      <v-tab-item> <TargetsResults /> </v-tab-item>
+      <v-tab-item> <HeatmapResults /> </v-tab-item>
+    </v-tabs>
+  </div>
 </template>
 
 <script>
 import CompoundsResults from '~/components/search_results/free_text/CompoundsResults.vue'
 import TargetsResults from '~/components/search_results/free_text/TargetsResults.vue'
 import HeatmapResults from '~/components/search_results/free_text/HeatmapResults.vue'
+import TextHighlighter from '~/web-components-submodule/components/common/Highlighting/TextHighlighter.vue'
+
 export default {
   components: {
     CompoundsResults,
     TargetsResults,
     HeatmapResults,
+    TextHighlighter,
   },
   props: {
     searchTerm: {
@@ -36,6 +62,12 @@ export default {
       }
     },
   },
+  mounted() {
+    this.getSearchParams()
+  },
+  methods: {
+    getSearchParams() {},
+  },
 }
 </script>
 
-- 
GitLab