From 048e1b2f571b98a54a49e7bff14c5ab83c04ca39 Mon Sep 17 00:00:00 2001 From: Jon Bell Date: Fri, 12 Aug 2022 15:53:37 +1200 Subject: [PATCH] Standardise testsuite icons and make them more accessible for color-blindness (#7530) * Iteration one of getting better icons for accessibility * Hover effect * Additional color tweaks * Final tweaks to colors --- src/ui/components/Account/index.tsx | 2 +- .../Team/View/TestResults/TestResultRow.tsx | 6 ++-- .../TestRuns/Overview/TestResultListItem.tsx | 31 ++++++++++++------- .../Library/Team/View/TestRuns/RunStats.tsx | 4 +-- .../Team/View/TestRuns/TestRunListItem.tsx | 2 +- tailwind.config.js | 3 ++ 6 files changed, 29 insertions(+), 19 deletions(-) diff --git a/src/ui/components/Account/index.tsx b/src/ui/components/Account/index.tsx index 7ef23d42c5d..93d3aa55258 100644 --- a/src/ui/components/Account/index.tsx +++ b/src/ui/components/Account/index.tsx @@ -29,5 +29,5 @@ export default function Account() { return ; } - return ; + return ; } diff --git a/src/ui/components/Library/Team/View/TestResults/TestResultRow.tsx b/src/ui/components/Library/Team/View/TestResults/TestResultRow.tsx index db3ea94887c..dfcd936d354 100644 --- a/src/ui/components/Library/Team/View/TestResults/TestResultRow.tsx +++ b/src/ui/components/Library/Team/View/TestResults/TestResultRow.tsx @@ -23,11 +23,11 @@ function Status({ test }: { test: TestMetadata }) { outlined className={ test.result === "passed" - ? "text-green-500 group-hover:text-green-700" + ? "text-green-500 group-hover:text-green-400" : "text-red-500 group-hover:text-red-700" } > - play_circle + {test.result === "passed" ? "play_circle_filled" : "play_circle" } ); } @@ -71,7 +71,7 @@ export default function TestResultRow({ recording }: { recording: Recording }) { target="_blank" >
diff --git a/src/ui/components/Library/Team/View/TestRuns/Overview/TestResultListItem.tsx b/src/ui/components/Library/Team/View/TestRuns/Overview/TestResultListItem.tsx index acc4d7f5e97..372afe081ce 100644 --- a/src/ui/components/Library/Team/View/TestRuns/Overview/TestResultListItem.tsx +++ b/src/ui/components/Library/Team/View/TestRuns/Overview/TestResultListItem.tsx @@ -7,23 +7,30 @@ import styles from "../../../../Library.module.css"; function ViewReplay({ passed }: { passed: boolean }) { return ( - - play_circle - + + e.stopPropagation()} + > + + {passed ? "play_circle_filled" : "play_circle" } + + + ); } function Title({ recording }: { recording: Recording }) { return ( -
+
{recording.metadata?.test?.title}
{recording.metadata?.test?.file}
diff --git a/src/ui/components/Library/Team/View/TestRuns/RunStats.tsx b/src/ui/components/Library/Team/View/TestRuns/RunStats.tsx index 7788b2a185a..d89dfac4210 100644 --- a/src/ui/components/Library/Team/View/TestRuns/RunStats.tsx +++ b/src/ui/components/Library/Team/View/TestRuns/RunStats.tsx @@ -19,8 +19,8 @@ export function RunStats({ testRun }: { testRun: TestRun }) { return (
- {failed > 0 && } - {failed == 0 && passed > 0 && } + {failed > 0 && } + {failed == 0 && passed > 0 && }
); } diff --git a/src/ui/components/Library/Team/View/TestRuns/TestRunListItem.tsx b/src/ui/components/Library/Team/View/TestRuns/TestRunListItem.tsx index bc0b958e7f6..d42dc7ea734 100644 --- a/src/ui/components/Library/Team/View/TestRuns/TestRunListItem.tsx +++ b/src/ui/components/Library/Team/View/TestRuns/TestRunListItem.tsx @@ -45,7 +45,7 @@ function Attributes({ testRun }: { testRun: TestRun }) { function Status({ failCount }: { failCount: number }) { return (
0 ? "text-red-500" : "text-green-500"} `}> - {`${failCount > 0 ? "cancel" : "check"} `} + {`${failCount > 0 ? "highlight_off" : "check_circle"} `}
); } diff --git a/tailwind.config.js b/tailwind.config.js index a394eafe2d2..6dfb6992842 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -71,6 +71,9 @@ module.exports = { cursor: { "ew-resize": "ew-resize", }, + borderWidth: { + '3': '2.5px', + } }, }, plugins: [require("@tailwindcss/forms")],