Skip to content

Commit

Permalink
Fix mobile budget click handlers (actualbudget#1844)
Browse files Browse the repository at this point in the history
* Fix mobile budget click handlers

* Release notes
  • Loading branch information
joel-jeremy authored Oct 31, 2023
1 parent a1e5bee commit 4bea54b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ function BudgetCell({
alignItems: 'flex-end',
height: ROW_HEIGHT,
}}
onPointerDown={onAmountClick}
>
<CellValue
binding={binding}
Expand All @@ -170,6 +169,8 @@ function BudgetCell({
}}
getStyle={makeAmountGrey}
data-testid={name}
onPointerUp={onAmountClick}
onPointerDown={e => e.preventDefault()}
/>
</View>
)}
Expand Down Expand Up @@ -370,7 +371,6 @@ const ExpenseCategory = memo(function ExpenseCategory({
</View>
<View
role="button"
onPointerDown={() => onEdit?.(category.id)}
style={{ ...(showEditables && { display: 'none' }), flex: 1 }}
>
<Text
Expand All @@ -379,6 +379,7 @@ const ExpenseCategory = memo(function ExpenseCategory({
...styles.underlinedText,
...styles.lineClamp(2),
}}
onPointerUp={() => onEdit?.(category.id)}
data-testid="category-name"
>
{category.name}
Expand Down Expand Up @@ -438,7 +439,8 @@ const ExpenseCategory = memo(function ExpenseCategory({
>
<span
role="button"
onPointerDown={() => onOpenBudgetActionMenu?.(category.id)}
onPointerUp={() => onOpenBudgetActionMenu?.(category.id)}
onPointerDown={e => e.preventDefault()}
>
<BalanceWithCarryover
carryover={rolloverBudget.catCarryover(category.id)}
Expand Down Expand Up @@ -649,7 +651,6 @@ const ExpenseGroupTotals = memo(function ExpenseGroupTotals({
</View>
<View
role="button"
onPointerDown={() => onEdit?.(group.id)}
style={{ ...(showEditables && { display: 'none' }), flex: 1 }}
>
<Text
Expand All @@ -660,6 +661,7 @@ const ExpenseGroupTotals = memo(function ExpenseGroupTotals({
...styles.lineClamp(2),
fontWeight: '500',
}}
onPointerUp={() => onEdit?.(group.id)}
data-testid="name"
>
{group.name}
Expand Down Expand Up @@ -910,7 +912,6 @@ const IncomeGroupTotals = memo(function IncomeGroupTotals({
alignItems: 'flex-start',
height: ROW_HEIGHT,
}}
onPointerDown={() => onEdit?.(group.id)}
>
<Text
style={{
Expand All @@ -919,6 +920,7 @@ const IncomeGroupTotals = memo(function IncomeGroupTotals({
...styles.lineClamp(2),
fontWeight: '500',
}}
onPointerUp={() => onEdit?.(group.id)}
data-testid="name"
>
{group.name}
Expand Down Expand Up @@ -1106,7 +1108,6 @@ const IncomeCategory = memo(function IncomeCategory({
alignItems: 'flex-start',
height: ROW_HEIGHT,
}}
onPointerDown={() => onEdit?.(category.id)}
>
<Text
tabIndex={-1}
Expand All @@ -1115,6 +1116,7 @@ const IncomeCategory = memo(function IncomeCategory({
...styles.underlinedText,
...styles.lineClamp(2),
}}
onPointerUp={() => onEdit?.(category.id)}
data-testid="name"
>
{category.name}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ function CellValue({
getStyle,
privacyFilter,
'data-testid': testId,
...props
}: CellValueProps) {
let { fullSheetName } = useSheetName(binding);
let sheetValue = useSheetValue(binding);
Expand All @@ -54,6 +55,7 @@ function CellValue({
}}
data-testid={testId || fullSheetName}
data-cellname={fullSheetName}
{...props}
>
{formatter ? formatter(sheetValue) : format(sheetValue, type)}
</Text>
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/1844.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [joel-jeremy]
---

Mobile: Fix mobile budget click handlers

0 comments on commit 4bea54b

Please sign in to comment.