From 71e3ccde83c9d922aa31b09e94ed26631c2e24d9 Mon Sep 17 00:00:00 2001
From: Xiao Gui <xgui3783@gmail.com>
Date: Mon, 9 Aug 2021 10:01:44 +0200
Subject: [PATCH] chore: added deprecation / unavailability of func

---
 common/constants.js                                  |  1 +
 docs/releases/v2.4.3.md                              |  3 ++-
 src/ui/topMenu/topMenuCmp/topMenu.components.ts      | 12 +++++++++++-
 src/ui/topMenu/topMenuCmp/topMenu.template.html      |  7 +++++--
 .../nehuba/statusCard/statusCard.component.ts        |  2 ++
 .../nehuba/statusCard/statusCard.template.html       |  6 ++++--
 6 files changed, 25 insertions(+), 6 deletions(-)

diff --git a/common/constants.js b/common/constants.js
index 2ba7fc2bb..64e7626ba 100644
--- a/common/constants.js
+++ b/common/constants.js
@@ -22,6 +22,7 @@
     PIN_DATASET: 'Toggle pinning dataset',
     TEXT_INPUT_SEARCH_REGION: 'Search for any region of interest in the atlas selected',
     CLEAR_SELECTED_REGION: 'Clear selected region',
+    VIEW_PINNED: `View pinned datasets.`,
     BULK_DOWNLOAD: `Download all pinned data`,
     NO_BULK_DOWNLOAD: `No datasets pinned`,
 
diff --git a/docs/releases/v2.4.3.md b/docs/releases/v2.4.3.md
index ede740c03..a91b54fd8 100644
--- a/docs/releases/v2.4.3.md
+++ b/docs/releases/v2.4.3.md
@@ -2,4 +2,5 @@
 
 ## Bugfixes
 
-- fix some of the big brain maps
\ No newline at end of file
+- fix some of the big brain maps
+- added UI indication for deprecation/unavailability of functionalities
diff --git a/src/ui/topMenu/topMenuCmp/topMenu.components.ts b/src/ui/topMenu/topMenuCmp/topMenu.components.ts
index 92f65b726..0ad929310 100644
--- a/src/ui/topMenu/topMenuCmp/topMenu.components.ts
+++ b/src/ui/topMenu/topMenuCmp/topMenu.components.ts
@@ -3,6 +3,7 @@ import {
   Component,
   Input,
   TemplateRef,
+  ViewChild,
 } from "@angular/core";
 import { select, Store } from "@ngrx/store";
 import { Observable } from "rxjs";
@@ -11,7 +12,7 @@ import { AuthService } from "src/auth";
 import { IavRootStoreInterface, IDataEntry } from "src/services/stateStore.service";
 import { MatDialog, MatDialogConfig, MatDialogRef } from "@angular/material/dialog";
 import { MatBottomSheet } from "@angular/material/bottom-sheet";
-import { CONST, QUICKTOUR_DESC } from 'common/constants'
+import { CONST, QUICKTOUR_DESC, ARIA_LABELS } from 'common/constants'
 import { IQuickTourData } from "src/ui/quickTour/constrants";
 
 @Component({
@@ -25,6 +26,7 @@ import { IQuickTourData } from "src/ui/quickTour/constrants";
 
 export class TopMenuCmp {
 
+  public ARIA_LABELS = ARIA_LABELS
   public PINNED_DATASETS_BADGE_DESC = CONST.PINNED_DATASETS_BADGE_DESC
 
   public matBtnStyle = 'mat-icon-button'
@@ -57,6 +59,14 @@ export class TopMenuCmp {
     order: 8,
   }
 
+  public pinnedDsNotAvail = 'We are reworking pinned dataset feature. Please check back later.'
+  @ViewChild('savedDatasets', { read: TemplateRef })
+  private savedDatasetTmpl: TemplateRef<any>
+
+  public openPinnedDatasets(){
+    // this.bottomSheet.open(this.savedDatasetTmpl)
+  }
+
   constructor(
     private store$: Store<IavRootStoreInterface>,
     private authService: AuthService,
diff --git a/src/ui/topMenu/topMenuCmp/topMenu.template.html b/src/ui/topMenu/topMenuCmp/topMenu.template.html
index cb253e7ec..4dc319f6a 100644
--- a/src/ui/topMenu/topMenuCmp/topMenu.template.html
+++ b/src/ui/topMenu/topMenuCmp/topMenu.template.html
@@ -107,16 +107,19 @@
 <!-- pinned dataset btn -->
 <ng-template #pinnedDatasetBtnTmpl>
   <div class="btnWrapper"
-    (click)="bottomSheet.open(savedDatasets)"
+    (click)="openPinnedDatasets()"
     [matBadge]="(favDataEntries$ | async)?.length > 0 ? (favDataEntries$ | async)?.length : null "
     matBadgeColor="accent"
     matBadgePosition="above after"
     [matBadgeDescription]="PINNED_DATASETS_BADGE_DESC"
-    matTooltip="Pinned datasets">
+    [matTooltip]="pinnedDsNotAvail"
+    aria-disabled="true"
+    role="button">
     <iav-dynamic-mat-button
       [attr.pinned-datasets-length]="(favDataEntries$ | async)?.length"
       [iav-dynamic-mat-button-style]="matBtnStyle"
       [iav-dynamic-mat-button-color]="matBtnColor"
+      [iav-dynamic-mat-button-disabled]="true"
       iav-dynamic-mat-button-aria-label="Show pinned datasets">
 
       <i class="fas fa-thumbtack"></i>
diff --git a/src/viewerModule/nehuba/statusCard/statusCard.component.ts b/src/viewerModule/nehuba/statusCard/statusCard.component.ts
index a6daa233d..76dfa6bbb 100644
--- a/src/viewerModule/nehuba/statusCard/statusCard.component.ts
+++ b/src/viewerModule/nehuba/statusCard/statusCard.component.ts
@@ -57,6 +57,8 @@ export class StatusCardComponent implements OnInit, OnChanges{
     order: 6,
   }
 
+  public saneUrlDeprecated = `Custom URL is going away. New custom URLs can no longer be created. Custom URLs you generated in the past will continue to work.`
+
   public SHARE_BTN_ARIA_LABEL = ARIA_LABELS.SHARE_BTN
   public COPY_URL_TO_CLIPBOARD_ARIA_LABEL = ARIA_LABELS.SHARE_COPY_URL_CLIPBOARD
   public SHARE_CUSTOM_URL_ARIA_LABEL = ARIA_LABELS.SHARE_CUSTOM_URL
diff --git a/src/viewerModule/nehuba/statusCard/statusCard.template.html b/src/viewerModule/nehuba/statusCard/statusCard.template.html
index 5e4d793a7..5f57d9719 100644
--- a/src/viewerModule/nehuba/statusCard/statusCard.template.html
+++ b/src/viewerModule/nehuba/statusCard/statusCard.template.html
@@ -154,9 +154,11 @@
         Copy link to this view
       </span>
     </mat-list-item>
-    <mat-list-item (click)="openDialog(shareSaneUrl, { ariaLabel: SHARE_CUSTOM_URL_DIALOG_ARIA_LABEL })"
+    <mat-list-item
       [attr.aria-label]="SHARE_CUSTOM_URL_ARIA_LABEL"
-      [attr.tab-index]="10">
+      [attr.tab-index]="10"
+      [matTooltip]="saneUrlDeprecated"
+      class="text-muted">
       <mat-icon
         class="mr-4"
         fontSet="fas"
-- 
GitLab