Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
95ebca8
feat(cloud): dark theme, brand tokens and PP Formula pipeline
MaanilVerma Aug 4, 2026
0103271
fix(ui): keep the button label readable while loading
MaanilVerma Aug 4, 2026
b632ed0
feat(cloud): brand button variants and redesigned auth panels
MaanilVerma Aug 4, 2026
31bc6a1
feat(cloud): align logo, content and terms on one edge
MaanilVerma Aug 4, 2026
27b0925
Merge branch 'main' into feat/cloud-auth-shell
MaanilVerma Aug 4, 2026
de2efbc
Merge branch 'feat/cloud-auth-shell' into fix/button-loading-a11y
MaanilVerma Aug 4, 2026
c859195
Merge branch 'fix/button-loading-a11y' into feat/cloud-auth-panel
MaanilVerma Aug 4, 2026
6246be0
Merge branch 'feat/cloud-auth-panel' into feat/cloud-auth-layout
MaanilVerma Aug 4, 2026
2d51907
revert(i18n): move auth and carousel keys to the PRs that use them
MaanilVerma Aug 4, 2026
a8ef3dd
Merge branch 'fix/button-loading-a11y' into feat/cloud-auth-panel
MaanilVerma Aug 4, 2026
b500d16
Merge branch 'feat/cloud-auth-panel' into feat/cloud-auth-layout
MaanilVerma Aug 4, 2026
6d20cfd
feat(cloud): add auth panel copy
MaanilVerma Aug 4, 2026
2e1ef92
Merge branch 'feat/cloud-auth-panel' into feat/cloud-auth-layout
MaanilVerma Aug 4, 2026
ad559e0
fix(cloud): bound the auth panel width in the template
MaanilVerma Aug 4, 2026
a008732
Merge branch 'feat/cloud-auth-panel' into feat/cloud-auth-layout
MaanilVerma Aug 4, 2026
a96c105
fix(cloud): keep the footer on forgot-password
MaanilVerma Aug 4, 2026
292b193
Merge remote-tracking branch 'origin/main' into feat/cloud-auth-layout
MaanilVerma Aug 5, 2026
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
3 changes: 3 additions & 0 deletions public/icons/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
72 changes: 68 additions & 4 deletions src/platform/cloud/onboarding/components/CloudTemplate.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,40 @@
import { render, screen } from '@testing-library/vue'
import { describe, expect, it } from 'vitest'
import { afterEach, describe, expect, it, vi } from 'vitest'
import { createI18n } from 'vue-i18n'
import { createMemoryHistory, createRouter } from 'vue-router'

import CloudTemplate from './CloudTemplate.vue'

const i18n = createI18n({
legacy: false,
locale: 'en',
messages: { en: { g: { comfyOrgLogoAlt: 'ComfyOrg Logo' } } }
})

/**
* Drives the real `useMediaQuery`, so the breakpoint the component asks for is
* part of what these tests pin rather than something a mock papers over.
*/
function stubViewportWidth(pixels: number) {
vi.stubGlobal(
'matchMedia',
vi.fn((query: string) => {
const minWidth = /min-width:\s*([\d.]+)(px|rem)/.exec(query)
const threshold = minWidth
? Number(minWidth[1]) * (minWidth[2] === 'rem' ? 16 : 1)
: 0
return {
matches: pixels >= threshold,
media: query,
onchange: null,
addEventListener: vi.fn(),
removeEventListener: vi.fn(),
dispatchEvent: vi.fn()
}
})
)
}

