diff --git a/web/src/app/admin/documents/feedback/page.tsx b/web/src/app/admin/documents/feedback/page.tsx index d2505225b..e7fba708b 100644 --- a/web/src/app/admin/documents/feedback/page.tsx +++ b/web/src/app/admin/documents/feedback/page.tsx @@ -127,6 +127,7 @@ const DocumentFeedbackTable = ({ { header: "Score", key: "score", + alignment: "right", }, ]} data={documents @@ -145,7 +146,7 @@ const DocumentFeedbackTable = ({ ), score: (
-
+
{ return (
-

Most Liked Documents

+

Most Liked Documents

Most Disliked Documents

diff --git a/web/src/components/PageSelector.tsx b/web/src/components/PageSelector.tsx index 78d296eff..1a634a429 100644 --- a/web/src/components/PageSelector.tsx +++ b/web/src/components/PageSelector.tsx @@ -53,6 +53,7 @@ const PageLink = ({ }: PageLinkProps) => (
= ({ columns, data }) => { - {columns.map((column, index) => ( - - ))} + {columns.map((column, index) => { + const isRightAligned = column?.alignment === "right"; + return ( + + ); + })} {data.map((row, rowIndex) => ( {columns.map((column, colIndex) => { + const isRightAligned = column?.alignment === "right"; return ( ); })} diff --git a/web/src/components/icons/icons.tsx b/web/src/components/icons/icons.tsx index 00f093fb3..494a88cc4 100644 --- a/web/src/components/icons/icons.tsx +++ b/web/src/components/icons/icons.tsx @@ -10,14 +10,18 @@ import { Link, Plug, Brain, - PencilSimple, X, Question, Users, - ThumbsUp, - ThumbsDown, } from "@phosphor-icons/react"; -import { FiCheck, FiEdit, FiThumbsDown, FiThumbsUp } from "react-icons/fi"; +import { + FiCheck, + FiChevronsDown, + FiChevronsUp, + FiEdit, + FiThumbsDown, + FiThumbsUp, +} from "react-icons/fi"; import { SiBookstack } from "react-icons/si"; import { FaFile, FaGlobe } from "react-icons/fa"; import Image from "next/image"; @@ -153,6 +157,20 @@ export const ThumbsDownIcon = ({ return ; }; +export const ChevronsUpIcon = ({ + size = 16, + className = defaultTailwindCSS, +}: IconProps) => { + return ; +}; + +export const ChevronsDownIcon = ({ + size = 16, + className = defaultTailwindCSS, +}: IconProps) => { + return ; +}; + export const CheckmarkIcon = ({ size = 16, className = defaultTailwindCSS, diff --git a/web/src/components/search/DocumentFeedbackBlock.tsx b/web/src/components/search/DocumentFeedbackBlock.tsx index df076f7cc..a27564f92 100644 --- a/web/src/components/search/DocumentFeedbackBlock.tsx +++ b/web/src/components/search/DocumentFeedbackBlock.tsx @@ -1,5 +1,5 @@ import { PopupSpec } from "../admin/connectors/Popup"; -import { ThumbsDownIcon, ThumbsUpIcon } from "../icons/icons"; +import { ChevronsDownIcon, ChevronsUpIcon } from "../icons/icons"; type DocumentFeedbackType = "endorse" | "reject" | "hide" | "unhide"; @@ -40,20 +40,20 @@ const DocumentFeedback = ({ feedbackType, }: DocumentFeedbackIconProps) => { let icon = null; - const size = 16; + const size = 20; if (feedbackType === "endorse") { icon = ( - ); } if (feedbackType === "reject") { icon = ( - ); } @@ -65,7 +65,6 @@ const DocumentFeedback = ({ return (
{ - console.log("HI"); const errorMsg = await giveDocumentFeedback( documentId, queryId,
- {column.header} - +
+ {column.header} +
+
- {row[column.key]} +
{row[column.key]}