diff --git a/website/src/components/Dashboard/LeaderboardTable.tsx b/website/src/components/Dashboard/LeaderboardTable.tsx
index b958d4b7..cb8de07f 100644
--- a/website/src/components/Dashboard/LeaderboardTable.tsx
+++ b/website/src/components/Dashboard/LeaderboardTable.tsx
@@ -54,7 +54,7 @@ export function LeaderboardTable() {
Top 5 Contributors
-
+
View All ->
diff --git a/website/src/components/Dashboard/TaskOption.tsx b/website/src/components/Dashboard/TaskOption.tsx
index 43bcabea..1b421126 100644
--- a/website/src/components/Dashboard/TaskOption.tsx
+++ b/website/src/components/Dashboard/TaskOption.tsx
@@ -7,11 +7,11 @@ export const TaskOption = ({ displayTaskCategories }) => {
const backgroundColor = useColorModeValue("white", "gray.700");
return (
-
+
{displayTaskCategories.map((category, categoryIndex) => (
{category}
-
+
{TaskTypes.filter((task) => task.category === category).map((item, itemIndex) => (
{
_hover={{ backgroundColor: "blue.600" }}
>
- Go
+ Go ->
diff --git a/website/src/components/Header/UserMenu.tsx b/website/src/components/Header/UserMenu.tsx
index 2f59efb1..b0cce291 100644
--- a/website/src/components/Header/UserMenu.tsx
+++ b/website/src/components/Header/UserMenu.tsx
@@ -68,9 +68,8 @@ export function UserMenu() {
>
@@ -88,7 +87,7 @@ export function UserMenu() {
- {item.name}
+ {item.name}
))}
@@ -101,7 +100,7 @@ export function UserMenu() {
- Sign Out
+ Sign Out
diff --git a/website/src/components/Layout.tsx b/website/src/components/Layout.tsx
index c4450f58..b8e196cd 100644
--- a/website/src/components/Layout.tsx
+++ b/website/src/components/Layout.tsx
@@ -1,7 +1,7 @@
// https://nextjs.org/docs/basic-features/layouts
import type { NextPage } from "next";
-import { FiLayout, FiMessageSquare, FiUsers } from "react-icons/fi";
+import { FiBarChart2, FiLayout, FiMessageSquare, FiUsers } from "react-icons/fi";
import { Header } from "src/components/Header";
import { Footer } from "./Footer";
@@ -44,6 +44,12 @@ export const getDashboardLayout = (page: React.ReactElement) => (
desc: "Messages Dashboard",
icon: FiMessageSquare,
},
+ {
+ label: "Leaderboard",
+ pathname: "/leaderboard",
+ desc: "User Leaderboard",
+ icon: FiBarChart2,
+ },
]}
>
{page}
diff --git a/website/src/components/Loading/MessageLoading.jsx b/website/src/components/Loading/MessageLoading.jsx
new file mode 100644
index 00000000..3db8c68b
--- /dev/null
+++ b/website/src/components/Loading/MessageLoading.jsx
@@ -0,0 +1,19 @@
+import { Box, Progress, useColorModeValue } from "@chakra-ui/react";
+
+export const MessageLoading = () => {
+ const loadingColor = useColorModeValue("gray.200", "gray.600");
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+ );
+};
diff --git a/website/src/components/Messages.tsx b/website/src/components/Messages.tsx
index cf83010c..769f0342 100644
--- a/website/src/components/Messages.tsx
+++ b/website/src/components/Messages.tsx
@@ -1,5 +1,4 @@
-import { Grid } from "@chakra-ui/react";
-import { forwardRef, useColorMode } from "@chakra-ui/react";
+import { Box, forwardRef, Grid, useColorMode } from "@chakra-ui/react";
import { useMemo } from "react";
import { Message } from "src/types/Conversation";
@@ -23,16 +22,16 @@ export const MessageView = forwardRef
(({ is_assistant, text }: M
const bgColor = useMemo(() => {
if (colorMode === "light") {
- return is_assistant ? "bg-slate-800" : "bg-sky-900";
+ return is_assistant ? "gray.800" : "blue.600";
} else {
- return is_assistant ? "bg-black" : "bg-sky-900";
+ return is_assistant ? "black" : "blue.600";
}
}, [colorMode, is_assistant]);
return (
-
+
{text}
-
+
);
});
diff --git a/website/src/components/Messages/MessageTableEntry.tsx b/website/src/components/Messages/MessageTableEntry.tsx
index 6d1ce41c..e2d78e30 100644
--- a/website/src/components/Messages/MessageTableEntry.tsx
+++ b/website/src/components/Messages/MessageTableEntry.tsx
@@ -1,6 +1,6 @@
import { Avatar, HStack, LinkBox, LinkOverlay, useColorModeValue } from "@chakra-ui/react";
-import Link from "next/link";
import { boolean } from "boolean";
+import Link from "next/link";
import { FlaggableElement } from "src/components/FlaggableElement";
interface Message {
@@ -27,7 +27,7 @@ export function MessageTableEntry(props: MessageTableEntryProps) {
/>
-
+
{item.text}
diff --git a/website/src/components/RankItem.tsx b/website/src/components/RankItem.tsx
index f424fa26..daed0576 100644
--- a/website/src/components/RankItem.tsx
+++ b/website/src/components/RankItem.tsx
@@ -1,11 +1,57 @@
-const RankItem = ({ username, score }) => {
+import { Avatar, Box, GridItem, Text } from "@chakra-ui/react";
+
+const RankItem = () => {
+ const leaderInfo = [
+ {
+ username: "fozziethebeat",
+ rank: 1,
+ score: 530,
+ medal: "\uD83E\uDD47",
+ },
+ {
+ username: "k_nearest",
+ rank: 2,
+ score: 420,
+ medal: "\uD83E\uDD48",
+ },
+ {
+ username: "zu",
+ rank: 3,
+ score: 160,
+ medal: "\uD83E\uDD49",
+ },
+ {
+ username: "Abd",
+ rank: 4,
+ score: 140,
+ medal: "",
+ },
+ ];
+
return (
-
-
1
-
{username}
-
{score}
-
gold
-
+ <>
+ {leaderInfo.map((item, index) => (
+
+
+
+
+ {item.username}
+
+
+
+
+ {item.rank}
+
+
+
+ {item.score}
+
+
+ {item.medal}
+
+
+ ))}
+ >
);
};
diff --git a/website/src/components/SideMenuLayout.tsx b/website/src/components/SideMenuLayout.tsx
index d69b64d4..d2220f36 100644
--- a/website/src/components/SideMenuLayout.tsx
+++ b/website/src/components/SideMenuLayout.tsx
@@ -16,7 +16,7 @@ export const SideMenuLayout = (props: SideMenuLayoutProps) => {
- {props.children}
+ {props.children}
);
diff --git a/website/src/components/Sortable/SortableItem.tsx b/website/src/components/Sortable/SortableItem.tsx
index da691de3..d626b3a9 100644
--- a/website/src/components/Sortable/SortableItem.tsx
+++ b/website/src/components/Sortable/SortableItem.tsx
@@ -1,35 +1,44 @@
-import { Button } from "@chakra-ui/react";
-import { useColorMode } from "@chakra-ui/react";
+import { Box, useColorModeValue } from "@chakra-ui/react";
import { useSortable } from "@dnd-kit/sortable";
import { CSS } from "@dnd-kit/utilities";
-import { PropsWithChildren } from "react";
+import { PropsWithChildren, useState } from "react";
import { RxDragHandleDots2 } from "react-icons/rx";
export const SortableItem = ({ children, id }: PropsWithChildren<{ id: number }>) => {
+ const backgroundColor = useColorModeValue("gray.700", "gray.500");
+ const textColor = useColorModeValue("white", "white");
+
const { attributes, listeners, setNodeRef, transform, transition } = useSortable({ id });
const style = {
- transform: CSS.Transform.toString(transform),
+ transform: CSS.Translate.toString(transform),
transition,
touchAction: "none",
};
- const { colorMode } = useColorMode();
- const themedClasses =
- colorMode === "light"
- ? "bg-slate-600 hover:bg-slate-500 text-white"
- : "bg-black hover:bg-slate-900 text-white ring-1 ring-white/30 ring-inset hover:ring-slate-200/50";
+ const [grabbing, setGrabbing] = useState(false);
return (
- setGrabbing(true)}
+ onMouseUp={() => setGrabbing(false)}
+ {...attributes}
+ {...listeners}
ref={setNodeRef}
style={style}
+ shadow="base"
>
-
+
+
+
{children}
-
+
);
};
diff --git a/website/src/components/Survey/SurveyCard.tsx b/website/src/components/Survey/SurveyCard.tsx
index 25699c3f..1126fa0b 100644
--- a/website/src/components/Survey/SurveyCard.tsx
+++ b/website/src/components/Survey/SurveyCard.tsx
@@ -1,4 +1,4 @@
-import { useColorMode } from "@chakra-ui/react";
+import { Box, BoxProps, useColorModeValue } from "@chakra-ui/react";
interface SurveyCardProps {
className?: string;
@@ -6,15 +6,18 @@ interface SurveyCardProps {
}
export const SurveyCard = (props: SurveyCardProps) => {
- const extraClases = props.className || "";
- const { colorMode } = useColorMode();
+ const backgroundColor = useColorModeValue("white", "gray.800");
- const baseCardClasses = "rounded-lg h-full block p-6";
- const cardClases =
- colorMode === "light"
- ? `${baseCardClasses} bg-slate-50 text-gray-800 shadow-lg ${extraClases}`
- : // `${baseCardClasses} bg-slate-800 text-white shadow-xl${extraClases}`;
- `${baseCardClasses} bg-slate-800 text-slate-400 shadow-xl ring-1 ring-white/10 ring-inset ${extraClases}`;
+ const BoxClasses: BoxProps = {
+ p: "6",
+ gap: "2",
+ borderRadius: "xl",
+ shadow: "base",
+ };
- return {props.children}
;
+ return (
+
+ {props.children}
+
+ );
};
diff --git a/website/src/components/Survey/TaskControls.tsx b/website/src/components/Survey/TaskControls.tsx
index f451d871..91d6ffda 100644
--- a/website/src/components/Survey/TaskControls.tsx
+++ b/website/src/components/Survey/TaskControls.tsx
@@ -1,6 +1,4 @@
-import { useColorMode } from "@chakra-ui/react";
-import { Flex } from "@chakra-ui/react";
-import clsx from "clsx";
+import { Box, Flex, useColorModeValue } from "@chakra-ui/react";
import { SkipButton } from "src/components/Buttons/Skip";
import { SubmitButton } from "src/components/Buttons/Submit";
import { TaskInfo } from "src/components/TaskInfo/TaskInfo";
@@ -18,21 +16,21 @@ export interface TaskControlsProps {
}
export const TaskControls = (props: TaskControlsProps) => {
- const { colorMode } = useColorMode();
- const isLightMode = colorMode === "light";
+ const backgroundColor = useColorModeValue("white", "gray.800");
+
return (
-
-
+
{props.taskStatus !== "SUBMITTED" ? (
{
)}
-
+
);
};
diff --git a/website/src/components/Survey/TrackedTextarea.tsx b/website/src/components/Survey/TrackedTextarea.tsx
index d20107ac..f408e168 100644
--- a/website/src/components/Survey/TrackedTextarea.tsx
+++ b/website/src/components/Survey/TrackedTextarea.tsx
@@ -1,4 +1,4 @@
-import { Progress, Stack, Textarea, TextareaProps } from "@chakra-ui/react";
+import { Progress, Stack, Textarea, TextareaProps, useColorModeValue } from "@chakra-ui/react";
interface TrackedTextboxProps {
text: string;
@@ -12,6 +12,8 @@ interface TrackedTextboxProps {
}
export const TrackedTextarea = (props: TrackedTextboxProps) => {
+ const backgroundColor = useColorModeValue("gray.100", "gray.900");
+
const wordCount = (props.text.match(/\w+/g) || []).length;
let progressColor: string;
@@ -28,8 +30,23 @@ export const TrackedTextarea = (props: TrackedTextboxProps) => {
return (
-
-
+
+
);
};
diff --git a/website/src/components/Survey/TwoColumnsWithCards.tsx b/website/src/components/Survey/TwoColumnsWithCards.tsx
index 55f787ea..4dc9f92b 100644
--- a/website/src/components/Survey/TwoColumnsWithCards.tsx
+++ b/website/src/components/Survey/TwoColumnsWithCards.tsx
@@ -1,3 +1,4 @@
+import { Box, Stack } from "@chakra-ui/react";
import { SurveyCard } from "src/components/Survey/SurveyCard";
export const TwoColumnsWithCards = ({ children }: { children: React.ReactNode[] }) => {
@@ -8,9 +9,11 @@ export const TwoColumnsWithCards = ({ children }: { children: React.ReactNode[]
const [first, second] = children;
return (
-
- {first}
- {second}
-
+
+
+ {first}
+ {second}
+
+
);
};
diff --git a/website/src/components/TaskInfo/TaskInfo.tsx b/website/src/components/TaskInfo/TaskInfo.tsx
index c692e172..e08ed0e8 100644
--- a/website/src/components/TaskInfo/TaskInfo.tsx
+++ b/website/src/components/TaskInfo/TaskInfo.tsx
@@ -1,10 +1,38 @@
+import { Box, Flex, Text, TextProps, useColorModeValue } from "@chakra-ui/react";
+
+const TitleClasses: TextProps = {
+ fontWeight: "semibold",
+ fontSize: "md",
+ cursor: "default",
+};
+
+const LabelClasses: TextProps = {
+ fontSize: "sm",
+ cursor: "default",
+ color: "gray.500",
+};
+
export const TaskInfo = ({ id, output }: { id: string; output: string }) => {
+ const titleColor = useColorModeValue("gray.700", "gray.400");
+
return (
-
- Prompt
- {id}
- Output
- {output}
-
+
+
+
+
+ Prompt
+
+
+ {id}
+
+
+
+
+ Output
+
+ {output}
+
+
+
);
};
diff --git a/website/src/components/Tasks/CreateTask.tsx b/website/src/components/Tasks/CreateTask.tsx
index d5f38ad1..e3f8f897 100644
--- a/website/src/components/Tasks/CreateTask.tsx
+++ b/website/src/components/Tasks/CreateTask.tsx
@@ -1,3 +1,4 @@
+import { Box, Stack, Text, useColorModeValue } from "@chakra-ui/react";
import { useState } from "react";
import { Messages } from "src/components/Messages";
import { TrackedTextarea } from "src/components/Survey/TrackedTextarea";
@@ -5,6 +6,9 @@ import { TwoColumnsWithCards } from "src/components/Survey/TwoColumnsWithCards";
import { TaskSurveyProps } from "src/components/Tasks/Task";
export const CreateTask = ({ task, taskType, onReplyChanged }: TaskSurveyProps<{ text: string }>) => {
+ const titleColor = useColorModeValue("gray.800", "gray.300");
+ const labelColor = useColorModeValue("gray.600", "gray.400");
+
const [inputText, setInputText] = useState("");
const textChangeHandler = (event: React.ChangeEvent) => {
@@ -17,18 +21,32 @@ export const CreateTask = ({ task, taskType, onReplyChanged }: TaskSurveyProps<{
<>
- {taskType.label}
- {taskType.overview}
- {task.conversation ? : null}
+
+
+ {taskType.label}
+
+
+ {taskType.overview}
+
+
+ {task.conversation ? (
+
+
+
+ ) : null}
>
<>
- {taskType.instruction}
-
+
+
+ {taskType.instruction}
+
+
+
>
diff --git a/website/src/components/Tasks/EvaluateTask.tsx b/website/src/components/Tasks/EvaluateTask.tsx
index c6c5d5e6..a85e9abd 100644
--- a/website/src/components/Tasks/EvaluateTask.tsx
+++ b/website/src/components/Tasks/EvaluateTask.tsx
@@ -1,3 +1,4 @@
+import { Box, Stack, Text, useColorModeValue } from "@chakra-ui/react";
import { useEffect } from "react";
import { MessageTable } from "src/components/Messages/MessageTable";
import { Sortable } from "src/components/Sortable/Sortable";
@@ -5,6 +6,10 @@ import { SurveyCard } from "src/components/Survey/SurveyCard";
import { TaskSurveyProps } from "src/components/Tasks/Task";
export const EvaluateTask = ({ task, onReplyChanged }: TaskSurveyProps<{ ranking: number[] }>) => {
+ const cardColor = useColorModeValue("gray.100", "gray.700");
+ const titleColor = useColorModeValue("gray.800", "gray.300");
+ const labelColor = useColorModeValue("gray.600", "gray.400");
+
let messages = [];
if (task.conversation) {
messages = task.conversation.messages;
@@ -28,14 +33,22 @@ export const EvaluateTask = ({ task, onReplyChanged }: TaskSurveyProps<{ ranking
return (
-
- Instructions
-
- Given the following {sortables}, sort them from best to worst, best being first, worst being last.
-
-
-
-
+
+
+
+
+ Instructions
+
+
+ Given the following {sortables}, sort them from best to worst, best being first, worst being last.
+
+
+
+
+
+
+
+
);
};
diff --git a/website/src/components/Tasks/LabelTask.tsx b/website/src/components/Tasks/LabelTask.tsx
index 36b6cb16..637715c9 100644
--- a/website/src/components/Tasks/LabelTask.tsx
+++ b/website/src/components/Tasks/LabelTask.tsx
@@ -1,5 +1,5 @@
-import { Grid, Slider, SliderFilledTrack, SliderThumb, SliderTrack } from "@chakra-ui/react";
-import { useColorMode } from "@chakra-ui/react";
+import { Box, Grid, Slider, SliderFilledTrack, SliderThumb, SliderTrack } from "@chakra-ui/react";
+import { Text, useColorMode, useColorModeValue } from "@chakra-ui/react";
import { useEffect, useId, useState } from "react";
import { MessageView } from "src/components/Messages";
import { MessageTable } from "src/components/Messages/MessageTable";
@@ -30,26 +30,38 @@ export const LabelTask = ({
setSliderValues(values);
};
+ const cardColor = useColorModeValue("gray.100", "gray.700");
+ const titleColor = useColorModeValue("gray.800", "gray.300");
+ const labelColor = useColorModeValue("gray.600", "gray.400");
+
return (
<>
- {taskType.label}
- {taskType.overview}
+
+ {taskType.label}
+
+
+ {taskType.overview}
+
{task.conversation ? (
-
+
+
+
) : (
-
+
+
+
)}
>
diff --git a/website/src/components/Tasks/Task.tsx b/website/src/components/Tasks/Task.tsx
index 29bad8c9..1ccef66c 100644
--- a/website/src/components/Tasks/Task.tsx
+++ b/website/src/components/Tasks/Task.tsx
@@ -1,4 +1,3 @@
-import { useColorMode } from "@chakra-ui/react";
import { useRef, useState } from "react";
import { TaskControls } from "src/components/Survey/TaskControls";
import { CreateTask } from "src/components/Tasks/CreateTask";
@@ -28,9 +27,6 @@ export const Task = ({ frontendId, task, trigger, mutate }) => {
const taskType = TaskTypes.find((taskType) => taskType.type === task.type);
- const { colorMode } = useColorMode();
- const mainBgClasses = colorMode === "light" ? "bg-slate-300 text-gray-900" : "bg-slate-900 text-white";
-
const { trigger: sendRejection } = useSWRMutation("/api/reject_task", poster, {
onSuccess: async () => {
mutate();
@@ -90,7 +86,7 @@ export const Task = ({ frontendId, task, trigger, mutate }) => {
}
return (
-
+
{taskTypeComponent()}
{
);
};
+AssistantReply.getLayout = getDashboardLayout;
+
export default AssistantReply;
diff --git a/website/src/pages/create/initial_prompt.tsx b/website/src/pages/create/initial_prompt.tsx
index c8bf7317..dc4429d0 100644
--- a/website/src/pages/create/initial_prompt.tsx
+++ b/website/src/pages/create/initial_prompt.tsx
@@ -1,5 +1,6 @@
import Head from "next/head";
import { TaskEmptyState } from "src/components/EmptyState";
+import { getDashboardLayout } from "src/components/Layout";
import { LoadingScreen } from "src/components/Loading/LoadingScreen";
import { Task } from "src/components/Tasks/Task";
import { useCreateInitialPrompt } from "src/hooks/tasks/useCreateReply";
@@ -26,4 +27,6 @@ const InitialPrompt = () => {
);
};
+InitialPrompt.getLayout = getDashboardLayout;
+
export default InitialPrompt;
diff --git a/website/src/pages/create/user_reply.tsx b/website/src/pages/create/user_reply.tsx
index b1425ff9..b28b7442 100644
--- a/website/src/pages/create/user_reply.tsx
+++ b/website/src/pages/create/user_reply.tsx
@@ -1,5 +1,6 @@
import Head from "next/head";
import { TaskEmptyState } from "src/components/EmptyState";
+import { getDashboardLayout } from "src/components/Layout";
import { LoadingScreen } from "src/components/Loading/LoadingScreen";
import { Task } from "src/components/Tasks/Task";
import { useCreatePrompterReply } from "src/hooks/tasks/useCreateReply";
@@ -26,4 +27,6 @@ const UserReply = () => {
);
};
+UserReply.getLayout = getDashboardLayout;
+
export default UserReply;
diff --git a/website/src/pages/evaluate/rank_assistant_replies.tsx b/website/src/pages/evaluate/rank_assistant_replies.tsx
index 8cb30db8..695fbfdc 100644
--- a/website/src/pages/evaluate/rank_assistant_replies.tsx
+++ b/website/src/pages/evaluate/rank_assistant_replies.tsx
@@ -1,5 +1,6 @@
import Head from "next/head";
import { TaskEmptyState } from "src/components/EmptyState";
+import { getDashboardLayout } from "src/components/Layout";
import { LoadingScreen } from "src/components/Loading/LoadingScreen";
import { Task } from "src/components/Tasks/Task";
import { useRankAssistantRepliesTask } from "src/hooks/tasks/useRankReplies";
@@ -26,4 +27,6 @@ const RankAssistantReplies = () => {
);
};
+RankAssistantReplies.getLayout = getDashboardLayout;
+
export default RankAssistantReplies;
diff --git a/website/src/pages/evaluate/rank_initial_prompts.tsx b/website/src/pages/evaluate/rank_initial_prompts.tsx
index 74b7a075..4eaaa110 100644
--- a/website/src/pages/evaluate/rank_initial_prompts.tsx
+++ b/website/src/pages/evaluate/rank_initial_prompts.tsx
@@ -1,5 +1,6 @@
import Head from "next/head";
import { TaskEmptyState } from "src/components/EmptyState";
+import { getDashboardLayout } from "src/components/Layout";
import { LoadingScreen } from "src/components/Loading/LoadingScreen";
import { Task } from "src/components/Tasks/Task";
import { useRankInitialPromptsTask } from "src/hooks/tasks/useRankReplies";
@@ -26,4 +27,6 @@ const RankInitialPrompts = () => {
);
};
+RankInitialPrompts.getLayout = getDashboardLayout;
+
export default RankInitialPrompts;
diff --git a/website/src/pages/evaluate/rank_user_replies.tsx b/website/src/pages/evaluate/rank_user_replies.tsx
index 0b2785e4..dd23030e 100644
--- a/website/src/pages/evaluate/rank_user_replies.tsx
+++ b/website/src/pages/evaluate/rank_user_replies.tsx
@@ -1,5 +1,6 @@
import Head from "next/head";
import { TaskEmptyState } from "src/components/EmptyState";
+import { getDashboardLayout } from "src/components/Layout";
import { LoadingScreen } from "src/components/Loading/LoadingScreen";
import { Task } from "src/components/Tasks/Task";
import { useRankPrompterRepliesTask } from "src/hooks/tasks/useRankReplies";
@@ -26,4 +27,6 @@ const RankUserReplies = () => {
);
};
+RankUserReplies.getLayout = getDashboardLayout;
+
export default RankUserReplies;
diff --git a/website/src/pages/label/label_assistant_reply.tsx b/website/src/pages/label/label_assistant_reply.tsx
index 2a4c56da..5cb45278 100644
--- a/website/src/pages/label/label_assistant_reply.tsx
+++ b/website/src/pages/label/label_assistant_reply.tsx
@@ -1,5 +1,6 @@
import Head from "next/head";
import { TaskEmptyState } from "src/components/EmptyState";
+import { getDashboardLayout } from "src/components/Layout";
import { LoadingScreen } from "src/components/Loading/LoadingScreen";
import { Task } from "src/components/Tasks/Task";
import { useLabelAssistantReplyTask } from "src/hooks/tasks/useLabelingTask";
@@ -26,4 +27,6 @@ const LabelAssistantReply = () => {
);
};
+LabelAssistantReply.getLayout = getDashboardLayout;
+
export default LabelAssistantReply;
diff --git a/website/src/pages/label/label_initial_prompt.tsx b/website/src/pages/label/label_initial_prompt.tsx
index 1434d2a2..d7c1d4b2 100644
--- a/website/src/pages/label/label_initial_prompt.tsx
+++ b/website/src/pages/label/label_initial_prompt.tsx
@@ -1,5 +1,6 @@
import Head from "next/head";
import { TaskEmptyState } from "src/components/EmptyState";
+import { getDashboardLayout } from "src/components/Layout";
import { LoadingScreen } from "src/components/Loading/LoadingScreen";
import { Task } from "src/components/Tasks/Task";
import { useLabelInitialPromptTask } from "src/hooks/tasks/useLabelingTask";
@@ -26,4 +27,6 @@ const LabelInitialPrompt = () => {
);
};
+LabelInitialPrompt.getLayout = getDashboardLayout;
+
export default LabelInitialPrompt;
diff --git a/website/src/pages/label/label_prompter_reply.tsx b/website/src/pages/label/label_prompter_reply.tsx
index a3b5162c..b48e6aab 100644
--- a/website/src/pages/label/label_prompter_reply.tsx
+++ b/website/src/pages/label/label_prompter_reply.tsx
@@ -1,5 +1,6 @@
import Head from "next/head";
import { TaskEmptyState } from "src/components/EmptyState";
+import { getDashboardLayout } from "src/components/Layout";
import { LoadingScreen } from "src/components/Loading/LoadingScreen";
import { Task } from "src/components/Tasks/Task";
import { useLabelPrompterReplyTask } from "src/hooks/tasks/useLabelingTask";
@@ -26,4 +27,6 @@ const LabelPrompterReply = () => {
);
};
+LabelPrompterReply.getLayout = getDashboardLayout;
+
export default LabelPrompterReply;
diff --git a/website/src/pages/leaderboard/index.tsx b/website/src/pages/leaderboard/index.tsx
new file mode 100644
index 00000000..a350e092
--- /dev/null
+++ b/website/src/pages/leaderboard/index.tsx
@@ -0,0 +1,80 @@
+import { Box, Grid, GridItem, GridItemProps, Heading, Text, useColorModeValue } from "@chakra-ui/react";
+import Head from "next/head";
+import { FiChevronDown } from "react-icons/fi";
+import { getDashboardLayout } from "src/components/Layout";
+import RankItem from "src/components/RankItem";
+
+const Leaderboard = () => {
+ const backgroundColor = useColorModeValue("white", "gray.800");
+
+ const GridProps: GridItemProps = {
+ justifyContent: "start",
+ };
+ const filter = [
+ {
+ title: "User",
+ isActive: false,
+ GridItemProps: { ...GridProps, justifyContent: "start" },
+ },
+ {
+ title: "Rank",
+ isActive: false,
+ GridItemProps: { ...GridProps, justifyContent: "center" },
+ },
+ {
+ title: "Score",
+ isActive: false,
+ GridItemProps: { ...GridProps, justifyContent: "center" },
+ },
+ {
+ title: "Medal",
+ isActive: false,
+ GridItemProps: { ...GridProps, justifyContent: "center" },
+ },
+ ];
+
+ return (
+ <>
+
+ Leaderboard - Open Assistant
+
+
+
+
+ Leaderboard
+
+
+
+ {filter.map((item, index) => (
+
+
+
+ {item.title}
+
+
+
+
+
+ ))}
+
+
+
+
+
+
+ >
+ );
+};
+
+Leaderboard.getLayout = getDashboardLayout;
+
+export default Leaderboard;
diff --git a/website/src/pages/leaderboard/score-leaderboard.tsx b/website/src/pages/leaderboard/score-leaderboard.tsx
deleted file mode 100644
index 231c9e71..00000000
--- a/website/src/pages/leaderboard/score-leaderboard.tsx
+++ /dev/null
@@ -1,52 +0,0 @@
-import { HiBarsArrowDown } from "react-icons/hi2";
-import RankItem from "src/components/RankItem";
-
-const LeaderBoard = () => {
- const PlaceHolderProps = { username: "test_user", score: 10 };
- return (
-
-
-
-
-
LeaderBoard
-
-
- {/* leaderboard items */}
-
-
-
-
- );
-};
-
-export default LeaderBoard;
diff --git a/website/src/pages/messages/[id]/index.tsx b/website/src/pages/messages/[id]/index.tsx
index cf05d0df..d3396b13 100644
--- a/website/src/pages/messages/[id]/index.tsx
+++ b/website/src/pages/messages/[id]/index.tsx
@@ -2,7 +2,7 @@ import { Box, Text, useColorModeValue } from "@chakra-ui/react";
import Head from "next/head";
import { useState } from "react";
import { getDashboardLayout } from "src/components/Layout";
-import { LoadingScreen } from "src/components/Loading/LoadingScreen";
+import { MessageLoading } from "src/components/Loading/MessageLoading";
import { MessageTableEntry } from "src/components/Messages/MessageTableEntry";
import { MessageWithChildren } from "src/components/Messages/MessageWithChildren";
import fetcher from "src/lib/fetcher";
@@ -10,7 +10,6 @@ import useSWR from "swr";
const MessageDetail = ({ id }) => {
const backgroundColor = useColorModeValue("white", "gray.700");
-
const [parent, setParent] = useState(null);
const { isLoading: isLoadingParent } = useSWR(id ? `/api/messages/${id}/parent` : null, fetcher, {
@@ -23,11 +22,7 @@ const MessageDetail = ({ id }) => {
});
if (isLoadingParent) {
- return (
-
-
-
- );
+ return ;
}
return (
<>
diff --git a/website/src/pages/tasks/random.tsx b/website/src/pages/tasks/random.tsx
index 5da43b83..2fbb9eba 100644
--- a/website/src/pages/tasks/random.tsx
+++ b/website/src/pages/tasks/random.tsx
@@ -1,5 +1,6 @@
import Head from "next/head";
import { TaskEmptyState } from "src/components/EmptyState";
+import { getDashboardLayout } from "src/components/Layout";
import { LoadingScreen } from "src/components/Loading/LoadingScreen";
import { Task } from "src/components/Tasks/Task";
import { useGenericTaskAPI } from "src/hooks/tasks/useGenericTaskAPI";
@@ -26,4 +27,6 @@ const RandomTask = () => {
);
};
+RandomTask.getLayout = getDashboardLayout;
+
export default RandomTask;
diff --git a/website/src/styles/Theme/index.ts b/website/src/styles/Theme/index.ts
index 0c43eddd..718eab7f 100644
--- a/website/src/styles/Theme/index.ts
+++ b/website/src/styles/Theme/index.ts
@@ -22,6 +22,11 @@ const breakpoints = {
"2xl": "1536px",
};
+const fonts = {
+ heading: "Inter",
+ body: "Inter",
+};
+
const styles: Styles = {
global: (props) => ({
"*": {
@@ -33,13 +38,7 @@ const styles: Styles = {
bg: props.colorMode === "light" ? colors.light.bg : colors.dark.bg,
color: props.colorMode === "light" ? colors.light.text : colors.dark.text,
},
- main: {
- fontFamily: "Inter",
- },
- header: {
- fontFamily: "Inter",
- },
}),
};
-export const theme = extendTheme({ colors, config, styles, components, breakpoints });
+export const theme = extendTheme({ colors, config, fonts, styles, components, breakpoints });