From bbc123c3b845b56d62ebca6a9cdd36fe39b49a8b Mon Sep 17 00:00:00 2001
From: Tyler Marshall <tyler@dovetaildigital.ca>
Date: Tue, 21 May 2024 07:28:48 -0700
Subject: [PATCH] fix: move rollover arrow into view (#2774)

* fix: move rollover arrow into view

ref: https://github.com/actualbudget/actual/issues/2757

* fix: adds isNarrowWidth for responsive arrow

* ci: fix lint

* fix: update category name
---
 .../src/components/budget/BalanceWithCarryover.tsx          | 6 +++++-
 upcoming-release-notes/2774.md                              | 6 ++++++
 2 files changed, 11 insertions(+), 1 deletion(-)
 create mode 100644 upcoming-release-notes/2774.md

diff --git a/packages/desktop-client/src/components/budget/BalanceWithCarryover.tsx b/packages/desktop-client/src/components/budget/BalanceWithCarryover.tsx
index 2db27cbe1..0dc58ae17 100644
--- a/packages/desktop-client/src/components/budget/BalanceWithCarryover.tsx
+++ b/packages/desktop-client/src/components/budget/BalanceWithCarryover.tsx
@@ -3,6 +3,7 @@ import React, { type ComponentProps } from 'react';
 
 import { useFeatureFlag } from '../../hooks/useFeatureFlag';
 import { SvgArrowThinRight } from '../../icons/v1';
+import { useResponsive } from '../../ResponsiveProvider';
 import { type CSSProperties } from '../../style';
 import { View } from '../common/View';
 import { CellValue } from '../spreadsheet/CellValue';
@@ -33,6 +34,9 @@ export function BalanceWithCarryover({
   const goalValue = useSheetValue(goal);
   const budgetedValue = useSheetValue(budgeted);
   const isGoalTemplatesEnabled = useFeatureFlag('goalTemplatesEnabled');
+
+  const { isNarrowWidth } = useResponsive();
+
   return (
     <>
       <CellValue
@@ -60,7 +64,7 @@ export function BalanceWithCarryover({
             alignSelf: 'center',
             marginLeft: 2,
             position: 'absolute',
-            right: -8,
+            right: isNarrowWidth ? '-8px' : '-4px',
             top: 0,
             bottom: 0,
             justifyContent: 'center',
diff --git a/upcoming-release-notes/2774.md b/upcoming-release-notes/2774.md
new file mode 100644
index 000000000..1b83cd958
--- /dev/null
+++ b/upcoming-release-notes/2774.md
@@ -0,0 +1,6 @@
+---
+category: Bugfix
+authors: [Tigatok]
+---
+
+Move the rollover arrow into view.
-- 
GitLab