From 1bdd7ae5b0ea1ec2066de34bc5a85be383c8c615 Mon Sep 17 00:00:00 2001 From: Jitendra Gundaniya Date: Wed, 24 Jan 2024 21:16:57 +0000 Subject: [PATCH 01/21] shareable viz with multiple platform UI --- src/components/metadata/metadata.js | 33 ++-- .../settings-modal/settings-modal.js | 41 ++-- .../shareable-url-modal.js | 177 +++++++++++------- .../shareable-url-modal.scss | 102 +++++++++- .../ui/dropdown/dropdown-renderer.js | 12 +- src/components/ui/dropdown/dropdown.js | 7 + src/components/ui/dropdown/dropdown.scss | 8 +- src/components/ui/input/index.js | 2 +- .../ui/menu-option/menu-option.scss | 1 - src/components/ui/modal/modal.js | 2 +- src/config.js | 35 +--- 11 files changed, 281 insertions(+), 139 deletions(-) diff --git a/src/components/metadata/metadata.js b/src/components/metadata/metadata.js index 71f181c8bd..f2904b1c59 100644 --- a/src/components/metadata/metadata.js +++ b/src/components/metadata/metadata.js @@ -25,6 +25,7 @@ import { import './styles/metadata.scss'; import MetaDataStats from './metadata-stats'; +import { isRunningLocally } from '../../utils'; /** * Shows node meta data @@ -291,21 +292,23 @@ const MetaData = ({ )} - {hasTrackingData && ( - - )} + {isRunningLocally() + ? hasTrackingData && ( + + ) + : null} {hasPreviewData && ( <>
diff --git a/src/components/settings-modal/settings-modal.js b/src/components/settings-modal/settings-modal.js index 181b999c0d..e0bffc5b70 100644 --- a/src/components/settings-modal/settings-modal.js +++ b/src/components/settings-modal/settings-modal.js @@ -16,6 +16,7 @@ import Button from '../ui/button'; import Modal from '../ui/modal'; import './settings-modal.scss'; +import { isRunningLocally } from '../../utils'; /** * Modal to allow users to change the flag settings @@ -157,25 +158,27 @@ const SettingsModal = ({ toggleValue={toggleFlags[value]} /> ))} - {isOutdated ? ( -
- • Kedro-Viz {latestVersion} is here! - - View release notes - -
- ) : ( -
- - • You are on the latest version of Kedro-Viz ( - {latestVersion}) - -
- )} + {isRunningLocally() ? ( + isOutdated ? ( +
+ • Kedro-Viz {latestVersion} is here! + + View release notes + +
+ ) : ( +
+ + • You are on the latest version of Kedro-Viz ( + {latestVersion}) + +
+ ) + ) : null}