diff --git a/.github/workflows/ci-website-build.yaml b/.github/workflows/ci-website-build.yaml index 72eff5c126d..af4dd11d4d0 100644 --- a/.github/workflows/ci-website-build.yaml +++ b/.github/workflows/ci-website-build.yaml @@ -38,6 +38,9 @@ jobs: - name: Typecheck website run: pnpm --filter @comfyorg/website typecheck + - name: Run website unit tests + run: pnpm --filter @comfyorg/website test:unit + - name: Build website env: WEBSITE_ASHBY_API_KEY: ${{ secrets.WEBSITE_ASHBY_API_KEY }} diff --git a/AGENTS.md b/AGENTS.md index 333ada868eb..99eaff8b355 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -254,6 +254,10 @@ When working from a TDD or design doc, record its tradeoffs, alternatives consid - NEVER use the `dark:` tailwind variant - Instead use a semantic value from the `style.css` theme - e.g. `bg-node-component-surface` +- NEVER write out a design-system value — consume the token + - `packages/design-system` is the single source of truth for every token it ships: colors, fonts, icons, spacing, radii, shadows, text sizes + - Read the value from the package — a Tailwind class, `var(--token)`, or `readDesignToken()` where an API needs a concrete string. A literal that merely equals the token today still drifts the day the token changes, and it is invisible when it does + - See [Consuming tokens](packages/design-system/README.md#consuming-tokens) for the per-context table, the SVG `fill` caveat, and the two cases where a literal is unavoidable - NEVER use `:class="[]"` to merge class names - Always use `import { cn } from '@comfyorg/tailwind-utils'` - e.g. `
` diff --git a/apps/website/src/components/common/HubspotFormEmbed.vue b/apps/website/src/components/common/HubspotFormEmbed.vue index f1c7891d3f6..79915a85198 100644 --- a/apps/website/src/components/common/HubspotFormEmbed.vue +++ b/apps/website/src/components/common/HubspotFormEmbed.vue @@ -18,30 +18,30 @@ const HUBSPOT_SCRIPT_SRC = `https://js-${HUBSPOT_REGION}.hsforms.net/forms/embed const hasEmbedLoadError = ref(false) const hubspotFormStyles: Record<`--${string}`, string> = { - '--hsf-global__font-family': "'PP Formula', sans-serif", - '--hsf-global__color': '#c2bfb9', - '--hsf-background__background-color': '#211927', + '--hsf-global__font-family': 'var(--font-formula)', + '--hsf-global__color': 'var(--color-primary-comfy-canvas)', + '--hsf-background__background-color': 'var(--color-primary-comfy-ink)', '--hsf-background__border-width': '0', '--hsf-background__padding': '0', - '--hsf-button__font-family': "'PP Formula', sans-serif", + '--hsf-button__font-family': 'var(--font-formula)', '--hsf-button__font-size': '14px', - '--hsf-button__color': '#211927', - '--hsf-button__background-color': '#f2ff59', + '--hsf-button__color': 'var(--color-primary-comfy-ink)', + '--hsf-button__background-color': 'var(--color-primary-comfy-yellow)', '--hsf-button__border-radius': '16px', '--hsf-button__padding': '10px 24px', - '--hsf-richtext__font-family': "'PP Formula', sans-serif", - '--hsf-richtext__color': '#c2bfb9', - '--hsf-heading__font-family': "'PP Formula', sans-serif", - '--hsf-heading__color': '#c2bfb9', - '--hsf-field-label__font-family': "'PP Formula', sans-serif", + '--hsf-richtext__font-family': 'var(--font-formula)', + '--hsf-richtext__color': 'var(--color-primary-comfy-canvas)', + '--hsf-heading__font-family': 'var(--font-formula)', + '--hsf-heading__color': 'var(--color-primary-comfy-canvas)', + '--hsf-field-label__font-family': 'var(--font-formula)', '--hsf-field-label__font-size': '12px', - '--hsf-field-label__color': '#c2bfb9', - '--hsf-field-description__font-family': "'PP Formula', sans-serif", - '--hsf-field-description__color': '#c2bfb9', - '--hsf-field-footer__font-family': "'PP Formula', sans-serif", - '--hsf-field-footer__color': '#c2bfb9', - '--hsf-field-input__font-family': "'PP Formula', sans-serif", - '--hsf-field-input__color': '#c2bfb9', + '--hsf-field-label__color': 'var(--color-primary-comfy-canvas)', + '--hsf-field-description__font-family': 'var(--font-formula)', + '--hsf-field-description__color': 'var(--color-primary-comfy-canvas)', + '--hsf-field-footer__font-family': 'var(--font-formula)', + '--hsf-field-footer__color': 'var(--color-primary-comfy-canvas)', + '--hsf-field-input__font-family': 'var(--font-formula)', + '--hsf-field-input__color': 'var(--color-primary-comfy-canvas)', '--hsf-field-input__background-color': '#2a2230', '--hsf-field-input__placeholder-color': '#585159', '--hsf-field-input__border-color': '#3b3539', @@ -49,8 +49,8 @@ const hubspotFormStyles: Record<`--${string}`, string> = { '--hsf-field-input__border-style': 'solid', '--hsf-field-input__border-radius': '16px', '--hsf-field-input__padding': '16px', - '--hsf-field-textarea__font-family': "'PP Formula', sans-serif", - '--hsf-field-textarea__color': '#c2bfb9', + '--hsf-field-textarea__font-family': 'var(--font-formula)', + '--hsf-field-textarea__color': 'var(--color-primary-comfy-canvas)', '--hsf-field-textarea__background-color': '#2a2230', '--hsf-field-textarea__placeholder-color': '#585159', '--hsf-field-textarea__border-color': '#3b3539', @@ -58,18 +58,18 @@ const hubspotFormStyles: Record<`--${string}`, string> = { '--hsf-field-textarea__border-style': 'solid', '--hsf-field-textarea__border-radius': '16px', '--hsf-field-textarea__padding': '16px', - '--hsf-field-checkbox__color': '#c2bfb9', + '--hsf-field-checkbox__color': 'var(--color-primary-comfy-canvas)', '--hsf-field-checkbox__background-color': '#2a2230', '--hsf-field-checkbox__border-color': '#464147', '--hsf-field-checkbox__border-width': '1px', '--hsf-field-checkbox__border-style': 'solid', - '--hsf-field-radio__color': '#c2bfb9', + '--hsf-field-radio__color': 'var(--color-primary-comfy-canvas)', '--hsf-field-radio__background-color': '#2a2230', '--hsf-field-radio__border-color': '#464147', '--hsf-field-radio__border-width': '1px', '--hsf-field-radio__border-style': 'solid', - '--hsf-erroralert__font-family': "'PP Formula', sans-serif", - '--hsf-infoalert__font-family': "'PP Formula', sans-serif" + '--hsf-erroralert__font-family': 'var(--font-formula)', + '--hsf-infoalert__font-family': 'var(--font-formula)' } onMounted(() => { diff --git a/apps/website/src/components/product/cloud/HeroSection.vue b/apps/website/src/components/product/cloud/HeroSection.vue index 1426cfa3789..c4d97b38c40 100644 --- a/apps/website/src/components/product/cloud/HeroSection.vue +++ b/apps/website/src/components/product/cloud/HeroSection.vue @@ -29,56 +29,47 @@ const { locale = 'en' } = defineProps<{ locale?: Locale }>() height="510.823" rx="81.9867" transform="matrix(-0.866025 0.5 -0.866025 -0.5 924.132 890.858)" - fill="#211927" - stroke="#4D3762" + class="fill-primary-comfy-ink stroke-secondary-mauve" stroke-width="3" />{{ t('cloud.hero.subtitle', locale) }}
diff --git a/apps/website/src/components/product/local/HeroSection.vue b/apps/website/src/components/product/local/HeroSection.vue index ea552f71c88..edc2c1562d3 100644 --- a/apps/website/src/components/product/local/HeroSection.vue +++ b/apps/website/src/components/product/local/HeroSection.vue @@ -187,8 +187,7 @@ onUnmounted(() => { height="491.852" rx="65.5036" transform="matrix(-0.866025 -0.5 0 -1 620.969 1058.01)" - fill="#211927" - stroke="#4D3762" + class="fill-primary-comfy-ink stroke-secondary-mauve" stroke-width="3" visibility="hidden" /> @@ -200,8 +199,7 @@ onUnmounted(() => { height="371.888" rx="59.4123" transform="matrix(-0.866025 -0.5 0 -1 675.746 878.068)" - fill="#211927" - stroke="#4D3762" + class="fill-primary-comfy-ink stroke-secondary-mauve" stroke-width="3" />@@ -49,13 +49,12 @@ import BaseLayout from '../layouts/BaseLayout.astro' id="startCta" x="300" y="200" - font-family="'PP Formula', sans-serif" font-size="32" letter-spacing="0.15em" text-anchor="end" dominant-baseline="middle" transform="rotate(-31 400 200)" - class="cursor-pointer uppercase" + class="font-formula cursor-pointer uppercase" >CLICK TO START