Skip to content

Commit d791351

Browse files
authored
feat(subscription): unify credit gold across indicators and subscribe buttons (#13763)
## Summary Credit indicators and subscribe CTAs now share one gold, so the credit balance, the amounts in pricing and checkout, and the buttons that upgrade or top up all read as a single system. The subscribe buttons also drop the old purple gradient for a solid gold that is actually legible. ## Changes **What** - Recolor the credit accent to a single gold value and point every credit surface at that one token, replacing the scattered amber and gold used before. - Repaint the subscribe buttons: they were a multi layer purple gradient with faint white text (nearly unreadable), and are now a solid gold fill with dark text. Hover dims slightly instead of shifting the gradient. - Rename the button `subscribe` variant (it used to be called `gradient`, which stopped being accurate once it became a flat fill) and delete the now unused gradient token so there is no dead styling left behind. - Swap the credit cost glyphs across pricing tables, subscription success and preview screens, the free tier quota, the partner node popover, and both user popovers so they match the recolored token rather than raw amber. - Built on top of #13712 **Breaking** None. The subscribe buttons keep the same public API (the shared `SubscribeButton` still exposes a `buttonVariant` prop, now typed `'default' | 'subscribe'`), and no behavior, routing, or telemetry changes. ## Testing This is a token and styling change with no logic, so the meaningful verification is visual plus the standard gates, not new unit tests (a test asserting a hex value would just be a change detector). <img width="507" height="557" alt="image" src="https://github.com/user-attachments/assets/fed73d12-e3cc-46a6-aae2-db37f24d9bbb" />
1 parent 922be31 commit d791351

17 files changed

Lines changed: 27 additions & 47 deletions

packages/design-system/src/css/style.css

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
--color-gold-500: #fdab34;
5050
--color-gold-600: #fd9903;
5151

52-
--color-credit: #fabc25;
52+
--color-credit: #ddbd31;
5353

5454
--color-coral-500: #f75951;
5555
--color-coral-600: #e04e48;
@@ -140,26 +140,6 @@
140140
--button-surface: var(--color-white);
141141
--button-surface-contrast: var(--color-black);
142142

143-
--subscription-button-gradient:
144-
linear-gradient(
145-
315deg,
146-
rgb(105 230 255 / 0.15) 0%,
147-
rgb(99 73 233 / 0.5) 100%
148-
),
149-
radial-gradient(
150-
70.71% 70.71% at 50% 50%,
151-
rgb(62 99 222 / 0.15) 0.01%,
152-
rgb(66 0 123 / 0.5) 100%
153-
),
154-
linear-gradient(
155-
92deg,
156-
#d000ff 0.38%,
157-
#b009fe 37.07%,
158-
#3e1ffc 65.17%,
159-
#009dff 103.86%
160-
),
161-
linear-gradient(var(--color-button-surface, #2d2e32));
162-
163143
/* Code styling colors for help menu*/
164144
--code-text-color: rgb(0 122 255 / 1);
165145
--code-bg-color: rgb(96 165 250 / 0.2);

src/components/topbar/CurrentUserPopoverLegacy.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
<!-- Credits Section -->
3333
<div v-if="isActiveSubscription" class="flex items-center gap-2 px-4 py-2">
34-
<i class="icon-[lucide--component] text-sm text-amber-400" />
34+
<i class="icon-[lucide--component] text-sm text-credit" />
3535
<Skeleton v-if="isLoading" width="4rem" height="1.25rem" class="w-full" />
3636
<span v-else class="text-base font-semibold text-base-foreground">{{
3737
formattedBalance
@@ -48,7 +48,7 @@
4848
</Button>
4949
<Button
5050
v-if="isCloud && isFreeTier"
51-
variant="gradient"
51+
variant="subscribe"
5252
size="sm"
5353
data-testid="upgrade-to-add-credits-button"
5454
@click="handleUpgradeToAddCredits"
@@ -72,7 +72,7 @@
7272
:fluid="false"
7373
:label="$t('subscription.subscribeToComfyCloud')"
7474
size="sm"
75-
button-variant="gradient"
75+
button-variant="subscribe"
7676
@subscribed="handleSubscribed"
7777
/>
7878
</div>

src/components/topbar/TopbarSubscribeButton.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Button
33
v-if="isCloud && isFreeTier"
44
class="mr-2 shrink-0 whitespace-nowrap"
5-
variant="gradient"
5+
variant="subscribe"
66
size="sm"
77
data-testid="topbar-subscribe-button"
88
@click="handleClick"

src/components/ui/button/button.variants.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ export const buttonVariants = cva({
2424
base: 'bg-base-background text-base-foreground hover:bg-secondary-background-hover',
2525
tertiary:
2626
'bg-tertiary-background text-base-foreground hover:bg-tertiary-background-hover',
27-
gradient:
28-
'border-transparent bg-(image:--subscription-button-gradient) text-white hover:opacity-90'
27+
subscribe:
28+
'border-transparent bg-credit text-charcoal-800 hover:opacity-80'
2929
},
3030
size: {
3131
sm: 'h-6 rounded-sm px-2 py-1 text-xs',
@@ -58,7 +58,7 @@ const variants = [
5858
'base',
5959
'tertiary',
6060
'overlay-white',
61-
'gradient'
61+
'subscribe'
6262
] as const satisfies Array<ButtonVariants['variant']>
6363
const sizes = [
6464
'sm',

src/platform/cloud/subscription/components/CreditsTile.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
<div v-if="showActionButton" class="flex flex-col gap-3">
148148
<Button
149149
v-if="isFreeTier"
150-
variant="gradient"
150+
variant="subscribe"
151151
size="lg"
152152
class="w-full font-normal"
153153
@click="handleUpgradeToAddCredits"

src/platform/cloud/subscription/components/FreeTierQuota.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const label = computed(() =>
4343
v-if="hasInvalidNodes"
4444
class="flex w-full items-center justify-center gap-2"
4545
>
46-
<i class="icon-[comfy--credits] bg-amber-400" />
46+
<i class="icon-[comfy--credits] bg-credit" />
4747
{{ t('actionbar.freeTierPartner') }}
4848
</div>
4949
<div v-else class="flex w-full items-center justify-between">

src/platform/cloud/subscription/components/PricingTable.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
</span>
124124
<div class="flex flex-row items-center gap-1">
125125
<i
126-
class="icon-[comfy--credits] size-4 shrink-0 bg-amber-400"
126+
class="icon-[comfy--credits] size-4 shrink-0 bg-credit"
127127
aria-hidden="true"
128128
/>
129129
<span

src/platform/cloud/subscription/components/SubscribeButton.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<Button
33
:size
44
:disabled="disabled"
5-
:variant="buttonVariant === 'gradient' ? 'gradient' : 'primary'"
5+
:variant="buttonVariant === 'subscribe' ? 'subscribe' : 'primary'"
66
:class="cn('font-bold', fluid && 'w-full')"
77
@click="handleSubscribe"
88
>
@@ -28,7 +28,7 @@ const {
2828
} = defineProps<{
2929
label?: string
3030
size?: 'sm' | 'lg'
31-
buttonVariant?: 'default' | 'gradient'
31+
buttonVariant?: 'default' | 'subscribe'
3232
fluid?: boolean
3333
disabled?: boolean
3434
}>()

src/platform/cloud/subscription/components/SubscribeToRun.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
showDelay: 600
66
}"
77
class="subscribe-to-run-button h-8 gap-1.5 rounded-lg px-4 whitespace-nowrap"
8-
variant="gradient"
8+
variant="subscribe"
99
size="unset"
1010
data-testid="subscribe-to-run-button"
1111
@click="handleSubscribeToRun"

src/platform/workspace/components/CurrentUserPopoverWorkspace.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
<!-- Credits Section -->
6060

6161
<div class="flex items-center gap-2 px-4 py-2">
62-
<i class="icon-[lucide--component] text-sm text-amber-400" />
62+
<i class="icon-[lucide--component] text-sm text-credit" />
6363
<Skeleton
6464
v-if="isLoadingBalance"
6565
width="4rem"
@@ -82,7 +82,7 @@
8282
<!-- Upgrade to add credits (free tier) -->
8383
<Button
8484
v-if="isActiveSubscription && permissions.canTopUp && isFreeTier"
85-
variant="gradient"
85+
variant="subscribe"
8686
size="sm"
8787
data-testid="upgrade-to-add-credits-button"
8888
@click="handleUpgradeToAddCredits"
@@ -110,7 +110,7 @@
110110
: $t('workspaceSwitcher.subscribe')
111111
"
112112
size="sm"
113-
button-variant="gradient"
113+
button-variant="subscribe"
114114
/>
115115
<Button
116116
v-if="

0 commit comments

Comments
 (0)