From ef1f72df0ef570b31c639ed20e96619c2ac4867b Mon Sep 17 00:00:00 2001 From: itayox <111698101+itayox@users.noreply.github.com> Date: Sun, 13 Aug 2023 00:40:32 +0300 Subject: [PATCH] 72 change score to risk (#73) * Change score to risk * Remove auto focus from tabs * Add autofocus to snippet text area * Add autofocus to repository input field * Highlight resource type in report header * Update changelog * Remove commented out code --------- Co-authored-by: Nicolas Vuillamy --- CHANGELOG.md | 4 ++++ .../analysis/components/AnalysisInputForm.tsx | 1 - .../analysis/components/CodeSnippetForm.tsx | 1 + .../analysis/components/RepositoryForm.tsx | 1 + .../report/components/header/ReportHeader.tsx | 19 +++++++++++++++++-- .../src/report/components/header/Score.tsx | 4 ++-- 6 files changed, 25 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f3b56dc..58e9dc1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,10 @@ _Can be run using `npm run codetotal:beta`_ - Add missing icon for Java - Show language only if it's available - Detect language for file analysis + - Change score to risk + - Remove auto focus from analysis tabs + - Add auto focus to snippet & repo inputs + - Highlight resource type in report header - Back-End - Bug fix: SBOM packages not showing up in report page. Async parsing of packages information in SBOM module diff --git a/packages/app/src/analysis/components/AnalysisInputForm.tsx b/packages/app/src/analysis/components/AnalysisInputForm.tsx index ee52efd..19afa01 100644 --- a/packages/app/src/analysis/components/AnalysisInputForm.tsx +++ b/packages/app/src/analysis/components/AnalysisInputForm.tsx @@ -38,7 +38,6 @@ export const AnalysisInputForm: FC = ({ variant="fullWidth" > = ({ onSubmit }) => { return (
= ({ onSubmit }) => {
= ({ ready }) => { style={{ color }} data-cy="report-header" > - {linters.length === 0 && <>Scanning {resourceType}...} + {linters.length === 0 && ( + <> + Scanning + +  {resourceType}  + + ... + + )} {linters.length > 0 && ( <> {lintersWithIssuesCount} / {linters.length} security linters - flagged this {resourceType} to have security issues + flagged this + +  {resourceType}  + + to have security issues )} @@ -155,6 +167,9 @@ const useStyles = makeStyles()((theme: Theme) => ({ maxWidth: 600, whiteSpace: "nowrap", }, + resourceTypeText: { + fontWeight: 300, + }, })); interface ReportBannerProps { diff --git a/packages/app/src/report/components/header/Score.tsx b/packages/app/src/report/components/header/Score.tsx index 4387640..7ce0252 100644 --- a/packages/app/src/report/components/header/Score.tsx +++ b/packages/app/src/report/components/header/Score.tsx @@ -73,7 +73,7 @@ export const Score: FC = ({ color="text.secondary" className={classes.label} > - Score + Risk
)} @@ -101,7 +101,7 @@ const useStyles = makeStyles()((theme: Theme) => ({ }, countUp: { fontSize: 20, - [theme.breakpoints.up("sm")]: { + [theme.breakpoints.up("md")]: { fontSize: 35, }, fontWeight: 700,