From 5a428769d2ac82fc71508156989350017699f84d Mon Sep 17 00:00:00 2001
From: Xiao Gui <xgui3783@gmail.com>
Date: Fri, 4 Feb 2022 13:21:54 +0100
Subject: [PATCH] feat: how-to-cite quick tour

---
 common/constants.js                                    | 10 ++++++++++
 docs/releases/v2.6.5.md                                |  3 ++-
 src/environments/environment.common.ts                 |  2 +-
 src/ui/quickTour/constrants.ts                         |  1 +
 .../breadcrumb/breadcrumb.component.ts                 |  8 +++++++-
 .../breadcrumb/breadcrumb.template.html                |  4 ++++
 6 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/common/constants.js b/common/constants.js
index 1527bc74e..1f9b21dae 100644
--- a/common/constants.js
+++ b/common/constants.js
@@ -128,5 +128,15 @@
     TOP_MENU: `These icons provide access to plugins, pinned datasets, and user documentation. Use the profile icon to login with your EBRAINS account.`,
     LAYER_SELECTOR: `This is the atlas layer browser. If an atlas supports multiple template spaces or parcellation maps, you will find them here.`,
     STATUS_CARD: `This is the coordinate navigator. Expand it to manipulate voxel and physical coordinates, to reset the view, or to create persistent links to the current view for sharing.`,
+    CITATION: `You will find a "chip" shaped label at the bottom-left of the screen (next to the layer selector) which indicates your currently selected parcellation map, e.g. Julich-Brain Cytoarchitectonic Maps 2.9. Click on (i), which will subsequently open up a description box with an "Explore" button (box-and-arrow icon) at the bottom. Click on this button, which will lead you to the EBRAINS Knowledge Graph webpage for the complete parcellation map dataset. Here you can click on the "How to cite" option on the left to access the appropriate citation for your selected parcellation/template. In addition, don't forget to also cite the siibra-explorer website: https://atlases.ebrains.eu/viewer/`,
+  }
+
+  exports.QUICKTOUR_DESC_MD = {
+    CITATION: `
+## How to cite from siibra-explorer
+
+You will find a "chip" shaped label at the bottom-left of the screen (next to the layer selector) which indicates your currently selected parcellation map, e.g. _Julich-Brain Cytoarchitectonic Maps 2.9_. Click on (i), which will subsequently open up a description box with an "Explore" button (box-and-arrow icon) at the bottom. Click on this button, which will lead you to the EBRAINS Knowledge Graph webpage for the complete parcellation map dataset. Here you can click on the "How to cite" option on the left to access the appropriate citation for your selected parcellation/template. In addition, don't forget to also cite the _siibra-explorer_ website: <https://atlases.ebrains.eu/viewer/>
+
+`
   }
 })(typeof exports === 'undefined' ? module.exports : exports)
diff --git a/docs/releases/v2.6.5.md b/docs/releases/v2.6.5.md
index 9cf83b085..94c6efce5 100644
--- a/docs/releases/v2.6.5.md
+++ b/docs/releases/v2.6.5.md
@@ -1,5 +1,6 @@
-# v2.6.4
+# v2.6.5
 
 ## Feature
 
 - Re-enabled autoradiographs for receptor datasets
+- Added how-to-cite as a part of quick tour (#1085)
diff --git a/src/environments/environment.common.ts b/src/environments/environment.common.ts
index 85a5e68ae..83bad8bcb 100644
--- a/src/environments/environment.common.ts
+++ b/src/environments/environment.common.ts
@@ -5,7 +5,7 @@ export const environment = {
   PRODUCTION: true,
   BACKEND_URL: null,
   DATASET_PREVIEW_URL: 'https://hbp-kg-dataset-previewer.apps.hbp.eu/v2',
-  BS_REST_URL: 'https://siibra-api-latest.apps-dev.hbp.eu/v1_0',
+  BS_REST_URL: 'https://siibra-api-rc.apps.hbp.eu/v1_0',
   SPATIAL_TRANSFORM_BACKEND: 'https://hbp-spatial-backend.apps.hbp.eu',
   MATOMO_URL: null,
   MATOMO_ID: null,
diff --git a/src/ui/quickTour/constrants.ts b/src/ui/quickTour/constrants.ts
index 38bb2d62b..375ecc3f9 100644
--- a/src/ui/quickTour/constrants.ts
+++ b/src/ui/quickTour/constrants.ts
@@ -10,6 +10,7 @@ type TCustomPosition = {
 export interface IQuickTourData {
     order: number
     description: string
+    descriptionMd?: string
     tourPosition?: TPosition
     overwritePosition?: IQuickTourOverwritePosition
     overwriteArrow?: TemplateRef<any> | string
diff --git a/src/viewerModule/viewerStateBreadCrumb/breadcrumb/breadcrumb.component.ts b/src/viewerModule/viewerStateBreadCrumb/breadcrumb/breadcrumb.component.ts
index 5a4bea443..0a945a0c1 100644
--- a/src/viewerModule/viewerStateBreadCrumb/breadcrumb/breadcrumb.component.ts
+++ b/src/viewerModule/viewerStateBreadCrumb/breadcrumb/breadcrumb.component.ts
@@ -1,6 +1,6 @@
 import { Component, EventEmitter, Output, Pipe, PipeTransform } from "@angular/core";
 import { IQuickTourData } from "src/ui/quickTour";
-import { CONST, ARIA_LABELS, QUICKTOUR_DESC } from 'common/constants'
+import { CONST, ARIA_LABELS, QUICKTOUR_DESC, QUICKTOUR_DESC_MD } from 'common/constants'
 import { select, Store } from "@ngrx/store";
 import { viewerStateContextedSelectedRegionsSelector, viewerStateGetOverlayingAdditionalParcellations, viewerStateParcVersionSelector, viewerStateSelectedParcellationSelector } from "src/services/state/viewerState/selectors";
 import { distinctUntilChanged, map } from "rxjs/operators";
@@ -36,6 +36,12 @@ export class ViewerStateBreadCrumb {
     description: QUICKTOUR_DESC.CHIPS,
   }
 
+  public quickTourCitation: IQuickTourData = {
+    order: 5.1,
+    description: QUICKTOUR_DESC.CITATION,
+    descriptionMd: QUICKTOUR_DESC_MD.CITATION,
+  }
+
   public clearViewKeys$ = this.store$.pipe(
     select(ngViewerSelectorClearViewEntries)
   )
diff --git a/src/viewerModule/viewerStateBreadCrumb/breadcrumb/breadcrumb.template.html b/src/viewerModule/viewerStateBreadCrumb/breadcrumb/breadcrumb.template.html
index a80037b10..d57782bdd 100644
--- a/src/viewerModule/viewerStateBreadCrumb/breadcrumb/breadcrumb.template.html
+++ b/src/viewerModule/viewerStateBreadCrumb/breadcrumb/breadcrumb.template.html
@@ -187,6 +187,10 @@
         fontSet="fas"
         fontIcon="fa-info-circle"
         iav-stop="click"
+        quick-tour
+        [quick-tour-description]="quickTourCitation.description"
+        [quick-tour-description-md]="quickTourCitation.descriptionMd"
+        [quick-tour-order]="quickTourCitation.order"
         iav-dataset-show-dataset-dialog
         [iav-dataset-show-dataset-dialog-name]="originDatainfo.name"
         [iav-dataset-show-dataset-dialog-description]="originDatainfo.description"
-- 
GitLab