Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ui): implement dark mode #2013

Merged
merged 108 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
906343e
Update color variables in globals.css and tailwind.config.ts
RichardKruemmel May 8, 2024
c844fff
Update text color for group name in GroupedScoreBadges component
RichardKruemmel May 8, 2024
9425c18
Update LangfuseLogo component styling
RichardKruemmel May 8, 2024
6800eaf
Update level colors in LevelColors component
RichardKruemmel May 8, 2024
9a4f05e
Update project navigation styles
RichardKruemmel May 8, 2024
4459426
Refactor Slider component
RichardKruemmel May 8, 2024
de0d134
Update star icon color
RichardKruemmel May 8, 2024
52d019c
Update styling in stats-cards component
RichardKruemmel May 8, 2024
f805462
Update text color in DocPopup component
RichardKruemmel May 8, 2024
b894f12
Update header styles in web component
RichardKruemmel May 8, 2024
a56387f
Refactor code to improve performance and readability
RichardKruemmel May 8, 2024
2a58c78
Update Spinner component styling
RichardKruemmel May 8, 2024
c1970b9
Update status badge colors
RichardKruemmel May 8, 2024
768b01e
Fix styling issue in SessionPage component
RichardKruemmel May 8, 2024
53e04ca
Update column visibility filter appearance
RichardKruemmel May 8, 2024
3810374
Update DataTableRowHeightSwitch class names
RichardKruemmel May 8, 2024
2f5866f
Refactor GenerationsTable component
RichardKruemmel May 8, 2024
8882518
Update text color in ModelTable
RichardKruemmel May 8, 2024
785e5e4
Update background color for output cells
RichardKruemmel May 8, 2024
3d2eee4
Update background colors in IOPreview and OpenAiMessageView components
RichardKruemmel May 8, 2024
4cc08ec
Update ObservationPreview component styling
RichardKruemmel May 8, 2024
29700a0
Update observation tree styles
RichardKruemmel May 8, 2024
9ec91a2
Update TracePreview component styling
RichardKruemmel May 8, 2024
c19e4d3
Update eval-config-form.tsx to use muted background color
RichardKruemmel May 8, 2024
80f9333
Update styles in template-form.tsx and LLMApiKeyComponent
RichardKruemmel May 8, 2024
a3a1c13
Update GenerationOutput styling
RichardKruemmel May 8, 2024
b4b9fdc
Update text color in AuthCloudPrivacyNotice component
RichardKruemmel May 8, 2024
64b76c3
Update text color in AuthCloudRegionSwitch component
RichardKruemmel May 8, 2024
9714027
Add ModeToggle component for dark mode
RichardKruemmel May 8, 2024
e15c2e8
Update tab component styles
RichardKruemmel May 8, 2024
225a240
Update table styles in DashboardTable component
RichardKruemmel May 8, 2024
ef2691e
Update background color class in DatasetItemsTable component
RichardKruemmel May 8, 2024
61984ff
Update background color class in DatasetRunItemsTable.tsx
RichardKruemmel May 8, 2024
62291d2
Update ProjectInvitation template styles
RichardKruemmel May 8, 2024
63103c1
Fix filter display issue in FilterBuilder component
RichardKruemmel May 8, 2024
e2b06cf
Update background color in DetailPageNav
RichardKruemmel May 8, 2024
3e129a4
Update Notification styling
RichardKruemmel May 8, 2024
9beed38
Update import statement for Card component
RichardKruemmel May 8, 2024
52ca04c
Update project name display color
RichardKruemmel May 8, 2024
d3ab2eb
Update prompt description text color
RichardKruemmel May 8, 2024
bf93374
Update text color in PromptDetail component
RichardKruemmel May 8, 2024
9b0ea63
Update prompt history styling
RichardKruemmel May 8, 2024
44db309
Update prompt text color
RichardKruemmel May 8, 2024
6866d57
Update prompt form text color
RichardKruemmel May 8, 2024
bd9973d
Update table header styles in ApiKeyList component
RichardKruemmel May 8, 2024
228bd60
Update LLMApiKeyList component styling
RichardKruemmel May 8, 2024
3553c21
Update text color in QuickstartExamples component
RichardKruemmel May 8, 2024
58ab3d5
Update table header styles in ProjectMembersTable component
RichardKruemmel May 8, 2024
6bd3c68
Update TagButton styling
RichardKruemmel May 8, 2024
e7f9e6d
Update TagList button styling
RichardKruemmel May 8, 2024
0f4c17a
Update text color for current plan
RichardKruemmel May 8, 2024
7b1d321
Update styling in onboarding page
RichardKruemmel May 8, 2024
0317fd2
Update sign-in page styling
RichardKruemmel May 8, 2024
cba6536
Update sign-up page styling
RichardKruemmel May 8, 2024
d13a214
Update styles for date component
RichardKruemmel May 8, 2024
4edb0c7
Refactor settings page UI
RichardKruemmel May 8, 2024
b9f9744
Update text color in Dataset component
RichardKruemmel May 8, 2024
8cc4301
Update PostHogIntegrationSettings component styling
RichardKruemmel May 8, 2024
35ef14c
Update styling for user page tabs
RichardKruemmel May 8, 2024
d2e2ed4
Remove unused component
RichardKruemmel May 14, 2024
7e34bed
Update color variables in globals.css
RichardKruemmel May 14, 2024
a7218f7
Update tailwind.config.ts with new color variables
RichardKruemmel May 14, 2024
4d17972
Update code mirror theme based on current theme
RichardKruemmel May 14, 2024
45464b1
Update publish-object-switch styling
RichardKruemmel May 14, 2024
cdeab87
Update background color in layout component
RichardKruemmel May 14, 2024
9389d1c
Fix CSS class order in SessionPage component
RichardKruemmel May 14, 2024
5f498c4
Update TableLink styling
RichardKruemmel May 14, 2024
e8a6083
Update background color class in GenerationsIOCell
RichardKruemmel May 14, 2024
2d2df96
Update background color class in TracesIOCell
RichardKruemmel May 14, 2024
cf61a94
Update background color classes in IOPreview and OpenAiMessageView co…
RichardKruemmel May 14, 2024
935c10a
Add dark theme support to JSONView component
RichardKruemmel May 14, 2024
839860d
Update password input icons
RichardKruemmel May 14, 2024
af9214b
Update Switch component styles
RichardKruemmel May 14, 2024
6e744ae
Update tab component styling
RichardKruemmel May 14, 2024
c26e715
Update expected output background color
RichardKruemmel May 14, 2024
20260e5
Update background color class in DatasetRunItemsTable.tsx
RichardKruemmel May 14, 2024
d04db04
Update filter builder styling
RichardKruemmel May 14, 2024
0deddcf
Update AutoComplete component styles
RichardKruemmel May 14, 2024
5a18f2f
Update hover background color in ApiKeyList
RichardKruemmel May 14, 2024
4c9ab71
Update hover background color in LLMApiKeyList component
RichardKruemmel May 14, 2024
5811558
Update code examples in QuickstartExamples component
RichardKruemmel May 14, 2024
b4a37c2
Update sign-up link styling
RichardKruemmel May 14, 2024
dd25176
Update sign-in link styling
RichardKruemmel May 14, 2024
caa4973
Update styling for date component
RichardKruemmel May 14, 2024
09be156
Fix button variant in ModelsPage component
RichardKruemmel May 14, 2024
7df348d
Update styling for item icons in project settings
RichardKruemmel May 14, 2024
3b96618
Refactor user page styling
RichardKruemmel May 14, 2024
2c42322
Merge branch 'richard/lfe-1082' into richard/lfe-1066
RichardKruemmel May 14, 2024
1f9adec
feat: adds gpt-4o model to evals (#2052)
hassiebp May 14, 2024
ad10e6f
chore: release v2.40.0
maxdeichmann May 14, 2024
5312d07
Add WIP location
RichardKruemmel May 14, 2024
bfc93e7
Update packages and configs
RichardKruemmel May 15, 2024
d41f6ba
WIP solution
RichardKruemmel May 15, 2024
5c9506c
Remove dark mode feature
RichardKruemmel May 15, 2024
d1e37e7
Add ThemeProvider and ThemeToggle components
RichardKruemmel May 15, 2024
1ba8cc9
Update layout component to use ThemeToggle
RichardKruemmel May 15, 2024
46f4162
Update ThemeProvider import
RichardKruemmel May 15, 2024
05b252a
Add getColorsForCategories utility function
RichardKruemmel May 15, 2024
b4a25d1
Add colors dynamically to BaseTimeSeriesChart
RichardKruemmel May 15, 2024
92655be
Merge branch 'upgrade-tremor' into richard/lfe-1066
RichardKruemmel May 15, 2024
0db79fd
Update colors in LangfuseLogo component
RichardKruemmel May 15, 2024
90a30e0
Update color variables in globals.css and tailwind.config.ts
RichardKruemmel May 15, 2024
c409b83
Update error page styling
RichardKruemmel May 15, 2024
8a4a361
Update level colors
RichardKruemmel May 15, 2024
0f04a42
Update publish-object-switch styling
RichardKruemmel May 15, 2024
0874dc7
Update Slider component styles
RichardKruemmel May 15, 2024
3632011
Refactor status badge colors
RichardKruemmel May 15, 2024
fa7bc14
Update dialog background color
RichardKruemmel May 15, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "langfuse",
"version": "2.39.0",
"version": "2.40.0",
"author": "engineering@langfuse.com",
"license": "MIT",
"private": true,
Expand Down
14 changes: 13 additions & 1 deletion packages/shared/src/features/evals/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,22 @@ export const evalLLMModels = [
maxTemperature: 2,
max_tokens: 256,
top_p: 1,
} as const,
{
provider: ModelProvider.OpenAI,
model: "gpt-4o",
temperature: 1,
maxTemperature: 2,
max_tokens: 256,
top_p: 1,
},
] as const;

