Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mobile budget click handlers #1844

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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