Spaces:
Running
Running
Commit ·
cf8b1de
1
Parent(s): 90fca67
Fix adapter method links not clickable by using MUI Link component
Browse filesReplace Typography-based cell renderer with Link + Tooltip pattern
(matching the architecture column) so PEFT doc links are clickable.
frontend/src/pages/LeaderboardPage/components/Leaderboard/utils/columnUtils.js
CHANGED
|
@@ -1040,29 +1040,25 @@ export const createColumns = (
|
|
| 1040 |
cell: ({ row }) => {
|
| 1041 |
const method = row.original.metadata.adapter_method || "-";
|
| 1042 |
const peftUrl = PEFT_DOCS_URLS[method.toLowerCase()];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1043 |
return (
|
| 1044 |
<Tooltip title={method}>
|
| 1045 |
-
<
|
| 1046 |
-
variant="body2"
|
| 1047 |
-
component={peftUrl ? "a" : "span"}
|
| 1048 |
-
{...(peftUrl && {
|
| 1049 |
-
href: peftUrl,
|
| 1050 |
-
target: "_blank",
|
| 1051 |
-
rel: "noopener noreferrer",
|
| 1052 |
-
})}
|
| 1053 |
-
sx={{
|
| 1054 |
-
overflow: "hidden",
|
| 1055 |
-
textOverflow: "ellipsis",
|
| 1056 |
-
whiteSpace: "nowrap",
|
| 1057 |
-
...(peftUrl && {
|
| 1058 |
-
color: "primary.main",
|
| 1059 |
-
textDecoration: "none",
|
| 1060 |
-
"&:hover": { textDecoration: "underline" },
|
| 1061 |
-
}),
|
| 1062 |
-
}}
|
| 1063 |
-
>
|
| 1064 |
-
{method}
|
| 1065 |
-
</Typography>
|
| 1066 |
</Tooltip>
|
| 1067 |
);
|
| 1068 |
},
|
|
|
|
| 1040 |
cell: ({ row }) => {
|
| 1041 |
const method = row.original.metadata.adapter_method || "-";
|
| 1042 |
const peftUrl = PEFT_DOCS_URLS[method.toLowerCase()];
|
| 1043 |
+
if (peftUrl) {
|
| 1044 |
+
return (
|
| 1045 |
+
<Tooltip title={`${method} — view PEFT docs`}>
|
| 1046 |
+
<Link
|
| 1047 |
+
href={peftUrl}
|
| 1048 |
+
target="_blank"
|
| 1049 |
+
rel="noopener noreferrer"
|
| 1050 |
+
underline="hover"
|
| 1051 |
+
sx={{ display: "inline-flex", alignItems: "center", gap: 0.5 }}
|
| 1052 |
+
>
|
| 1053 |
+
{method}
|
| 1054 |
+
<OpenInNewIcon sx={{ fontSize: 12, opacity: 0.5 }} />
|
| 1055 |
+
</Link>
|
| 1056 |
+
</Tooltip>
|
| 1057 |
+
);
|
| 1058 |
+
}
|
| 1059 |
return (
|
| 1060 |
<Tooltip title={method}>
|
| 1061 |
+
<span>{method}</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1062 |
</Tooltip>
|
| 1063 |
);
|
| 1064 |
},
|