Skip to content

feat: add calculator v61 app & os widget#942

Draft
ovitrif wants to merge 1 commit into
masterfrom
feat/calculator-widget-v61
Draft

feat: add calculator v61 app & os widget#942
ovitrif wants to merge 1 commit into
masterfrom
feat/calculator-widget-v61

Conversation

@ovitrif
Copy link
Copy Markdown
Collaborator

@ovitrif ovitrif commented May 15, 2026

Fixes #937

Refreshes the Bitcoin Calculator widget for the v6.1 widget design and brings it into the Android OS widget system.

Description

  • Updates the in-app calculator widget to the v6.1 treatment, matching the current widget surface, spacing, focus, and input patterns used by the other refreshed widgets.
  • Adds Android home screen calculator widgets for the compact and wide variants, including launcher picker previews and tap-to-open behavior.
  • Replaces the old calculator text entry behavior with the Bitkit number pad flow: localized decimal entry, stable grouping, delete behavior, cursor styling, fractional zero placeholder, and red invalid-key feedback.
  • Polishes calculator focus and dismissal behavior on the app home screen so the number pad, bottom tab bar, scrolling, and navigation bar insets behave together.
  • Adds the user-facing changelog fragment for the calculator widget refresh.

Design refs:

Related test PR:

Preview

OS Widget In-App Widget
OS widget picker, OS home screen widget, and tap-to-open behavior. In-app widget, Numberpad, focus, dismissal, formatting, and tab-bar autohide.
calc_os.mp4
calc_app.mp4

QA Notes

Manual Tests

Dev verified locally:

  • Added the calculator widget to the app home screen and verified the v6.1 card renders correctly in idle and focused states.
  • Focused both Bitcoin and fiat inputs and verified Bitkit's number pad opens instead of the Android soft keyboard.
  • Typed multi-digit Bitcoin and fiat values and verified the cursor stays at the end of the visible value.
  • Verified Bitcoin grouping uses the same space-separated style as Bitkit amount views.
  • Verified fiat grouping uses normal amount formatting without the unwanted space after separators.
  • Verified deleting a digit from a grouped fiat value keeps the remaining value and converted Bitcoin value stable.
  • Verified decimal entry uses the localized decimal key and does not show both comma and period options.
  • Verified fiat one-decimal input shows the dimmed trailing zero placeholder without layout jump.
  • Verified invalid number-pad input gives red button-text feedback through the number pad error state.
  • Verified tapping outside the calculator collapses the number pad smoothly.
  • Verified the bottom tab bar hides and returns in sync with the number pad animation.
  • Verified the center scan button does not flash as highlighted while the tab bar moves.
  • Verified the calculator remains visible when the lower fiat input is focused near the bottom of the widget list.
  • Verified the number pad leaves room for the Android gesture navigation handle.
  • Verified scrolling gestures around the focused calculator do not unexpectedly dismiss the number pad.
  • Verified tapping the app menu or moving away from the focused calculator dismisses the number pad.
  • Verified the Android widget picker preview uses the expected widget background and row sizing.
  • Verified the Android home screen calculator widget has balanced vertical spacing in compact and wide sizes.
  • Verified tapping the Android home screen widget opens Bitkit without auto-focusing the calculator input.

Reviewer / QA requested:

  • 1. Add the calculator widget inside Bitkit and check idle, focused Bitcoin input, and focused fiat input states.
  • 2. Enter and delete large Bitcoin and fiat amounts, especially values above 1,000, to confirm grouping and cursor behavior.
  • 3. Check decimal behavior on a device locale that uses comma decimals and one that uses period decimals.
  • 4. Focus the bottom input when the calculator is low in the app home widget list and confirm the number pad remains usable above the system navigation handle.
  • 5. Tap outside the calculator and confirm the number pad collapse and bottom tab bar return animate together.
  • 6. Repeat focus and dismiss several times and confirm the scan button does not appear highlighted during tab bar movement.
  • 7. Add compact and wide calculator widgets from the Android widget picker and compare picker previews with the actual home screen widgets.
  • 8. Tap the Android home screen calculator widget and confirm it opens Bitkit without automatically focusing an input.

Automated Checks

  • Local: ./gradlew compileDevDebugKotlin
  • Local: ./gradlew testDevDebugUnitTest
  • Local: ./gradlew detekt

Notes:

  • More automated tests to be added in stacked PR.

@ovitrif ovitrif self-assigned this May 16, 2026
@ovitrif ovitrif added this to the 2.3.0 milestone May 16, 2026
fix: simplify scan button highlight
fix: keep tab bar fully opaque
fix: keep tab bar opaque on exit
fix: sync calculator tab bar transition
fix: align fiat placeholder text
fix: place cursor before placeholder
fix: shrink calculator widget preview rows
fix: show fiat decimal placeholder
chore: fix naming agent rules
fix: match calculator cursor style
fix: show calculator input cursor
fix: animate tab bar visibility
refactor: apply naming agent rules
refactor: isolate calculator numpad state
fix: open app from calculator widget
fix: flash calculator numpad errors
refactor: extract private calculator numpad
chore: update detekt command in docs
fix: calculator numberpad bottom see-through
refactor: extract MoneyType model
fix: highlight calculator input bg instead of border
fix: animate calculator pad collapse
fix: remove calculator pad divider
fix: center calculator os widget
fix: refine calculator gestures
fix: polish calculator input
fix: dismiss calculator on outside tap
fix: open calculator from os widget
fix: align calculator preview color
fix: group calculator fiat display
fix: lock calculator widget scroll
fix: hide tab bar during calculator input
fix: normalize calculator fiat input
fix: avoid grouped calculator fiat
fix: use calculator number pad
fix: show calculator widget preview
fix: handle calculator keyboard
fix: use calculator input masks
@ovitrif ovitrif force-pushed the feat/calculator-widget-v61 branch from 48aa6fa to 2183e5d Compare May 16, 2026 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Polish Calculator Widget Fiat Input

1 participant