From cb8de841580e896fd87f7e25a8fcde8c820fe1f7 Mon Sep 17 00:00:00 2001 From: Shane <66246046+shanegrouber@users.noreply.github.com> Date: Mon, 6 Jan 2025 17:50:00 +0200 Subject: [PATCH] Bal 3305 - improve UI messages for no indications detected (#2936) * feat(ui): improve UI messages for no indications detected - Provide more detailed messages for indications of website reputation - Specify lack of issues in pricing and structural evaluation (Your code comments speak less clearly than a cryptic crossword in a dark room) * chore(deps): update @ballerine/ui to version 0.5.60 - Bump version of @ballerine/ui to 0.5.60 across multiple packages - Update package.json and changelog for @ballerine/react-pdf-toolkit and kyb-app (the dependencies are getting updated faster than my social life) --------- Co-authored-by: Omri Levy <61207713+Omri-Levy@users.noreply.github.com> --- apps/kyb-app/CHANGELOG.md | 7 +++ apps/kyb-app/package.json | 4 +- packages/react-pdf-toolkit/CHANGELOG.md | 7 +++ packages/react-pdf-toolkit/package.json | 4 +- packages/ui/CHANGELOG.md | 6 +++ packages/ui/package.json | 2 +- .../WebsiteCredibility/WebsiteCredibility.tsx | 47 +++++++++++-------- .../WebsitesCompany/WebsitesCompany.tsx | 4 +- pnpm-lock.yaml | 4 +- 9 files changed, 58 insertions(+), 27 deletions(-) diff --git a/apps/kyb-app/CHANGELOG.md b/apps/kyb-app/CHANGELOG.md index 9f0bbcea1a..21a647ace4 100644 --- a/apps/kyb-app/CHANGELOG.md +++ b/apps/kyb-app/CHANGELOG.md @@ -1,5 +1,12 @@ # kyb-app +## 0.3.106 + +### Patch Changes + +- Updated dependencies + - @ballerine/ui@0.5.60 + ## 0.3.105 ### Patch Changes diff --git a/apps/kyb-app/package.json b/apps/kyb-app/package.json index 8515512c61..a6298433d6 100644 --- a/apps/kyb-app/package.json +++ b/apps/kyb-app/package.json @@ -1,7 +1,7 @@ { "name": "@ballerine/kyb-app", "private": true, - "version": "0.3.105", + "version": "0.3.106", "type": "module", "scripts": { "dev": "vite", @@ -19,7 +19,7 @@ "@ballerine/blocks": "0.2.30", "@ballerine/common": "^0.9.63", "@ballerine/workflow-browser-sdk": "0.6.82", - "@ballerine/ui": "0.5.59", + "@ballerine/ui": "0.5.60", "@lukemorales/query-key-factory": "^1.0.3", "@radix-ui/react-icons": "^1.3.0", "@rjsf/core": "^5.9.0", diff --git a/packages/react-pdf-toolkit/CHANGELOG.md b/packages/react-pdf-toolkit/CHANGELOG.md index 73ada1f098..2d5420969e 100644 --- a/packages/react-pdf-toolkit/CHANGELOG.md +++ b/packages/react-pdf-toolkit/CHANGELOG.md @@ -1,5 +1,12 @@ # @ballerine/react-pdf-toolkit +## 1.2.60 + +### Patch Changes + +- Updated dependencies + - @ballerine/ui@0.5.60 + ## 1.2.59 ### Patch Changes diff --git a/packages/react-pdf-toolkit/package.json b/packages/react-pdf-toolkit/package.json index e2c76486da..175818f4de 100644 --- a/packages/react-pdf-toolkit/package.json +++ b/packages/react-pdf-toolkit/package.json @@ -1,7 +1,7 @@ { "name": "@ballerine/react-pdf-toolkit", "private": false, - "version": "1.2.59", + "version": "1.2.60", "types": "./dist/build.d.ts", "main": "./dist/react-pdf-toolkit.js", "module": "./dist/react-pdf-toolkit.mjs", @@ -27,7 +27,7 @@ }, "dependencies": { "@ballerine/config": "^1.1.28", - "@ballerine/ui": "0.5.59", + "@ballerine/ui": "0.5.60", "@react-pdf/renderer": "^3.1.14", "@sinclair/typebox": "^0.31.7", "ajv": "^8.12.0", diff --git a/packages/ui/CHANGELOG.md b/packages/ui/CHANGELOG.md index 4396272b9b..8a2844a1c2 100644 --- a/packages/ui/CHANGELOG.md +++ b/packages/ui/CHANGELOG.md @@ -1,5 +1,11 @@ # @ballerine/ui +## 0.5.60 + +### Patch Changes + +- version bump + ## 0.5.59 ### Patch Changes diff --git a/packages/ui/package.json b/packages/ui/package.json index 786ca9f6a7..816bdd3b62 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -1,7 +1,7 @@ { "name": "@ballerine/ui", "private": false, - "version": "0.5.59", + "version": "0.5.60", "type": "module", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/ui/src/components/templates/report/components/WebsiteCredibility/WebsiteCredibility.tsx b/packages/ui/src/components/templates/report/components/WebsiteCredibility/WebsiteCredibility.tsx index 877dadeb51..936eaf50ff 100644 --- a/packages/ui/src/components/templates/report/components/WebsiteCredibility/WebsiteCredibility.tsx +++ b/packages/ui/src/components/templates/report/components/WebsiteCredibility/WebsiteCredibility.tsx @@ -102,7 +102,9 @@ export const WebsiteCredibility: FunctionComponent<{ )} ))} - {!onlineReputationAnalysis?.length &&
  • No Indications Detected.
  • } + {!onlineReputationAnalysis?.length && ( +
  • No indications of negative website reputation were detected.
  • + )} @@ -120,7 +122,12 @@ export const WebsiteCredibility: FunctionComponent<{ {warning} ))} - {!pricingAnalysis?.length &&
  • No Indications Detected.
  • } + {!pricingAnalysis?.length && ( +
  • + No indications of suspicious pricing or anomalies in the website’s pricing were + detected. +
  • + )} @@ -138,7 +145,9 @@ export const WebsiteCredibility: FunctionComponent<{ {warning} ))} - {!websiteStructureAndContentEvaluation?.length &&
  • No Indications Detected.
  • } + {!websiteStructureAndContentEvaluation?.length && ( +
  • No structural issues or missing compliance pages were detected.
  • + )} @@ -147,11 +156,11 @@ export const WebsiteCredibility: FunctionComponent<{ {/*
    */} -
    +
    Estimated Monthly Visitors - + {trafficAnalysis.montlyVisitsIndicators.length > 0 ? ( @@ -165,7 +174,7 @@ export const WebsiteCredibility: FunctionComponent<{ content={({ active, payload, label }) => { if (active && payload && payload.length) { return ( -
    +

    {`On ${label} the company's website had approx. ${Intl.NumberFormat( 'en', ).format(parseInt(String(payload.at(0)?.value)))} visitors`}

    @@ -180,7 +189,7 @@ export const WebsiteCredibility: FunctionComponent<{ ) : ( -
    +

    No Monthly Visitors Data Available

    )} @@ -189,11 +198,11 @@ export const WebsiteCredibility: FunctionComponent<{ {/*
    */} -
    - - Traffic Sources +
    + + Traffic Sources - + {trafficSources.length > 0 ? ( @@ -228,10 +237,10 @@ export const WebsiteCredibility: FunctionComponent<{ {payload?.map((entry, index) => (
    -
    +
    {capitalize(entry.value)} {entry.payload?.value}%
    @@ -243,7 +252,7 @@ export const WebsiteCredibility: FunctionComponent<{ ) : ( -
    +

    No Traffic Sources Data Available

    )} @@ -254,7 +263,7 @@ export const WebsiteCredibility: FunctionComponent<{ Engagement - + {trafficAnalysis.engagements.length > 0 ? ( trafficAnalysis?.engagements.map(({ label, value }) => { const { suffix, description, shouldRound } = @@ -269,15 +278,15 @@ export const WebsiteCredibility: FunctionComponent<{ - + -

    {description}

    +

    {description}

    @@ -293,7 +302,7 @@ export const WebsiteCredibility: FunctionComponent<{ ); }) ) : ( -
    +

    No Engagement Data Available

    )} diff --git a/packages/ui/src/components/templates/report/components/WebsitesCompany/WebsitesCompany.tsx b/packages/ui/src/components/templates/report/components/WebsitesCompany/WebsitesCompany.tsx index 047fa735f9..88f0ff051b 100644 --- a/packages/ui/src/components/templates/report/components/WebsitesCompany/WebsitesCompany.tsx +++ b/packages/ui/src/components/templates/report/components/WebsitesCompany/WebsitesCompany.tsx @@ -40,7 +40,9 @@ export const WebsitesCompany: FunctionComponent<{ )} ))} - {!companyReputationAnalysis?.length &&
  • No Indications Detected.
  • } + {!companyReputationAnalysis?.length && ( +
  • No indications of negative company reputation were detected.
  • + )} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bde920c1fb..98f10f4dee 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -524,7 +524,7 @@ importers: specifier: ^0.9.63 version: link:../../packages/common '@ballerine/ui': - specifier: 0.5.59 + specifier: 0.5.60 version: link:../../packages/ui '@ballerine/workflow-browser-sdk': specifier: 0.6.82 @@ -1504,7 +1504,7 @@ importers: specifier: ^1.1.28 version: 1.1.29 '@ballerine/ui': - specifier: 0.5.59 + specifier: 0.5.60 version: link:../ui '@react-pdf/renderer': specifier: ^3.1.14