diff --git a/islands/ReportTable.tsx b/islands/ReportTable.tsx index 762bf83..ad2881a 100644 --- a/islands/ReportTable.tsx +++ b/islands/ReportTable.tsx @@ -238,16 +238,11 @@ export function ReportTable(props: { class?: string; report: DayReport }) { class="text-xs py-2 whitespace-nowrap sm:overflow-visible overflow-scroll px-3" > - - {testName} - + @@ -361,7 +356,34 @@ function useCopyState(text: string) { return [copied, copy] as const; } -function CommandTooltip(props: { path: string; useNodeTest?: boolean }) { +function getShortTestName(testName: string): string { + return testName.replace(/^[^/]*\//, ""); +} + +function CopyableTestName({ testName }: { testName: string }) { + const shortName = getShortTestName(testName); + const [copied, copy] = useCopyState(shortName); + return ( + + ); +} + +function CommandTooltip( + props: { path: string; nodeVersion?: string; useNodeTest?: boolean }, +) { const [useDev, setUseDev] = useState(false); const denoPath = useDev ? "./target/debug/deno" : "deno"; const denoSubcommand = props.useNodeTest ? "test" : "run"; @@ -430,6 +452,17 @@ function CommandTooltip(props: { path: string; useNodeTest?: boolean }) {
         {props.path}
       
+ {props.nodeVersion && ( +

+ + View source on GitHub + +

+ )} ); }