From 45479cbd08d4f6f14ae2c3d273f5912b65af3e58 Mon Sep 17 00:00:00 2001 From: OganM Date: Tue, 14 May 2024 19:12:37 -0700 Subject: [PATCH 1/7] limit description length --- src/components/DatasetPreview.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/DatasetPreview.vue b/src/components/DatasetPreview.vue index 77cebee..ebff19e 100644 --- a/src/components/DatasetPreview.vue +++ b/src/components/DatasetPreview.vue @@ -56,7 +56,13 @@ export default { if (this.dataset.searchResult !== undefined && this.dataset.searchResult.highlights !== null && "description" in this.dataset.searchResult.highlights) { return marked.parseInline(highlight(this.dataset.description, this.dataset.searchResult.highlights.description)); } - return marked.parseInline(this.dataset.description); + let ds = this.dataset.description + let words = ds.split(" ") + if(words.length>150){ + words.splice(0,150) + ds = words.join(" ") + "..." + } + return marked.parseInline(ds); }, chipColorMap() { return { From 55b553dc6866d4a0b418e56eb337228cbc6c17e0 Mon Sep 17 00:00:00 2001 From: OganM Date: Tue, 14 May 2024 19:17:02 -0700 Subject: [PATCH 2/7] slice isn't splice --- src/components/DatasetPreview.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/DatasetPreview.vue b/src/components/DatasetPreview.vue index ebff19e..e5e6151 100644 --- a/src/components/DatasetPreview.vue +++ b/src/components/DatasetPreview.vue @@ -59,7 +59,7 @@ export default { let ds = this.dataset.description let words = ds.split(" ") if(words.length>150){ - words.splice(0,150) + words.slice(0,150) ds = words.join(" ") + "..." } return marked.parseInline(ds); From 50c156ff809aec45050b94ab978c5f18705f914f Mon Sep 17 00:00:00 2001 From: OganM Date: Tue, 14 May 2024 19:21:03 -0700 Subject: [PATCH 3/7] slice doesn't edit in place --- src/components/DatasetPreview.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/DatasetPreview.vue b/src/components/DatasetPreview.vue index e5e6151..7d0f2f7 100644 --- a/src/components/DatasetPreview.vue +++ b/src/components/DatasetPreview.vue @@ -59,7 +59,7 @@ export default { let ds = this.dataset.description let words = ds.split(" ") if(words.length>150){ - words.slice(0,150) + words = words.slice(0,150) ds = words.join(" ") + "..." } return marked.parseInline(ds); From 8391dc5b12195da211c6e8446fd4fb7573f351e8 Mon Sep 17 00:00:00 2001 From: OganM Date: Wed, 15 May 2024 16:09:09 -0700 Subject: [PATCH 4/7] add dataset shortname as a link to the header --- src/components/DatasetPreview.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/DatasetPreview.vue b/src/components/DatasetPreview.vue index 7d0f2f7..5f8a5c8 100644 --- a/src/components/DatasetPreview.vue +++ b/src/components/DatasetPreview.vue @@ -1,6 +1,6 @@