Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions packages/ui/src/components/noise-pattern.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import { SVGProps } from 'react'

export const NoisePattern = (props: SVGProps<SVGSVGElement>) => (
<svg
xmlns="http://www.w3.org/2000/svg"
className="pointer-events-none absolute inset-0 size-full opacity-50 mix-blend-overlay"
{...props}
>
<defs>
<filter
id="noise-filter"
x="-20%"
y="-20%"
width="140%"
height="140%"
filterUnits="objectBoundingBox"
primitiveUnits="userSpaceOnUse"
colorInterpolationFilters="linearRGB"
>
<feTurbulence
type="fractalNoise"
baseFrequency="0.141"
numOctaves="4"
seed="15"
stitchTiles="stitch"
x="0%"
y="0%"
width="100%"
height="100%"
result="turbulence"
/>
<feSpecularLighting
surfaceScale="7"
specularConstant="3"
specularExponent="20"
lightingColor="#4a90e2"
x="0%"
y="0%"
width="100%"
height="100%"
in="turbulence"
result="specularLighting"
>
<feDistantLight azimuth="3" elevation="106" />
</feSpecularLighting>
<feColorMatrix
type="saturate"
values="0"
x="0%"
y="0%"
width="100%"
height="100%"
in="specularLighting"
result="colormatrix"
/>
</filter>
</defs>
<rect height="100%" fill="#4a90e2" filter="url(#noise-filter)" width="100%"></rect>
</svg>
)
16 changes: 9 additions & 7 deletions packages/ui/src/views/layouts/Floating1ColumnLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { NoisePattern } from '@components/noise-pattern'
import { cn } from '@utils/cn'

type HighlightTheme = 'blue' | 'green' | 'error'
Expand Down Expand Up @@ -28,9 +29,12 @@ export const Floating1ColumnLayout = ({
as: Tag = 'div',
highlightTheme
}: Floating1ColumnLayoutProps) => {
const verticalCenterClass = verticalCenter ? 'flex items-center justify-center min-h-screen' : ''

const computedClassName = cn('px-5 pb-8 mx-auto md:px-8', widthClass[maxWidth], verticalCenterClass, className)
const computedClassName = cn(
'px-5 pb-8 mx-auto md:px-8',
widthClass[maxWidth],
{ 'flex items-center justify-center min-h-screen': verticalCenter },
className
)

if (highlightTheme) {
return (
Expand Down Expand Up @@ -100,10 +104,8 @@ const HighlightedFloatingLayout = ({ children, className, theme = 'blue' }: High
)}
/>
</div>
<span
className="pointer-events-none absolute inset-0 bg-[size:100px_100px] bg-repeat opacity-70 mix-blend-overlay"
aria-hidden
/>
<NoisePattern className="pointer-events-none absolute inset-0 size-full opacity-50 mix-blend-overlay" />

{children}
</Floating1ColumnLayout>
)
Expand Down
4 changes: 2 additions & 2 deletions packages/views/src/components/execution/execution-status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ const Badge: React.FC<ExecutionStatusProps & BadgeProps> = props => {
case ExecutionState.RUNNING:
return minimal ? (
<div className="flex items-center gap-1">
<div className="size-2 rounded-full bg-studio-3" />
<div className="bg-studio-3 size-2 rounded-full" />
<span className="text-studio-3">Running</span>
</div>
) : (
<div className="flex items-center gap-1 rounded-md border border-solid border-studio-3/[0.12] bg-studio-3/10 px-1 py-0.5">
<div className="border-studio-3/[0.12] bg-studio-3/10 flex items-center gap-1 rounded-md border border-solid px-1 py-0.5">
<div className="flex items-center gap-1">
<CanaryIcon size={16} name="running" className="animate-spin text-warning" />
<span className="text-studio-3">Running</span>
Expand Down
4 changes: 2 additions & 2 deletions packages/views/src/components/execution/key-value-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ export const KeyValueTable: React.FC<KeyValueTableProps> = ({
if (typeof item.value === 'string') {
return (
<ul className="flex flex-row border-b align-middle" key={index}>
<li className="w-1/2 py-2.5 pr-2.5 text-studio-7" style={{ paddingLeft: `${level + 1}rem` }}>
<li className="text-studio-7 w-1/2 py-2.5 pr-2.5" style={{ paddingLeft: `${level + 1}rem` }}>
<Text size={2} weight="normal">
{item.name}
</Text>
</li>
<li className="w-1/2 py-2.5 pl-1.5 pr-2.5 text-studio-7">
<li className="text-studio-7 w-1/2 py-2.5 pl-1.5 pr-2.5">
<Text size={2} weight="normal">
{item.value}
</Text>
Expand Down
Loading