feat: calculator widget v61 + OS widget#554
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6c2d065d16
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| CalculatorHomeScreenWidgetEntryView(entry: entry) | ||
| } | ||
| .configurationDisplayName("widgets__calculator__name") | ||
| .description("widgets__calculator__description") |
There was a problem hiding this comment.
Use a static calculator widget description
The home-screen widget gallery cannot perform the app's t(..., variables:) substitution here, but widgets__calculator__description is the in-app string that contains {fiatSymbol}. As a result, when users add the new Calculator OS widget from the iOS widget gallery, the description is shown with the literal {fiatSymbol} placeholder instead of a real currency symbol or generic text.
Useful? React with 👍 / 👎.
Description
This PR:
Mirrors the v61 calculator app and OS widget work from bitkit-android#942.
Linked Issues/Tasks
N/A
Screenshot / Video
VIDEO_1
QA Notes
Manual Tests
regression:Settings → General → Default Unit → switch Modern/Classic: Calculator preserves the Bitcoin amount while changing denomination formatting.Automated Checks
BitkitTests/CalculatorWidgetTests.swiftcovers calculator grouping, decimal placeholder behavior, number-pad delete/decimal caps, localized comma input normalization, symbol shortening, and classic BTC-to-sats conversion.swiftformat Bitkit/Models/CalculatorWidgetData.swift Bitkit/Services/Widgets/CalculatorHomeScreenWidgetOptionsStore.swift Bitkit/Components/Widgets/CalculatorWidget.swift Bitkit/Components/NumberPad.swift Bitkit/Views/Widgets/CalculatorWidgetPreviewView.swift BitkitWidget/CalculatorHomeScreenWidget.swift BitkitTests/CalculatorWidgetTests.swift Bitkit/Models/Currency.swift Bitkit/MainNavView.swift BitkitWidget/BitkitWidget.swiftnode scripts/validate-translations.jsxcodebuild -workspace Bitkit.xcodeproj/project.xcworkspace -scheme Bitkit -configuration Debug -destination 'platform=iOS Simulator,name=iPhone 16 Pro,OS=18.5' buildxcodebuild -workspace Bitkit.xcodeproj/project.xcworkspace -scheme Bitkit -configuration Debug -destination 'platform=iOS Simulator,id=8E6C558B-8483-4237-920D-C16B69D61B51,arch=arm64' -only-testing:BitkitTests/CalculatorWidgetTests build-for-testingLDKNodeFFI.frameworkbuild artifact stub from DerivedData, then launchedto.bitkitsuccessfully.xcodebuild ... -only-testing:BitkitTests/CalculatorWidgetTests testcompiled but could not execute because simulator app installation failed on the existingLDKNodeFFI.frameworkstatic-framework bundle stub.