const renderWithMeta = async (meta: Record<string, unknown>) => {
const router = createRouter({
history: createMemoryHistory(),
Expand All @@ -13,23 +44,56 @@ const renderWithMeta = async (meta: Record<string, unknown>) => {
await router.isReady()
return render(CloudTemplate, {
global: {
plugins: [router],
plugins: [router, i18n],
stubs: {
CloudHeroCarousel: { template: '<div data-testid="hero" />' },
CloudTemplateFooter: true
CloudTemplateFooter: { template: '<div data-testid="footer" />' },
CloudTermsNotice: { template: '<div data-testid="terms" />' }
}
Comment thread
MaanilVerma marked this conversation as resolved.
Resolved
}
})
}

afterEach(() => {
vi.unstubAllGlobals()
})

describe('CloudTemplate', () => {
it('shows the hero carousel when the route does not hide it', async () => {
it('shows the hero carousel on a wide viewport', async () => {
stubViewportWidth(1280)
await renderWithMeta({})
expect(screen.getByTestId('hero')).toBeInTheDocument()
})

it('hides the hero carousel when route.meta.hideHero is set', async () => {
stubViewportWidth(1280)
await renderWithMeta({ hideHero: true })
expect(screen.queryByTestId('hero')).not.toBeInTheDocument()
})

it('does not mount the hero carousel on a tablet-width viewport', async () => {
stubViewportWidth(1024)
await renderWithMeta({})
expect(
screen.queryByTestId('hero'),
'mounting below `xl` would download the hero video on devices that never display it'
).not.toBeInTheDocument()
})

it('swaps the footer for the terms notice when the route asks for it', async () => {
stubViewportWidth(1280)
await renderWithMeta({ showTermsNotice: true })
expect(screen.getByTestId('terms')).toBeInTheDocument()
expect(
screen.queryByTestId('footer'),
'the notice and the generic footer are alternatives, never both'
).not.toBeInTheDocument()
})

it('shows the generic footer by default', async () => {
stubViewportWidth(1280)
await renderWithMeta({})
expect(screen.getByTestId('footer')).toBeInTheDocument()
expect(screen.queryByTestId('terms')).not.toBeInTheDocument()
})
})
48 changes: 29 additions & 19 deletions src/platform/cloud/onboarding/components/CloudTemplate.vue
Original file line number Diff line number Diff line change
@@ -1,37 +1,47 @@
<template>
<div
class="flex h-svh w-screen bg-primary-comfy-ink font-sans text-primary-comfy-canvas"
class="dark-theme h-svh w-screen bg-primary-comfy-ink font-formula text-primary-comfy-canvas"
>
<div class="relative flex flex-1 flex-col">
<div class="flex h-16 shrink-0 items-center px-6">
<i
class="icon-[comfy--comfy-logo] h-5 w-22 text-brand-yellow md:h-6 md:w-26"
/>
<div class="mx-auto flex size-full max-w-[100rem]">
<div v-if="showHero" class="relative min-h-0 flex-1 overflow-hidden">
<CloudHeroCarousel />
</div>
<div class="flex flex-1 items-center justify-center overflow-auto">
<div class="w-full max-w-md px-6 lg:max-w-lg 2xl:max-w-xl">
<slot />
<div class="flex min-h-0 flex-1 flex-col overflow-auto">
<div
class="mx-auto flex min-h-full w-full max-w-md flex-col px-6 py-8 lg:max-w-lg xl:py-10 2xl:max-w-xl"
>
<img
src="/icons/logo.svg"
:alt="t('g.comfyOrgLogoAlt')"
class="h-9 w-auto shrink-0 object-contain object-left lg:h-10 2xl:h-11"
/>

<div class="my-auto w-full">
<slot />
</div>

<CloudTermsNotice v-if="route.meta.showTermsNotice" />
<CloudTemplateFooter v-if="!route.meta.showTermsNotice" />
</div>
</div>
<CloudTemplateFooter />
</div>
<div
v-if="!route.meta.hideHero"
class="relative hidden flex-1 overflow-hidden py-2 pr-2 lg:block"
>
<CloudHeroCarousel />
</div>
</div>
</template>

<script setup lang="ts">
import { breakpointsTailwind, useBreakpoints } from '@vueuse/core'
import { computed } from 'vue'
import { useI18n } from 'vue-i18n'
import { useRoute } from 'vue-router'

import CloudHeroCarousel from '@/platform/cloud/onboarding/components/CloudHeroCarousel.vue'
import CloudTemplateFooter from '@/platform/cloud/onboarding/components/CloudTemplateFooter.vue'
import CloudTermsNotice from '@/platform/cloud/onboarding/components/CloudTermsNotice.vue'

import '../assets/css/fonts.css'

const { t } = useI18n()
const route = useRoute()
const isWideViewport = useBreakpoints(breakpointsTailwind).greaterOrEqual('xl')
const showHero = computed(() => isWideViewport.value && !route.meta.hideHero)
</script>
<style>
@import '../assets/css/fonts.css';
</style>
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<template>
<footer
class="mx-auto flex h-[5%] max-h-[60px] w-5/6 items-start justify-center gap-2.5"
>
<footer class="mt-10 flex w-full shrink-0 items-start justify-center gap-2.5">
<a
href="https://www.comfy.org/terms-of-service"
target="_blank"
Expand Down
44 changes: 44 additions & 0 deletions src/platform/cloud/onboarding/components/CloudTermsNotice.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<template>
<div
class="mt-10 mb-8 shrink-0 text-center text-sm/relaxed text-primary-warm-gray"
>
<p class="my-0">
{{ t('auth.login.termsText') }}
<br />
<a
href="https://www.comfy.org/terms-of-service"
target="_blank"
rel="noopener noreferrer"
class="text-primary-comfy-canvas underline"
>
{{ t('auth.login.termsLink') }}
</a>
{{ t('auth.login.andText') }}
<a
href="https://www.comfy.org/privacy-policy"
target="_blank"
rel="noopener noreferrer"
class="text-primary-comfy-canvas underline"
>
{{ t('auth.login.privacyLink') }} </a
>.
</p>
<p class="mt-4 mb-0 text-xs/relaxed">
{{ t('cloudWaitlist_questionsText') }}
<a
href="https://support.comfy.org"
target="_blank"
rel="noopener noreferrer"
class="text-primary-comfy-canvas underline"
>
{{ t('cloudWaitlist_contactLink') }} </a
>.
Comment thread
MaanilVerma marked this conversation as resolved.
Resolved
</p>
</div>
</template>

<script setup lang="ts">
import { useI18n } from 'vue-i18n'

const { t } = useI18n()
</script>
11 changes: 11 additions & 0 deletions src/platform/cloud/onboarding/onboardingCloudRoutes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,17 @@ describe('cloudOnboardingRoutes', () => {
expect(consentRoute?.path).toBe('consent')
})

it('forgot-password keeps the footer its terms and help links live in', () => {
const cloudLayout = cloudOnboardingRoutes.find((r) => r.path === '/cloud')
const forgotPassword = cloudLayout?.children?.find(
(c) => c.name === 'cloud-forgot-password'
)

expect(forgotPassword).toBeDefined()
expect(forgotPassword?.meta?.hideFooter).toBeFalsy()
expect(forgotPassword?.meta?.showTermsNotice).toBeFalsy()
})

it('consent route carries no requiresAuth meta', () => {
const oauthLayout = cloudOnboardingRoutes.find((r) => r.path === '/oauth')
const consentRoute = oauthLayout?.children?.find(
Expand Down
2 changes: 2 additions & 0 deletions src/platform/cloud/onboarding/onboardingCloudRoutes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export const cloudOnboardingRoutes: RouteRecordRaw[] = [
name: 'cloud-login',
component: () =>
import('@/platform/cloud/onboarding/CloudLoginView.vue'),
meta: { showTermsNotice: true },
beforeEnter: async (to, _from, next) => {
if (!to.query.switchAccount) {
const { useCurrentUser } =
Expand All @@ -72,6 +73,7 @@ export const cloudOnboardingRoutes: RouteRecordRaw[] = [
name: 'cloud-signup',
component: () =>
import('@/platform/cloud/onboarding/CloudSignupView.vue'),
meta: { showTermsNotice: true },
beforeEnter: async (to, _from, next) => {
if (!to.query.switchAccount) {
const { useCurrentUser } =
Expand Down
Loading