From 8d4de929af45b061f7113472f1a95bc1c0f80f10 Mon Sep 17 00:00:00 2001 From: Mohammad Taqui Sayed <6297436+mohdsayed@users.noreply.github.com> Date: Wed, 30 Oct 2024 11:07:16 +0530 Subject: [PATCH 01/17] Add support forum link to PS landing page and dashboard (#848) * Add icons and link for support forum * Remove support forum item from sidebar * Add component for support link * Show support forum link conditionally * Handle dark mode --- .../src/components/landingPage/index.tsx | 34 ++++++++----- .../components/landingPage/supportLink.tsx | 48 +++++++++++++++++++ .../src/icons/external-link-black.svg | 4 +- packages/design-system/src/icons/index.tsx | 1 + packages/design-system/src/icons/support.svg | 3 ++ .../devtools/components/dashboard/index.tsx | 1 + .../components/privacySandbox/index.tsx | 6 ++- 7 files changed, 82 insertions(+), 15 deletions(-) create mode 100644 packages/design-system/src/components/landingPage/supportLink.tsx create mode 100644 packages/design-system/src/icons/support.svg diff --git a/packages/design-system/src/components/landingPage/index.tsx b/packages/design-system/src/components/landingPage/index.tsx index 6a76a646e..688012c16 100644 --- a/packages/design-system/src/components/landingPage/index.tsx +++ b/packages/design-system/src/components/landingPage/index.tsx @@ -25,6 +25,7 @@ import classNames from 'classnames'; */ import { ArrowUp } from '../../icons'; import ProgressBar from '../progressBar'; +import SupportLink from './supportLink'; import QuickLinksList from './quickLinksList'; import { PSInfoKeyType } from './infoCard/fetchPSInfo'; import InfoCard from './infoCard'; @@ -40,6 +41,7 @@ interface LandingPageProps { iframeBorderClass?: string; extraClasses?: string; showQuickLinks?: boolean; + showSupportLink?: boolean; } const LandingPage = ({ @@ -51,6 +53,7 @@ const LandingPage = ({ extraClasses, contentPanel, showQuickLinks = true, + showSupportLink = false, }: LandingPageProps) => { const [loading, setLoading] = useState(iframeSrc ? true : false); const [open, setOpen] = useState(true); @@ -67,19 +70,24 @@ const LandingPage = ({ 'divide-y divide-hex-gray dark:divide-quartz' )} > -
+ Error Message +
++ {selectedRow.errorMessage} +
+ > + )} + <> ++ Error code +
++ {selectedRow?.errorCode || I18n.getMessage('noDescription')} +
+ > + {selectedRow?.stackTrace && ( + <> ++ Stack trace +
++
+
+
+
+ >
+ )}
+ + {I18n.getMessage('selectRowToPreview')} +
+