export const EvalModelNames = z.enum(["gpt-3.5-turbo", "gpt-4-turbo-preview"]);
export const EvalModelNames = z.enum([
"gpt-3.5-turbo",
"gpt-4-turbo-preview",
"gpt-4o",
]);

export const OutputSchema = z.object({
reasoning: z.string(),
Expand Down
73 changes: 55 additions & 18 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "web",
"version": "2.39.0",
"version": "2.40.0",
"private": true,
"license": "MIT",
"engines": {
Expand All @@ -25,7 +25,8 @@
"@aws-sdk/lib-storage": "^3.568.0",
"@aws-sdk/s3-request-presigner": "^3.554.0",
"@codemirror/lang-json": "^6.0.1",
"@headlessui/react": "^1.7.19",
"@headlessui/react": "1.7.18",
"@headlessui/tailwindcss": "0.2.0",
"@heroicons/react": "^2.1.3",
"@hookform/resolvers": "^3.3.4",
"@langchain/anthropic": "^0.1.16",
Expand Down Expand Up @@ -57,6 +58,7 @@
"@radix-ui/react-tooltip": "^1.0.7",
"@react-email/components": "^0.0.17",
"@react-email/render": "^0.0.13",
"@remixicon/react": "^4.2.0",
"@repo/eslint-config": "workspace:*",
"@repo/typescript-config": "workspace:*",
"@sentry/nextjs": "^7.113.0",
Expand All @@ -65,10 +67,9 @@
"@sentry/types": "^7.113.0",
"@t3-oss/env-nextjs": "^0.8.0",
"@tailwindcss/container-queries": "^0.1.1",
"@tailwindcss/forms": "^0.5.7",
"@tanstack/react-query": "^4.36.1",
"@tanstack/react-table": "^8.11.8",
"@tremor/react": "3.11.1",
"@tremor/react": "3.16.2",
"@trpc/client": "^10.45.0",
"@trpc/next": "^10.45.0",
"@trpc/react-query": "^10.45.0",
Expand Down Expand Up @@ -118,6 +119,7 @@
"@jedmao/location": "^3.0.0",
"@mermaid-js/mermaid-cli": "^10.7.0",
"@playwright/test": "^1.43.1",
"@tailwindcss/forms": "^0.5.7",
"@testing-library/jest-dom": "^6.4.2",
"@testing-library/react": "^15.0.6",
"@types/bcryptjs": "^2.4.6",
Expand Down
8 changes: 4 additions & 4 deletions web/src/components/LangfuseLogo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ export const LangfuseLogo = ({
className={cn(
"flex items-center gap-2 self-stretch rounded-md px-3 py-2 text-xs ring-1 lg:-mx-2",
env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION === "STAGING"
? "bg-blue-100 text-blue-500 ring-blue-500"
? "bg-light-blue text-dark-blue ring-dark-blue"
: env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION === "DEV"
? "bg-green-100 text-green-500 ring-green-500"
: "bg-red-100 text-red-500 ring-red-500",
? "bg-light-green text-dark-green ring-dark-green"
: "bg-light-red text-dark-red ring-dark-red",
)}
>
{env.NEXT_PUBLIC_LANGFUSE_CLOUD_REGION === "DEV" ? (
Expand Down Expand Up @@ -76,7 +76,7 @@ export const LangfuseLogo = ({
target="_blank"
rel="noopener"
title="View releases on GitHub"
className="ml-2 text-xs text-gray-400"
className="ml-2 text-xs text-muted-foreground"
>
{VERSION}
</a>
Expand Down
40 changes: 18 additions & 22 deletions web/src/components/Slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,23 @@ export const Slider = (props: {
loading?: boolean;
onChecked?: (checked: boolean) => void;
isChecked?: boolean; // whether the slider is active
}) => {
console.log("props", props);

return (
<Switch
checked={props.isChecked}
disabled={props.loading || props.disabled}
onChange={props.onChecked}
}) => (
<Switch
checked={props.isChecked}
disabled={props.loading || props.disabled}
onChange={props.onChecked}
className={cn(
props.isChecked ? "bg-background" : "bg-input",
"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-foreground focus:ring-offset-2",
)}
>
<span className="sr-only">Use setting</span>
<span
aria-hidden="true"
className={cn(
props.isChecked ? "bg-black" : "bg-gray-200",
"relative inline-flex h-6 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus:ring-2 focus:ring-black focus:ring-offset-2",
props.isChecked ? "translate-x-5" : "translate-x-0",
"pointer-events-none inline-block h-5 w-5 transform rounded-full bg-background shadow ring-0 transition duration-200 ease-in-out",
)}
>
<span className="sr-only">Use setting</span>
<span
aria-hidden="true"
className={cn(
props.isChecked ? "translate-x-5" : "translate-x-0",
"pointer-events-none inline-block h-5 w-5 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out",
)}
/>
</Switch>
);
};
/>
</Switch>
);
2 changes: 1 addition & 1 deletion web/src/components/error-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const ErrorPage = ({

return (
<div className="flex h-screen flex-col items-center justify-center">
<AlertCircle className="mb-4 h-12 w-12 text-red-500" />
<AlertCircle className="text-dark-red mb-4 h-12 w-12" />
<h1 className="mb-4 text-xl font-bold">{title}</h1>
<p className="mb-8 text-center">{message}</p>
{session.status === "unauthenticated" ? (
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/grouped-score-badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const GroupedScoreBadges = ({
.sort(([a], [b]) => (a < b ? -1 : 1))
.map(([name, scores]) => (
<div key={name}>
<div className="text-xs text-gray-500">{name}</div>
<div className="text-xs text-muted-foreground">{name}</div>
<ScoresOfGroup scores={scores} />
</div>
))}
Expand Down
7 changes: 5 additions & 2 deletions web/src/components/json-editor.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import CodeMirror, { EditorView } from "@uiw/react-codemirror";
import { githubLight } from "@uiw/codemirror-theme-github";
import { githubLight, githubDark } from "@uiw/codemirror-theme-github";
import { json } from "@codemirror/lang-json";
import { useTheme } from "next-themes";
import { cn } from "@/src/utils/tailwind";

// todo: add json linting
Expand All @@ -18,10 +19,12 @@ export function JsonEditor({
lineWrapping?: boolean;
className?: string;
}) {
const { theme } = useTheme();
const codeMirrorTheme = theme === "dark" ? githubDark : githubLight;
return (
<CodeMirror
value={defaultValue}
theme={githubLight}
theme={codeMirrorTheme}
basicSetup={{
foldGutter: true,
}}
Expand Down
8 changes: 4 additions & 4 deletions web/src/components/layouts/doc-popup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default function DocPopup({
href={href}
rel="noopener"
target="_blank"
className="inline-block whitespace-nowrap text-gray-500 sm:pl-0"
className="inline-block whitespace-nowrap text-muted-foreground sm:pl-0"
onClick={() => {
capture("help_popup:href_clicked", {
href: href,
Expand All @@ -62,7 +62,7 @@ export default function DocPopup({
}
</Link>
) : (
<div className="inline-block whitespace-nowrap text-gray-500 sm:pl-0">
<div className="inline-block whitespace-nowrap text-muted-foreground sm:pl-0">
{
{
question: <HelpCircle className={sizes[size]} />,
Expand All @@ -74,7 +74,7 @@ export default function DocPopup({
</HoverCardTrigger>
<HoverCardContent>
{typeof description === "string" ? (
<div className="whitespace-break-spaces text-xs font-normal text-gray-800 sm:pl-0">
<div className="whitespace-break-spaces text-xs font-normal text-primary sm:pl-0">
{description}
</div>
) : (
Expand All @@ -98,7 +98,7 @@ export function Popup({ triggerContent, description }: PopupProps) {
</HoverCardTrigger>
<HoverCardContent>
{typeof description === "string" ? (
<div className="whitespace-break-spaces text-xs font-normal text-gray-800 sm:pl-0">
<div className="whitespace-break-spaces text-xs font-normal text-primary sm:pl-0">
{description}
</div>
) : (
Expand Down