Skip to content

fix(amount): read the Dash symbol after a balance or entered amount as the currency - #92

Merged
romchornyi merged 1 commit into
dashpay:masterfrom
romchornyi-pitcrew:fix/amount-symbol-labels
Dec 4, 2026
Merged

romchornyi merged 1 commit into
dashpay:masterfrom
romchornyi-pitcrew:fix/amount-symbol-labels

Conversation

@romchornyi-pitcrew

Copy link
Copy Markdown
Contributor

Issue being fixed or feature implemented

Part of #38. Follows #91, which made DashAmount read as "1.5 Dash". Two more components draw the Dash symbol after a figure, and VoiceOver still read the symbol by its asset name. Measured on master by walking the accessibility tree the way VoiceOver does:

Component Read before Read after
DashBalanceView "1.5", "icon_dash_currency", "$ 150.00" "1.5 Dash", "$ 150.00"
SwapAmountView with showDashLogo "1.5", "enter-amount-dash", "150.00" "1.5 Dash", "150.00"

What was done?

  • DashAmount.spokenAmount(_:) holds the spoken format ("%@ Dash", localizable), and an internal modifier dashAmountAccessibility(_:showsSymbol:) makes a figure followed by the symbol one element with that label.
  • DashBalanceView uses it for its balance; SwapAmountView for the primary amount, the secondary amount and the swap-animation row, each only while its Dash logo is shown. Rows without the logo read as before.
  • docs/foundation.md lists the two components next to DashAmount.

No public API change.

How Has This Been Tested?

  • The before/after table above, from a throwaway app on the iPhone 17 simulator, iOS 26.5. The secondary amount with the Dash logo did not render in that measurement; it goes through the same modifier.
  • VoiceOverLabelTests pins the spoken format; the whole suite and conventions.sh pass.

Before / After

  • No visual change (refactor, tests, docs). Say why in "What was done?".

Only accessibility changes; nothing is drawn differently.

Breaking Changes

None in the API. VoiceOver reads these amounts with their currency instead of an asset name.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

🤖 Generated with Claude Code

…s the currency

DashBalanceView and SwapAmountView read the figure and the currency as one element, "1.5 Dash", like DashAmount, instead of the figure and the symbol's asset name. Part of dashpay#38.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@coderabbitai

coderabbitai Bot commented Dec 4, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@romchornyi romchornyi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No blockers, no major, nothing open — reviewed at 41deb3ad54

Level Verdict
1 · Idea ✅ valid DashBalanceView and SwapAmountView still read the Dash symbol by its asset name after the figure (#38).
2 · Architecture ✅ right layer One spoken format, DashAmount.spokenAmount, reached through one internal modifier.
3 · Completeness ✅ complete The balance and all three SwapAmountView places (primary, secondary, the swap-animation row); rows without the Dash logo are unchanged.
4 · Code ✅ clean children: .ignore sits on the figure-and-symbol stack, not on an input, and the amount row's .combine button picks up the new label.
Review details

Levels 1–3 and the code read at this head. Not checked with VoiceOver on a device; the secondary amount with the Dash logo goes through the same modifier, as the description says.

🤖 Reviewed with Claude Code

@romchornyi
romchornyi merged commit 34805cd into dashpay:master Dec 4, 2026
9 checks passed
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.

2 participants