[PR #6378] WIP: Implement mobile calculator keypad functionality and related tests #20838

Closed
opened 2026-04-14 21:46:43 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/actualbudget/actual/pull/6378

State: closed
Merged: No


Add calculator-style keypad for entering amounts on mobile

image

Note

Adds a mobile calculator-style keypad (with arithmetic) for amount entry across transactions, budgets, categories, balances, and account creation, gated by a new feature flag, with accompanying E2E and unit tests.

  • Frontend:
    • Calculator Keypad: Introduces MoneyKeypad modal and useIsMobileCalculatorKeypadEnabled hook to show a calculator-style keypad on mobile.
    • Amount Inputs: Integrates keypad and expression parsing into AmountInput and FocusableAmountInput (localized decimal separator, programmatic focus behavior, blur handling).
    • Transactions: Updates TransactionEdit (child inputs, split support) and mobile page models to open/use keypad; adds keypad-aware selectors (data-testid like amount-display, child-amount-input-*).
    • Budgets/Categories/Balances: Ensures modals dismiss keypad before actions; enables keypad-based amount entry in budget/balance/category menus.
    • Account Creation: CreateLocalAccountModal uses keypad and parseAmountExpression for initial balance.
    • Utilities/Flags: Adds parseAmountExpression, useFeatureFlag support, and new flag flags.mobileCalculatorKeypad in FeatureFlag.
  • Tests:
    • E2E: Enables flag during tests; adds keypad interactions for transactions and budgets; updates mobile page models to drive keypad.
    • Unit: Adds tests for AmountInput keypad behavior and useIsMobileCalculatorKeypadEnabled hook.
  • Release Notes: Adds entry announcing the mobile calculator keypad enhancement.

Written by Cursor Bugbot for commit 250d59d065. This will update automatically on new commits. Configure here.

Summary by CodeRabbit

  • New Features

    • Keypad-driven amount entry added across balance, budget, category and transaction flows; new amount display and split controls for transaction entry.
    • Improved handling to automatically dismiss the on-screen keypad before closing modals or proceeding with actions.
  • Tests

    • Test setup updated to enable the mobile calculator keypad during end-to-end runs.

✏️ Tip: You can customize this high-level summary in your review settings.

**Original Pull Request:** https://github.com/actualbudget/actual/pull/6378 **State:** closed **Merged:** No --- Add calculator-style keypad for entering amounts on mobile <img width="1320" height="2246" alt="image" src="https://github.com/user-attachments/assets/af9be906-c7d6-4b44-acf8-e201f9b1e302" /> <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Adds a mobile calculator-style keypad (with arithmetic) for amount entry across transactions, budgets, categories, balances, and account creation, gated by a new feature flag, with accompanying E2E and unit tests. > > - **Frontend**: > - **Calculator Keypad**: Introduces `MoneyKeypad` modal and `useIsMobileCalculatorKeypadEnabled` hook to show a calculator-style keypad on mobile. > - **Amount Inputs**: Integrates keypad and expression parsing into `AmountInput` and `FocusableAmountInput` (localized decimal separator, programmatic focus behavior, blur handling). > - **Transactions**: Updates `TransactionEdit` (child inputs, split support) and mobile page models to open/use keypad; adds keypad-aware selectors (`data-testid` like `amount-display`, `child-amount-input-*`). > - **Budgets/Categories/Balances**: Ensures modals dismiss keypad before actions; enables keypad-based amount entry in budget/balance/category menus. > - **Account Creation**: `CreateLocalAccountModal` uses keypad and `parseAmountExpression` for initial balance. > - **Utilities/Flags**: Adds `parseAmountExpression`, `useFeatureFlag` support, and new flag `flags.mobileCalculatorKeypad` in `FeatureFlag`. > - **Tests**: > - **E2E**: Enables flag during tests; adds keypad interactions for transactions and budgets; updates mobile page models to drive keypad. > - **Unit**: Adds tests for `AmountInput` keypad behavior and `useIsMobileCalculatorKeypadEnabled` hook. > - **Release Notes**: Adds entry announcing the mobile calculator keypad enhancement. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 250d59d065c5e1072dc3219e3197881949e79047. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Keypad-driven amount entry added across balance, budget, category and transaction flows; new amount display and split controls for transaction entry. * Improved handling to automatically dismiss the on-screen keypad before closing modals or proceeding with actions. * **Tests** * Test setup updated to enable the mobile calculator keypad during end-to-end runs. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
GiteaMirror added the pull-request label 2026-04-14 21:46:43 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#20838