-
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.
feat(graph): add atomizer label to target groups (#26622)
## Current Behavior Atomized Groups are treated just like any other groups in the PDV ## Expected Behavior We want to let people know that something was created by the Atomizer and also surface more information to users.
- Loading branch information
Showing
28 changed files
with
439 additions
and
120 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
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,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
37 changes: 36 additions & 1 deletion
37
...b/target-configuration-details-group-header/target-configuration-details-group-header.tsx
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,25 +1,60 @@ | ||
import { AtomizerTooltip, Tooltip } from '@nx/graph/ui-tooltips'; | ||
import { Pill } from '../pill'; | ||
import { Square3Stack3DIcon } from '@heroicons/react/24/outline'; | ||
|
||
export interface TargetConfigurationGroupHeaderProps { | ||
targetGroupName: string; | ||
targetsNumber: number; | ||
className?: string; | ||
nonAtomizedTarget?: string; | ||
connectedToCloud?: boolean; | ||
nxConnectCallback?: () => void; | ||
showIcon?: boolean; | ||
} | ||
|
||
export const TargetConfigurationGroupHeader = ({ | ||
targetGroupName, | ||
targetsNumber, | ||
nonAtomizedTarget, | ||
connectedToCloud = true, | ||
nxConnectCallback, | ||
className = '', | ||
}: TargetConfigurationGroupHeaderProps) => { | ||
return ( | ||
<header className={`px-4 py-2 text-lg capitalize ${className}`}> | ||
<header | ||
className={`flex items-center gap-2 px-4 py-2 text-lg capitalize ${className}`} | ||
> | ||
{targetGroupName}{' '} | ||
{nonAtomizedTarget && <Square3Stack3DIcon className="h-5 w-5" />} | ||
<Pill | ||
text={ | ||
targetsNumber.toString() + | ||
(targetsNumber === 1 ? ' target' : ' targets') | ||
} | ||
/> | ||
{nonAtomizedTarget && ( | ||
<Tooltip | ||
openAction="hover" | ||
strategy="fixed" | ||
usePortal={true} | ||
content={ | ||
( | ||
<AtomizerTooltip | ||
connectedToCloud={connectedToCloud} | ||
nonAtomizedTarget={nonAtomizedTarget} | ||
nxConnectCallback={nxConnectCallback} | ||
/> | ||
) as any | ||
} | ||
> | ||
<span className="inline-flex"> | ||
<Pill | ||
color={connectedToCloud ? 'grey' : 'yellow'} | ||
text={'Atomizer'} | ||
/> | ||
</span> | ||
</Tooltip> | ||
)} | ||
</header> | ||
); | ||
}; |
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
Oops, something went wrong.