Skip to content

Commit 2a1273b

Browse files
matt-aitkensamejr
andauthored
Major v3 web app update (#924)
* Added the new colours to the Tailwind config * Fixed Tsailwind compile errors * WIP Geist working in the app * WIP Storybook * Storybook is working again… ouch * Use Geist mono for CodeMirror * Some find/replace class changes * Resizable colours improved * WIP on primary button * Minor style improvements * Improve the side menu header styling * Improved v2 breadcrumbs * Account side menu tweaks * The page now works with the NavBar and UpgradePrompt * Removed unused import * Refactored the buttons to be dry-er * Removed the breadcrumbs * WIP on nav bar * WIP updating the button styles * Fix for the old test page * Fix for type errors * Removed console.log * Colour change in the resizable handle * New loading bar divider * Removed the design plugin * Creating our own storybook pages * Added some “storybook” pages * Added DetailCell storybook * WIP new animation for the loading page * Added the new loading divider * Fix for the time frame filter having a green border * Style improvements to the new test page * Small style improvements * Improvements to the list pagination components * Nav bar back button improved * Improvements to the run page * Lots of v2 style improvements * Help looks better * Improvements to the regenerate API key modal * More general improvements * Added section titles to our storybook * Added form stories * Fix for missing key prop * Loading bar is working * Fixed button submitting state * Fix for the test button icon * Code bg improved * Improved oauth buttons * Integration page header fix * Various improvements, mainly changing button variants * Segmented control style updates * Added an outline of 3px for the segment control * Fixes for the billing pages * More pricing improvements * Added dialog to storybook * Typography now in storybook * Free usage bar added to storybook * Added inline clode to storybook * Separated menu types into a sub section in storybook * NamedIcon now in storybook * Added page header to storybook * Added pricing callout to storybook * Added radio groups to storybook * Added segmented controllers to storybook * Added shortcuts to storybook * Added switches to storybook * Added toast to storybook * Added tooltips to storybook * Added tree view to storybook * Added usage charts to storybook * Tarted up the environment variables page * Fix for the FreePlanUsage panel bg colours * Added new badge variants * Added the <TaskPath /> to the tasks table * Span header improvements * Started work on the timeline * Started work on the timeline * Fix for the run page header * Timeline tick marks are working * Timeline working * Got the durations showing on hover * Button improvements * Experimenting with how the duration should be shown * Lots of refinements to the timeline * Much nicer API for the Timeline * The switch is now purple to match the design, with inverted thumb when on * Removed old stuff * Export the props * Added the span with duration back in * Simplified more and fixed the span durations * Put in some decent dummy data * Rendering defaults * Wip with the mouse cursor * Improvements to the story * Added Slider primitive * Integrated the icons into the slider * Lots of layout improvements * Cleaned up imports * “Root” indicator * Animated background on partials * Pull the styles through to the spans and log dots * Fixed some bugs in the TreeView when nodes get created or destroyed * Fix for incorrect parentTask reference * Added run streaming endpoint for live refreshing * Added the tabs to Storybook * Fix for status font size mismatch * Fix for the misaligned run filter status * Set a minimum duration on the timeline * The TreeView now re-calculates if the number of nodes has changed * Partials now render to the end * Improved the durations gutter * The duration is calculated using the current time if there are partial events * Added the environment label to storybook * Improved the environment label style * Removed bottom margin from badge * Button style improvements * Callouts style fits the new design better * Got the scrollbars to appear on the tree/timeline * Added scroll support * Synced scrolling working * Close button and exit icon for the detail panel * secure field shows start of env * Clipboard improvements * Latest lockfile * Fix for the durations wrapping --------- Co-authored-by: James Ritchie <[email protected]>
1 parent 64401ee commit 2a1273b

File tree

240 files changed

+5151
-4477
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

240 files changed

+5151
-4477
lines changed

apps/webapp/.storybook/main.ts

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ const config: StorybookConfig = {
2727
"@storybook/addon-interactions",
2828
"storybook-addon-variants",
2929
"storybook-addon-designs",
30-
"@storybook/addon-docs",
3130
{
3231
name: "@storybook/addon-styling",
3332
options: {

apps/webapp/.storybook/preview.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const preview: Preview = {
1919
values: [
2020
{
2121
name: "App background",
22-
value: "#0B1018",
22+
value: "#15171A",
2323
},
2424
],
2525
},
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
export function ExitIcon({ className }: { className?: string }) {
2+
return (
3+
<svg className={className} viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
4+
<line x1="3.5" y1="8" x2="11.5" y2="8" stroke="currentColor" stroke-linecap="round" />
5+
<line x1="15.5" y1="1.5" x2="15.5" y2="14.5" stroke="currentColor" stroke-linecap="round" />
6+
<path
7+
d="M8.5 4.5L12 8L8.5 11.5"
8+
stroke="currentColor"
9+
stroke-linecap="round"
10+
stroke-linejoin="round"
11+
/>
12+
</svg>
13+
);
14+
}
166 Bytes
Loading
170 Bytes
Loading

apps/webapp/app/components/ActiveBadge.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ export function ActiveBadge({ active, className, badgeSize = "normal" }: ActiveB
1717
switch (active) {
1818
case true:
1919
return (
20-
<span className={cn(variant[badgeSize], "bg-slate-800 text-green-500", className)}>
20+
<span className={cn(variant[badgeSize], "bg-charcoal-800 text-green-500", className)}>
2121
Active
2222
</span>
2323
);
2424
case false:
2525
return (
26-
<span className={cn(variant[badgeSize], "bg-slate-800 text-dimmed", className)}>
26+
<span className={cn(variant[badgeSize], "bg-charcoal-800 text-text-dimmed", className)}>
2727
Disabled
2828
</span>
2929
);
@@ -52,6 +52,6 @@ export function NewBadge({
5252
badgeSize?: keyof typeof variant;
5353
}) {
5454
return (
55-
<span className={cn(variant[badgeSize], "bg-green-600 text-background", className)}>New!</span>
55+
<span className={cn(variant[badgeSize], "text-background bg-green-600", className)}>New!</span>
5656
);
5757
}

apps/webapp/app/components/ComingSoon.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ type ComingSoonProps = {
1313
export function ComingSoon({ title, description, icon }: ComingSoonProps) {
1414
return (
1515
<MainCenteredContainer>
16-
<div className="flex flex-col justify-center rounded border border-slate-800 bg-slate-850">
17-
<div className="flex items-center gap-2 border-b border-slate-750 px-4 py-4">
16+
<div className="flex flex-col justify-center rounded border border-charcoal-800 bg-charcoal-850">
17+
<div className="flex items-center gap-2 border-b border-charcoal-750 px-4 py-4">
1818
{typeof icon === "string" ? (
19-
<NamedIconInBox name={icon} className={"h-10 w-10 bg-midnight-800"} />
19+
<NamedIconInBox name={icon} className={"bg-midnight-800 h-10 w-10"} />
2020
) : (
2121
icon
2222
)}

apps/webapp/app/components/DefinitionTooltip.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export function DefinitionTip({
1515
<TooltipProvider>
1616
<Tooltip disableHoverableContent>
1717
<TooltipTrigger>
18-
<span className="underline decoration-slate-600 decoration-dashed underline-offset-4 transition hover:decoration-slate-500">
18+
<span className="underline decoration-charcoal-600 decoration-dashed underline-offset-4 transition hover:decoration-charcoal-500">
1919
{children}
2020
</span>
2121
</TooltipTrigger>

apps/webapp/app/components/ErrorDisplay.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ type DisplayOptionsProps = {
4040
export function ErrorDisplay({ title, message, button }: DisplayOptionsProps) {
4141
return (
4242
<div className="p-4">
43-
<Header1 className="mb-4 border-b border-slate-800 pb-4">{title}</Header1>
43+
<Header1 className="mb-4 border-b border-charcoal-800 pb-4">{title}</Header1>
4444
{message && <Header3>{message}</Header3>}
4545
<LinkButton to={button ? button.to : "/"} variant="primary/medium" className="mt-8">
4646
{button ? button.title : "Home"}

apps/webapp/app/components/Feedback.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,11 @@ function DiscordBanner() {
114114
<a
115115
href="https://trigger.dev/discord"
116116
target="_blank"
117-
className="group mb-4 flex w-full items-center justify-between rounded-md border border-slate-600 bg-gradient-to-br from-blue-400/30 to-indigo-400/50 p-4 transition hover:border-indigo-400"
117+
className="group mb-4 flex w-full items-center justify-between rounded-md border border-charcoal-600 bg-gradient-to-br from-blue-400/30 to-indigo-400/50 p-4 transition hover:border-indigo-400"
118118
>
119119
<div className="flex flex-col gap-y-2">
120120
<DiscordIcon className="h-8 w-8" />
121-
<h2 className="font-title text-2xl text-bright transition group-hover:text-white">
121+
<h2 className="font-title text-2xl text-text-bright transition group-hover:text-white">
122122
Join the Trigger.dev
123123
<br />
124124
Discord community
@@ -127,7 +127,7 @@ function DiscordBanner() {
127127
Get help or answer questions from the Trigger.dev community.
128128
</Paragraph>
129129
</div>
130-
<ChevronRightIcon className="h-5 w-5 text-slate-400 transition group-hover:translate-x-1 group-hover:text-indigo-400" />
130+
<ChevronRightIcon className="h-5 w-5 text-charcoal-400 transition group-hover:translate-x-1 group-hover:text-indigo-400" />
131131
</a>
132132
);
133133
}

apps/webapp/app/components/ListPagination.tsx

+10-6
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,13 @@ function NextButton({ cursor }: { cursor?: string }) {
2525
return (
2626
<LinkButton
2727
to={path ?? "#"}
28-
variant={"tertiary/small"}
29-
TrailingIcon="chevron-right"
28+
variant={"minimal/small"}
29+
TrailingIcon="arrow-right"
30+
trailingIconClassName="text-text-dimmed"
3031
className={cn(
3132
"flex items-center",
32-
!path && "cursor-default opacity-50 group-hover:bg-transparent group-hover:text-slate-800"
33+
!path &&
34+
"cursor-not-allowed opacity-50 group-hover:bg-transparent group-hover:text-text-dimmed"
3335
)}
3436
onClick={(e) => !path && e.preventDefault()}
3537
>
@@ -44,11 +46,13 @@ function PreviousButton({ cursor }: { cursor?: string }) {
4446
return (
4547
<LinkButton
4648
to={path ?? "#"}
47-
variant={"tertiary/small"}
48-
LeadingIcon="chevron-left"
49+
variant={"minimal/small"}
50+
LeadingIcon="arrow-left"
51+
leadingIconClassName="text-text-dimmed"
4952
className={cn(
5053
"flex items-center",
51-
!path && "cursor-default opacity-50 group-hover:bg-transparent group-hover:text-slate-800"
54+
!path &&
55+
"cursor-not-allowed opacity-50 group-hover:bg-transparent group-hover:text-text-dimmed"
5256
)}
5357
onClick={(e) => !path && e.preventDefault()}
5458
>

apps/webapp/app/components/LoginPageLayout.tsx

+4-4
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ const quotes: QuoteType[] = [
4343
];
4444

4545
const layout = "group grid place-items-center text-center overflow-hidden";
46-
const gridCell = "hover:bg-midnight-850 rounded-lg transition bg-midnight-850/40";
46+
const gridCell = "hover:bg-background-bright rounded-lg transition bg-background-bright/40";
4747
const opacity = "opacity-10 group-hover:opacity-100 transition group-hover:scale-105";
4848
const logos = "h-[60%] w-[60%] transition grayscale group-hover:grayscale-0";
4949
const features = "h-[60%] w-[60%] text-gray-500 grayscale transition group-hover:grayscale-0";
@@ -61,7 +61,7 @@ export function LoginPageLayout({ children }: { children: React.ReactNode }) {
6161

6262
return (
6363
<main className="grid h-full grid-cols-12">
64-
<div className="border-midnight-750 z-10 col-span-12 border-r bg-midnight-850 md:col-span-6">
64+
<div className="border-midnight-750 z-10 col-span-12 border-r bg-background-bright md:col-span-6">
6565
<div className="flex h-full flex-col items-center justify-between p-6">
6666
<div className="flex w-full items-center justify-between">
6767
<a href="https://trigger.dev">
@@ -106,12 +106,12 @@ export function LoginPageLayout({ children }: { children: React.ReactNode }) {
106106
<LoginTooltip side="top" content={<QuoteTooltipContent />}>
107107
<div className={cn(layout, gridCell, wider)}>
108108
<div className="px-4">
109-
<Header3 className="relative text-2xl font-normal leading-8 text-gray-600 transition before:relative before:right-1 before:top-0 before:text-4xl before:text-slate-600 before:opacity-20 before:content-['❝'] group-hover:text-slate-500 group-hover:before:opacity-30 lg-height:text-xl md-height:text-lg">
109+
<Header3 className="relative text-2xl font-normal leading-8 text-gray-600 transition before:relative before:right-1 before:top-0 before:text-4xl before:text-charcoal-600 before:opacity-20 before:content-['❝'] group-hover:text-charcoal-500 group-hover:before:opacity-30 lg-height:text-xl md-height:text-lg">
110110
{randomQuote?.quote}
111111
</Header3>
112112
<Paragraph
113113
variant="small"
114-
className="mt-4 text-gray-700 transition group-hover:text-slate-600"
114+
className="mt-4 text-gray-700 transition group-hover:text-charcoal-600"
115115
>
116116
{randomQuote?.person}
117117
</Paragraph>

apps/webapp/app/components/NoMobileOverlay.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ export function NoMobileOverlay() {
77
<>
88
<div className="fixed inset-0 z-[9999] flex items-center justify-center sm:hidden">
99
<div className="relative h-full w-full bg-black opacity-90"></div>
10-
<div className="absolute mx-8 flex flex-col items-center gap-6 rounded-lg bg-slate-850 px-8 py-10 text-center">
10+
<div className="absolute mx-8 flex flex-col items-center gap-6 rounded-lg bg-charcoal-850 px-8 py-10 text-center">
1111
<XMarkIcon className="absolute top-14 h-8 w-8 text-rose-600" />
12-
<DevicePhoneMobileIcon className="h-16 w-16 text-slate-500" />
12+
<DevicePhoneMobileIcon className="h-16 w-16 text-charcoal-500" />
1313
<Paragraph>Trigger.dev is currently only available on desktop.</Paragraph>
1414
<LinkButton to="https://trigger.dev" variant="primary/medium">
1515
Back Home

apps/webapp/app/components/ProductHuntBanner.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export function ProductHuntBanner() {
1414
<LinkButton
1515
to="https://www.producthunt.com/posts/trigger-dev"
1616
target="_blank"
17-
className="!text-white underline underline-offset-2 transition hover:decoration-slate-100 hover:decoration-2"
17+
className="!text-white underline underline-offset-2 transition hover:decoration-charcoal-100 hover:decoration-2"
1818
variant="tertiary/small"
1919
>
2020
Vote for us today only!

apps/webapp/app/components/UserProfilePhoto.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ export function UserAvatar({
2525
/>
2626
</div>
2727
) : (
28-
<UserCircleIcon className={cn("aspect-square text-slate-400", className)} />
28+
<UserCircleIcon className={cn("aspect-square text-charcoal-400", className)} />
2929
);
3030
}

apps/webapp/app/components/VersionLabel.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ export function VersionLabel({ environment, userName, version }: VersionLabelPro
1414
return (
1515
<div
1616
className={cn(
17-
"inline-flex items-center justify-stretch justify-items-stretch rounded-sm border border-midnight-700 text-xxs"
17+
"border-midnight-700 inline-flex items-center justify-stretch justify-items-stretch rounded-sm border text-xxs"
1818
)}
1919
>
20-
<div className="px-1 text-xs tabular-nums text-dimmed">v{version}</div>
20+
<div className="px-1 text-xs tabular-nums text-text-dimmed">v{version}</div>
2121
<div
2222
className={cn(
23-
"inline-flex items-center justify-center rounded-r-sm border-l border-midnight-700 px-1 text-xxs font-medium uppercase tracking-wider",
23+
"border-midnight-700 inline-flex items-center justify-center rounded-r-sm border-l px-1 text-xxs font-medium uppercase tracking-wider",
2424
environmentTextClassName(environment)
2525
)}
2626
>

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ export function FreePlanUsage({ to, percentage }: { to: string; percentage: numb
1818
return (
1919
<div
2020
className={cn(
21-
"rounded border border-slate-900 bg-[#101722] p-2.5",
21+
"rounded border border-charcoal-700 bg-charcoal-750 p-2.5",
2222
hasHitLimit && "border-rose-800/60"
2323
)}
2424
>
2525
<div className="flex items-center justify-between gap-2">
2626
<div className="flex items-center gap-1">
27-
<ArrowUpCircleIcon className="h-5 w-5 text-dimmed" />
28-
<Paragraph className="text-2sm text-bright">Free Plan</Paragraph>
27+
<ArrowUpCircleIcon className="h-5 w-5 text-text-dimmed" />
28+
<Paragraph className="text-2sm text-text-bright">Free Plan</Paragraph>
2929
</div>
3030
<Link to={to} className="text-2sm text-indigo-500">
3131
Learn more

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

+14-16
Original file line numberDiff line numberDiff line change
@@ -84,32 +84,32 @@ function ConcurrentRunsSlider({
8484
max={options.length - 1}
8585
step={1}
8686
>
87-
<Slider.Track className="relative h-[8px] grow rounded-full bg-slate-850">
88-
<Slider.Range className="absolute h-full rounded-full bg-indigo-500" />
87+
<Slider.Track className="relative h-[8px] grow rounded-full bg-grid-bright">
88+
<Slider.Range className="absolute h-full rounded-full bg-primary" />
8989
</Slider.Track>
9090
<Slider.Thumb
91-
className="block h-5 w-5 rounded-full border-4 border-indigo-500 bg-slate-850 shadow-[0_1px_3px_4px_rgb(0_0_0_/_0.2),_0_1px_2px_-1px_rgb(0_0_0_/_0.1)] transition hover:border-indigo-400 hover:bg-slate-800 focus:shadow-[0_1px_3px_4px_rgb(0_0_0_/_0.2),_0_1px_2px_-1px_rgb(0_0_0_/_0.1)] focus:outline-none"
91+
className="block h-5 w-5 rounded-full border-4 border-primary bg-charcoal-850 shadow-[0_1px_3px_4px_rgb(0_0_0_/_0.2),_0_1px_2px_-1px_rgb(0_0_0_/_0.1)] transition hover:border-primary hover:bg-charcoal-800 focus:shadow-[0_1px_3px_4px_rgb(0_0_0_/_0.2),_0_1px_2px_-1px_rgb(0_0_0_/_0.1)] focus:outline-none"
9292
aria-label="Concurrent runs slider"
9393
/>
9494
</Slider.Root>
9595
<div className="ml-1.5 flex w-[99.85%] items-center justify-between">
9696
{options.map((tier, i) => {
9797
return (
98-
<Paragraph variant="extra-small" className="text-slate-600" key={i}>
98+
<Paragraph variant="extra-small" key={i}>
9999
{tier.upto}
100100
</Paragraph>
101101
);
102102
})}
103103
</div>
104104
</div>
105105
<div className="flex h-full items-start">
106-
<span className="ml-6 text-dimmed">=</span>
107-
<Header2 className="min-w-[8ch] text-right text-dimmed">
106+
<span className="ml-6 text-text-dimmed">=</span>
107+
<Header2 className="min-w-[8ch] text-right text-text-dimmed">
108108
{formatCurrency(cost, true)}
109109
</Header2>
110110
</div>
111111
</div>
112-
<hr className="mt-6 border-border" />
112+
<hr className="mt-6 border-grid-bright" />
113113
</div>
114114
);
115115
}
@@ -157,11 +157,11 @@ function RunsSlider({
157157
max={runIncrements}
158158
step={1}
159159
>
160-
<Slider.Track className="relative h-[8px] grow rounded-full bg-slate-850">
161-
<Slider.Range className="absolute h-full rounded-full bg-indigo-500" />
160+
<Slider.Track className="relative h-[8px] grow rounded-full bg-grid-bright">
161+
<Slider.Range className="absolute h-full rounded-full bg-primary" />
162162
</Slider.Track>
163163
<Slider.Thumb
164-
className="block h-5 w-5 rounded-full border-4 border-indigo-500 bg-slate-850 shadow-[0_1px_3px_4px_rgb(0_0_0_/_0.2),_0_1px_2px_-1px_rgb(0_0_0_/_0.1)] transition hover:border-indigo-400 hover:bg-slate-800 focus:shadow-[0_1px_3px_4px_rgb(0_0_0_/_0.2),_0_1px_2px_-1px_rgb(0_0_0_/_0.1)] focus:outline-none"
164+
className="block h-5 w-5 rounded-full border-4 border-primary bg-charcoal-850 shadow-[0_1px_3px_4px_rgb(0_0_0_/_0.2),_0_1px_2px_-1px_rgb(0_0_0_/_0.1)] transition hover:border-primary hover:bg-charcoal-800 focus:shadow-[0_1px_3px_4px_rgb(0_0_0_/_0.2),_0_1px_2px_-1px_rgb(0_0_0_/_0.1)] focus:outline-none"
165165
aria-label="Concurrent runs slider"
166166
/>
167167
</Slider.Root>
@@ -185,13 +185,13 @@ function RunsSlider({
185185
</div>
186186
</div>
187187
<div className="flex h-full items-start">
188-
<span className="ml-6 text-dimmed">=</span>
189-
<Header2 className="min-w-[8ch] text-right text-dimmed">
188+
<span className="ml-6 text-text-dimmed">=</span>
189+
<Header2 className="min-w-[8ch] text-right text-text-dimmed">
190190
{formatCurrency(cost, true)}
191191
</Header2>
192192
</div>
193193
</div>
194-
<hr className="mt-6 border-border" />
194+
<hr className="mt-6 border-grid-bright" />
195195
</div>
196196
);
197197
}
@@ -250,9 +250,7 @@ function SliderMarker({
250250
: "justify-middle right-0"
251251
)}
252252
>
253-
<Paragraph variant="extra-small" className="text-slate-600">
254-
{text}
255-
</Paragraph>
253+
<Paragraph variant="extra-small">{text}</Paragraph>
256254
</div>
257255
</div>
258256
);

0 commit comments

Comments
 (0)