From 61e655e067fc5b45f18294e948340fb0c434be97 Mon Sep 17 00:00:00 2001 From: alexzurbonsen Date: Tue, 13 Feb 2024 17:52:05 +0100 Subject: [PATCH] fix: don't show original license info if signal is of type first party in the attribution column we don't show license info fields (name, text, copyright) if an attribution is first party. Thus, we leave this fields empty in the diff popup as well. We did so for the current attribution already, but not for the original signal since the assumption was that it shouldn't come with such info. But the fields were only removed recently and we still get first party signals with license info. Thus, we also remove them from original signals in the diff popup now. Signed-off-by: alexzurbonsen --- .../Components/DiffPopup/DiffPopup.tsx | 11 ++++++---- .../Components/DiffPopup/DiffPopup.util.tsx | 22 ++++++++++--------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/Frontend/Components/DiffPopup/DiffPopup.tsx b/src/Frontend/Components/DiffPopup/DiffPopup.tsx index 3e8420d65..174ecca7f 100644 --- a/src/Frontend/Components/DiffPopup/DiffPopup.tsx +++ b/src/Frontend/Components/DiffPopup/DiffPopup.tsx @@ -16,7 +16,10 @@ import { import { AttributionForm } from '../AttributionColumn/AttributionForm'; import { NotificationPopup } from '../NotificationPopup/NotificationPopup'; import { DiffPopupContainer } from './DiffPopup.style'; -import { useAttributionFormConfigs } from './DiffPopup.util'; +import { + stripLicenseInfoIfFirstParty, + useAttributionFormConfigs, +} from './DiffPopup.util'; interface DiffPopupProps { original: PackageInfo; @@ -38,8 +41,8 @@ export function DiffPopup({ bufferPackageInfo, setBufferPackageInfo, } = useAttributionFormConfigs({ - original, - current, + original: stripLicenseInfoIfFirstParty(original), + current: stripLicenseInfoIfFirstParty(current), }); function handleApplyChanges({ @@ -120,7 +123,7 @@ export function DiffPopup({ return (