-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(graph): update tooltip with addtl metadata
- Loading branch information
Showing
18 changed files
with
169 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './lib/technology-icon'; | ||
export * from './lib/framework-icons'; | ||
export * from './lib/ nx-cloud-icon'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { FC, SVGProps } from 'react'; | ||
|
||
export const NxCloudIcon: FC<SVGProps<SVGSVGElement>> = (props) => ( | ||
<svg | ||
role="img" | ||
xmlns="http://www.w3.org/2000/svg" | ||
stroke="currentColor" | ||
fill="transparent" | ||
viewBox="0 0 24 24" | ||
{...props} | ||
> | ||
<path | ||
d="M22.167 7.167v-2.5a2.5 2.5 0 0 0-2.5-2.5h-15a2.5 2.5 0 0 0-2.5 2.5v15a2.5 2.5 0 0 0 2.5 2.5h2.5m15-15c-2.76 0-5 2.24-5 5s-2.24 5-5 5-5 2.24-5 5m15-15V19.59a2.577 2.577 0 0 1-2.576 2.576H7.167" | ||
strokeWidth="2" | ||
/> | ||
</svg> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,98 @@ | ||
import { twMerge } from 'tailwind-merge'; | ||
import { ExternalLink } from './external-link'; | ||
import { NxCloudIcon } from '@nx/graph/ui-icons'; | ||
|
||
export interface AtomizerTooltipProps { | ||
isUsingCloud: boolean; | ||
connectedToCloud: boolean; | ||
nonAtomizedTarget: string; | ||
nxConnectCallback?: () => void; | ||
} | ||
export function AtomizerTooltip(props: AtomizerTooltipProps) { | ||
return ( | ||
<div className="max-w-lg text-sm text-slate-700 dark:text-slate-400"> | ||
<div className="z-20 max-w-lg text-sm text-slate-700 dark:text-slate-400"> | ||
<h4 className="flex items-center justify-between border-b border-slate-200 text-base dark:border-slate-700/60"> | ||
<span className="font-mono">Atomizer</span> | ||
</h4> | ||
<div className="flex flex-col py-2 font-mono"> | ||
<p className="flex grow items-center gap-2 whitespace-pre-wrap normal-case"> | ||
Nx{' '} | ||
<ExternalLink href="https://nx.dev/ci/features/split-e2e-tasks"> | ||
automatically split | ||
</ExternalLink>{' '} | ||
this potentially slow task into separate tasks for each file. We | ||
recommend enabling{' '} | ||
<ExternalLink href="https://nx.app/">Nx Cloud</ExternalLink> and{' '} | ||
<ExternalLink href="https://nx.dev/ci/features/distribute-task-execution"> | ||
Nx Agents | ||
</ExternalLink>{' '} | ||
to benefit from{' '} | ||
<ExternalLink href="https://nx.dev/ci/features/distribute-task-execution"> | ||
task distribution | ||
</ExternalLink> | ||
,{' '} | ||
<ExternalLink href="https://nx.dev/ci/features/remote-cache"> | ||
remote caching | ||
</ExternalLink>{' '} | ||
and{' '} | ||
<ExternalLink href="https://nx.dev/ci/features/flaky-tasks"> | ||
flaky task re-runs | ||
</ExternalLink> | ||
<div className="flex flex-col border-b border-slate-200 py-2 font-mono dark:border-slate-700/60"> | ||
<p className="whitespace-pre-wrap normal-case"> | ||
{'Nx '} | ||
<Link | ||
href="https://nx.dev/ci/features/split-e2e-tasks" | ||
text="automatically split" | ||
/> | ||
{ | ||
' this potentially slow task into separate tasks for each file. We recommend enabling ' | ||
} | ||
{!props.connectedToCloud && ( | ||
<> | ||
<Link href="https://nx.app/" text="Nx Cloud" /> | ||
{' and '} | ||
</> | ||
)} | ||
<Link | ||
href="https://nx.dev/ci/features/distribute-task-execution" | ||
text="Nx Agents" | ||
/> | ||
{' to benefit from '} | ||
<Link | ||
href="https://nx.dev/ci/features/distribute-task-execution" | ||
text="task distribution" | ||
/> | ||
{!props.connectedToCloud && ( | ||
<> | ||
{', '} | ||
<Link | ||
href="https://nx.dev/ci/features/remote-cache" | ||
text="remote caching" | ||
/> | ||
</> | ||
)} | ||
{' and '} | ||
<Link | ||
href="https://nx.dev/ci/features/flaky-tasks" | ||
text="flaky task re-runs" | ||
/> | ||
. Use | ||
<code className="ml-4 inline rounded bg-gray-100 px-2 py-1 font-mono text-gray-800 dark:bg-gray-700 dark:text-gray-300"> | ||
<code className="mx-2 inline rounded bg-gray-100 px-1 font-mono text-gray-800 dark:bg-gray-700 dark:text-gray-300"> | ||
{props.nonAtomizedTarget} | ||
</code> | ||
when running without Nx Agents. | ||
</p> | ||
</div> | ||
{!props.connectedToCloud && ( | ||
<div className="flex py-2"> | ||
<p className="pr-4 normal-case"> | ||
{props.nxConnectCallback ? ( | ||
<button | ||
className="inline-flex cursor-pointer items-center gap-2 rounded-md px-2 py-1 text-base text-slate-600 ring-2 ring-inset ring-slate-400/40 hover:bg-slate-50 dark:text-slate-300 dark:ring-slate-400/30 dark:hover:bg-slate-800/60" | ||
onClick={() => props.nxConnectCallback!()} | ||
> | ||
<NxCloudIcon className="h-5 w-5 "></NxCloudIcon> | ||
<span>Connect to Nx Cloud</span> | ||
</button> | ||
) : ( | ||
<> | ||
{'Run'} | ||
<code className="mx-2 inline rounded bg-gray-100 px-1 font-mono text-gray-800 dark:bg-gray-700 dark:text-gray-300"> | ||
nx connect | ||
</code> | ||
{'to connect to Nx Cloud'} | ||
</> | ||
)} | ||
</p> | ||
</div> | ||
)} | ||
</div> | ||
); | ||
} | ||
|
||
function Link({ href, text }: { href: string; text: string }) { | ||
return ( | ||
<a | ||
href={href} | ||
className="inline text-slate-500 underline decoration-slate-700/50 decoration-dotted decoration-2 dark:text-slate-400 dark:decoration-slate-400/50" | ||
target="_blank" | ||
rel="noreferrer" | ||
> | ||
{text} | ||
</a> | ||
); | ||
} |
Oops, something went wrong.