From acdec072ec1f57155134a52e37a06641bf7c37fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Miko=C5=82ajczyk?= Date: Wed, 20 Mar 2024 14:43:26 +0100 Subject: [PATCH 1/4] oct-1484: donated tooltip --- .../shared/ButtonAddToAllocate/ButtonAddToAllocate.tsx | 5 +++-- client/src/locales/en/translation.json | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/client/src/components/shared/ButtonAddToAllocate/ButtonAddToAllocate.tsx b/client/src/components/shared/ButtonAddToAllocate/ButtonAddToAllocate.tsx index 5ce64bd518..6bff411389 100644 --- a/client/src/components/shared/ButtonAddToAllocate/ButtonAddToAllocate.tsx +++ b/client/src/components/shared/ButtonAddToAllocate/ButtonAddToAllocate.tsx @@ -28,6 +28,7 @@ const ButtonAddToAllocate: FC = ({ const [isTooltipClicked, setIsTooltipClicked] = useState(false); const [isTooltipVisible, setIsTooltipVisible] = useState(false); const tooltipText = useMemo(() => { + if (isArchivedProject) {return t('donated');} if (isAddedToAllocate && isTooltipClicked) { return t('saved'); } @@ -39,7 +40,7 @@ const ButtonAddToAllocate: FC = ({ } return t('saveToAllocate'); // eslint-disable-next-line react-hooks/exhaustive-deps - }, [isAddedToAllocate, isTooltipClicked]); + }, [isAddedToAllocate, isTooltipClicked, isArchivedProject]); const handleTooltipVisibilityChange = (isVisible: boolean) => { setIsTooltipVisible(isVisible); @@ -61,7 +62,7 @@ const ButtonAddToAllocate: FC = ({ Icon={ { if (isTooltipVisible) { setIsTooltipClicked(true); diff --git a/client/src/locales/en/translation.json b/client/src/locales/en/translation.json index 06151e0f4c..75e9768954 100644 --- a/client/src/locales/en/translation.json +++ b/client/src/locales/en/translation.json @@ -73,7 +73,8 @@ "saveToAllocate": "Save to allocate", "saved": "Saved", "removeFromAllocate": "Remove from allocate", - "removed": "Removed" + "removed": "Removed", + "donated": "Donated" }, "rewardsCalculator": { "enterGLMAmount": "Enter a GLM amount", From ab7470fb4233e88fca96fa8ad702cef2cbaa8e61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Miko=C5=82ajczyk?= Date: Wed, 20 Mar 2024 14:44:07 +0100 Subject: [PATCH 2/4] oct-1484: donated tooltip text --- .../shared/ButtonAddToAllocate/ButtonAddToAllocate.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/src/components/shared/ButtonAddToAllocate/ButtonAddToAllocate.tsx b/client/src/components/shared/ButtonAddToAllocate/ButtonAddToAllocate.tsx index 6bff411389..5467305ca2 100644 --- a/client/src/components/shared/ButtonAddToAllocate/ButtonAddToAllocate.tsx +++ b/client/src/components/shared/ButtonAddToAllocate/ButtonAddToAllocate.tsx @@ -28,7 +28,9 @@ const ButtonAddToAllocate: FC = ({ const [isTooltipClicked, setIsTooltipClicked] = useState(false); const [isTooltipVisible, setIsTooltipVisible] = useState(false); const tooltipText = useMemo(() => { - if (isArchivedProject) {return t('donated');} + if (isArchivedProject) { + return t('donated'); + } if (isAddedToAllocate && isTooltipClicked) { return t('saved'); } From 93deffacc027a155456c570bafe6f2de01f2aeaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Miko=C5=82ajczyk?= Date: Wed, 20 Mar 2024 16:00:48 +0100 Subject: [PATCH 3/4] oct-1484: cr fixes --- .../shared/ButtonAddToAllocate/ButtonAddToAllocate.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/components/shared/ButtonAddToAllocate/ButtonAddToAllocate.tsx b/client/src/components/shared/ButtonAddToAllocate/ButtonAddToAllocate.tsx index 5467305ca2..a4ca3ab154 100644 --- a/client/src/components/shared/ButtonAddToAllocate/ButtonAddToAllocate.tsx +++ b/client/src/components/shared/ButtonAddToAllocate/ButtonAddToAllocate.tsx @@ -28,7 +28,7 @@ const ButtonAddToAllocate: FC = ({ const [isTooltipClicked, setIsTooltipClicked] = useState(false); const [isTooltipVisible, setIsTooltipVisible] = useState(false); const tooltipText = useMemo(() => { - if (isArchivedProject) { + if (isArchivedProject && isAllocatedTo) { return t('donated'); } if (isAddedToAllocate && isTooltipClicked) { @@ -42,7 +42,7 @@ const ButtonAddToAllocate: FC = ({ } return t('saveToAllocate'); // eslint-disable-next-line react-hooks/exhaustive-deps - }, [isAddedToAllocate, isTooltipClicked, isArchivedProject]); + }, [isAddedToAllocate, isTooltipClicked, isArchivedProject, isAllocatedTo]); const handleTooltipVisibilityChange = (isVisible: boolean) => { setIsTooltipVisible(isVisible); @@ -64,7 +64,7 @@ const ButtonAddToAllocate: FC = ({ Icon={ { if (isTooltipVisible) { setIsTooltipClicked(true); From 870bb4d2d82961d1355cb818ebb4c0a00984c7f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrzej=20Zi=C3=B3=C5=82ek?= Date: Fri, 22 Mar 2024 10:44:42 +0100 Subject: [PATCH 4/4] OCT-1493 Adjust margin of InputText suffix to 8px (#93) --- client/src/components/ui/InputText/InputText.module.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/ui/InputText/InputText.module.scss b/client/src/components/ui/InputText/InputText.module.scss index b915273dd5..8905c60324 100644 --- a/client/src/components/ui/InputText/InputText.module.scss +++ b/client/src/components/ui/InputText/InputText.module.scss @@ -89,7 +89,7 @@ font-size: $font-size-18; &.hasSuffix { - padding: 0 5.2rem 0 2.8rem; + padding: 0 5.5rem 0 2.8rem; } } }