From eb3e6effdaf1b72dc3fef992c61efc7032f27622 Mon Sep 17 00:00:00 2001 From: Keith Daulton <keith.daulton@gitkraken.com> Date: Fri, 9 Jun 2023 11:21:01 -0400 Subject: [PATCH] Adds link Focus view in the Graph header --- src/webviews/apps/plus/graph/GraphWrapper.tsx | 10 ++++++++++ src/webviews/apps/plus/graph/graph.scss | 15 +++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/src/webviews/apps/plus/graph/GraphWrapper.tsx b/src/webviews/apps/plus/graph/GraphWrapper.tsx index c718428..96f51ad 100644 --- a/src/webviews/apps/plus/graph/GraphWrapper.tsx +++ b/src/webviews/apps/plus/graph/GraphWrapper.tsx @@ -58,6 +58,7 @@ import { pluralize } from '../../../../system/string'; import type { IpcNotificationType } from '../../../protocol'; import { MenuDivider, MenuItem, MenuLabel, MenuList } from '../../shared/components/menu/react'; import { PopMenu } from '../../shared/components/overlays/pop-menu/react'; +import { PopOver } from '../../shared/components/overlays/react'; import { FeatureGate } from '../../shared/components/react/feature-gate'; import { FeatureGateBadge } from '../../shared/components/react/feature-gate-badge'; import { SearchBox } from '../../shared/components/search/react'; @@ -1107,6 +1108,15 @@ export function GraphWrapper({ </> )} <FeatureGateBadge subscription={subscription}></FeatureGateBadge> + <div className="popover"> + <a href="command:gitlens.showFocusPage" className="action-button popover__trigger"> + Try the Focus Preview + </a> + <PopOver placement="top end" className="popover__content"> + Concentrate on what really matters by gathering all your GitHub pull requests and issues in + one comprehensive list. + </PopOver> + </div> </div> {allowed && ( <div className="titlebar__row"> diff --git a/src/webviews/apps/plus/graph/graph.scss b/src/webviews/apps/plus/graph/graph.scss index c05d176..6da30b6 100644 --- a/src/webviews/apps/plus/graph/graph.scss +++ b/src/webviews/apps/plus/graph/graph.scss @@ -196,6 +196,21 @@ button:not([disabled]), } } +.popover { + position: relative; + + &__content { + width: max-content; + right: 0; + top: 100%; + white-space: normal; + } + + &__trigger:not(:hover) + &__content { + display: none; + } +} + .action-button { position: relative; appearance: none;