Skip to content

Commit 3ccd96f

Browse files
committed
feat(webapp): add light theme behind feature flag
- semantic token overrides for light, trigger.light editor/code palettes - Interface theme dropdown on /account, gated by hasThemeSwitcher flag - unify light surfaces: buttons, inputs, radios, checkboxes, tabs, clipboard fields - fix checkbox :read-only override and useThemeColor hydration mismatch - resolve Firefox panel animation check from request UA
1 parent bad78e6 commit 3ccd96f

39 files changed

Lines changed: 468 additions & 103 deletions

File tree

.server-changes/light-theme.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
area: webapp
3+
type: feature
4+
---
5+
6+
Adds an opt-in light theme behind a feature flag. When enabled, an Interface theme setting appears on the account page (dark stays the default). Code editors and syntax highlighting use the trigger.light palette.

apps/webapp/app/components/AskAI.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ function ChatMessages({
389389
<div className="flex flex-col">
390390
<Callout variant="error" className="mb-4">
391391
<Paragraph className="font-semibold text-error">Error generating answer:</Paragraph>
392-
<Paragraph className="text-rose-300">
392+
<Paragraph className="text-rose-500 dark:text-rose-300">
393393
{error} If the problem persists after retrying, please contact support.
394394
</Paragraph>
395395
</Callout>

apps/webapp/app/components/admin/debugTooltip.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function Content({ children }: { children: React.ReactNode }) {
4040
const user = useUser();
4141

4242
return (
43-
<div className="flex flex-col gap-2 divide-y divide-slate-700">
43+
<div className="flex flex-col gap-2 divide-y divide-grid-bright">
4444
<Property.Table>
4545
<Property.Item>
4646
<Property.Label>User ID</Property.Label>

apps/webapp/app/components/billing/AnimatedOrgBannerBar.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@ export function AnimatedOrgBannerBar({
4444
/>
4545
<Paragraph
4646
variant="small"
47-
className={variant === "warning" ? "text-amber-200" : "text-error"}
47+
className={
48+
variant === "warning" ? "text-amber-700 dark:text-amber-200" : "text-error"
49+
}
4850
>
4951
{children}
5052
</Paragraph>

apps/webapp/app/components/billing/BillingLimitRecoveryPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export function BillingLimitRecoveryPanel({
113113
<div className="border-b border-grid-dimmed pb-3">
114114
<Header2 spacing>Action required</Header2>
115115
<Callout variant="warning">
116-
<Paragraph variant="small" className="text-yellow-200">
116+
<Paragraph variant="small" className="text-callout-warning-text">
117117
{isGrace ? (
118118
<>
119119
Your organization has reached its billing limit. Processing is paused and new runs

apps/webapp/app/components/billing/UsageBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export function UsageBar({ current, billingLimit, tierLimit, isPaying }: UsageBa
6767
animate={{ width: tierRunLimitPercentage + "%" }}
6868
transition={{ duration: 1.5, type: "spring" }}
6969
style={{ width: `${tierRunLimitPercentage}%` }}
70-
className="absolute h-3 rounded-l-sm bg-green-900/50"
70+
className="absolute h-3 rounded-l-sm bg-green-900/20"
7171
>
7272
<Legend
7373
text={isPaying ? `Included usage:` : `Tier limit:`}

apps/webapp/app/components/code/ChartConfigPanel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ function SeriesColorPicker({
572572
title="Change series color"
573573
>
574574
<span
575-
className="block h-4 w-4 rounded-full border border-white/30"
575+
className="block h-4 w-4 rounded-full border border-text-bright/30"
576576
style={{ backgroundColor: color }}
577577
/>
578578
</button>
@@ -587,7 +587,7 @@ function SeriesColorPicker({
587587
onColorChange(c);
588588
setOpen(false);
589589
}}
590-
className="group/swatch flex h-6 w-6 items-center justify-center rounded-full border border-white/30"
590+
className="group/swatch flex h-6 w-6 items-center justify-center rounded-full border border-text-bright/30"
591591
style={{ backgroundColor: c }}
592592
title={c}
593593
>

apps/webapp/app/components/primitives/AppliedFilter.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import { cn } from "~/utils/cn";
44

55
const variants = {
66
"secondary/small": {
7-
box: "h-6 bg-secondary rounded pl-1.5 gap-1.5 text-xs divide-x divide-black/15 group-hover:bg-surface-control group-hover:border-border-brighter text-text-bright border border-border-bright",
7+
box: "h-6 bg-secondary rounded pl-1.5 gap-1.5 text-xs divide-x divide-black/15 shadow-xs group-hover:bg-background-raised text-text-bright border border-border-bright/50",
88
clear: "size-6 text-text-bright hover:text-text-bright transition-colors",
99
},
1010
"tertiary/small": {
11-
box: "h-6 bg-tertiary rounded pl-1.5 gap-1.5 text-xs divide-x divide-black/15 group-hover:bg-surface-control",
11+
box: "h-6 bg-tertiary rounded pl-1.5 gap-1.5 text-xs divide-x divide-black/15 group-hover:bg-background-raised",
1212
clear: "size-6 text-text-dimmed hover:text-text-bright transition-colors",
1313
},
1414
"minimal/medium": {

apps/webapp/app/components/primitives/Avatar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ function AvatarLetters({
138138

139139
return (
140140
<span
141-
className="grid shrink-0 place-items-center overflow-hidden text-charcoal-750"
141+
className="grid shrink-0 place-items-center overflow-hidden text-white"
142142
style={styleFromSize(size)}
143143
>
144144
{/* This is the square container */}

apps/webapp/app/components/primitives/Buttons.tsx

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,17 @@ type Size = keyof typeof sizes;
4949

5050
const theme = {
5151
primary: {
52-
textColor:
53-
"text-text-bright group-hover/button:text-white transition group-disabled/button:text-text-dimmed",
52+
textColor: "text-white transition group-disabled/button:text-white/60",
5453
button:
5554
"bg-indigo-600 border border-indigo-500 group-hover/button:bg-indigo-500 group-hover/button:border-indigo-400 group-disabled/button:opacity-50 group-disabled/button:bg-indigo-600 group-disabled/button:border-indigo-500 group-disabled/button:pointer-events-none",
5655
shortcut:
57-
"border-text-bright/40 text-text-bright group-hover/button:border-text-bright/60 group-hover/button:text-text-bright",
58-
icon: "text-text-bright",
56+
"border-white/40 text-white group-hover/button:border-white/60 group-hover/button:text-white",
57+
icon: "text-white",
5958
},
6059
secondary: {
6160
textColor: "text-text-bright transition group-disabled/button:text-text-dimmed/80",
6261
button:
63-
"bg-secondary group-hover/button:bg-surface-control group-hover/button:border-border-brighter border border-border-bright group-disabled/button:bg-secondary group-disabled/button:opacity-60 group-disabled/button:pointer-events-none",
62+
"bg-secondary border border-border-bright/50 shadow-xs group-hover/button:bg-background-raised group-disabled/button:bg-secondary group-disabled/button:opacity-60 group-disabled/button:pointer-events-none",
6463
shortcut:
6564
"border-text-dimmed/40 text-text-dimmed group-hover/button:text-text-bright group-hover/button:border-text-dimmed",
6665
icon: "text-text-bright",
@@ -82,17 +81,16 @@ const theme = {
8281
icon: "text-text-dimmed",
8382
},
8483
danger: {
85-
textColor:
86-
"text-text-bright group-hover/button:text-white transition group-disabled/button:text-text-bright/80",
84+
textColor: "text-white transition group-disabled/button:text-white/80",
8785
button:
8886
"bg-error group-hover/button:bg-rose-500 disabled:opacity-50 group-disabled/button:bg-error group-disabled/button:pointer-events-none",
89-
shortcut: "border-text-bright text-text-bright group-hover/button:border-text-bright/60",
90-
icon: "text-text-bright",
87+
shortcut: "border-white text-white group-hover/button:border-white/60",
88+
icon: "text-white",
9189
},
9290
docs: {
93-
textColor: "text-blue-200/70 transition group-disabled/button:text-text-dimmed/80",
91+
textColor: "text-callout-docs-text/70 transition group-disabled/button:text-text-dimmed/80",
9492
button:
95-
"bg-background-raised border border-border-bright/50 shadow-sm group-hover/button:bg-secondary group-disabled/button:bg-tertiary group-disabled/button:opacity-60 group-disabled/button:pointer-events-none",
93+
"bg-secondary border border-border-bright/50 shadow-xs group-hover/button:bg-background-raised group-disabled/button:bg-tertiary group-disabled/button:opacity-60 group-disabled/button:pointer-events-none",
9694
shortcut:
9795
"border-text-dimmed/40 text-text-dimmed group-hover/button:text-text-bright group-hover/button:border-text-dimmed",
9896
icon: "text-blue-500",
@@ -167,7 +165,7 @@ const variant = {
167165
};
168166

169167
const allVariants = {
170-
$all: "font-normal text-center font-sans justify-center items-center shrink-0 transition duration-150 rounded-[3px] select-none group-focus/button:outline-hidden group-disabled/button:opacity-75 group-disabled/button:pointer-events-none focus-custom",
168+
$all: "cursor-pointer font-normal text-center font-sans justify-center items-center shrink-0 transition duration-150 rounded-[3px] select-none group-focus/button:outline-hidden group-disabled/button:opacity-75 group-disabled/button:pointer-events-none focus-custom",
171169
variant: variant,
172170
};
173171

0 commit comments

Comments
 (0)