Repository navigation
fix(ui): label main tab bar items - #1080
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe tab bar now provides localized accessibility labels and stable identifiers through a shared item factory. Screenshot UI tests query the menu and home tabs as buttons. ChangesTab bar accessibility
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change adds localized labels and stable selectors to the existing main tab bar while preserving its visual layout and behavior; no actionable merge-blocking risk remains beyond normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
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. Comment |
romchornyi
left a comment
There was a problem hiding this comment.
The refactor itself is clean and I found no correctness problem in it. tabBarItem(image:selectedImage:) reproduces the previous per-tab construction exactly — same title: nil, same imageInsets, same images — and since makePaymentTabImage() returns a non-optional UIImage the ?? icon fallbacks never fire, so the payment tab keeps its rendered blue circle. All five enum cases exist unconditionally, so the new switches compile under both schemes.
The screenshot-test change is a real fix rather than a cosmetic one: tabbar_home_button and tabbar_menu_button were referenced by the test but set nowhere in the tree, so those taps were dead before this PR.
What I'd push back on is the localization claim in the PR body. I checked all 43 catalogs on develop:
| key | in catalogs | value still English |
|---|---|---|
Payments |
0 / 43 | — |
More |
0 / 43 | — |
Dash Wallet |
43 / 43 | 26 |
Contacts |
43 / 43 | 22 |
Explore |
43 / 43 | 22 |
So two of the five tab labels are not "already translated across every bundled locale" — those keys are absent from every catalog, and NSLocalizedString falls back to the key, giving an English VoiceOver label in every language. Of the three that do exist, about half the catalogs still hold the English string.
And the Chinese case is worse than the counts suggest — details inline.
None of this is a blocker: an English VoiceOver label beats no label at all, which is what ships today. But the description shouldn't claim coverage that isn't there, and Payments / More need to reach Transifex before this is actually done.
One more, as a maintainer question rather than a finding: labelling the Home tab "Dash Wallet" makes VoiceOver announce the app name where the other four announce a destination. The PR body says that's deliberate; "Home" would be the consistent choice.
🤖 Reviewed with Claude Code
| case .contacts: | ||
| return NSLocalizedString("Contacts", comment: "Main tab bar") | ||
| case .payment: | ||
| return NSLocalizedString("Payments", comment: "Main tab bar") |
There was a problem hiding this comment.
"Payments" exists in none of the 43 Localizable.strings catalogs, and neither does "More" below. NSLocalizedString returns the key when it finds no entry, so both tabs get an English VoiceOver label in every language — including the ones where the other three tabs are properly translated.
They also need a bartycrouch / Transifex round-trip before translators ever see them.
| var accessibilityLabel: String { | ||
| switch self { | ||
| case .home: | ||
| return NSLocalizedString("Dash Wallet", comment: "Main tab bar: Home") |
There was a problem hiding this comment.
Worth knowing before this ships: for Chinese, the folders iOS actually resolves hold the English string, while the translations sit in the legacy folders.
zh.lproj "Explore" = "探索";
zh-Hans.lproj "Explore" = "Explore";
zh_TW.lproj "Explore" = "瀏覽";
zh-Hant-TW.lproj "Explore" = "Explore";
That split is pre-existing and not this PR's doing, but this PR is what makes it audible — a Chinese VoiceOver user will hear English tab labels even though a translation exists in the bundle.
|
Correction to my review above — the localization table in it is wrong, and I'd rather flag that before anyone acts on it. I measured against a working tree that still had BartyCrouch's build output in it, so the catalogs I read were not what is on
So the keys are not missing — my "0 / 43" for The substance of the finding survives in a different form: And I was wrong to drop the point about reused keys — those values are real, and they were authored for other screens: Because the keys are shared with the DashSpend / shortcut / menu call sites, they can't be re-translated for the tab bar without changing the wording in those places too. Distinct keys would be needed if the tab labels are meant to read naturally. The Chinese point in my inline comment stands as written — Everything I said about the code itself is unaffected. 🤖 Reviewed with Claude Code |
romchornyi
left a comment
There was a problem hiding this comment.
Approving the code — I found no correctness problem in it, and the screenshot-test change is a genuine fix rather than a rename: tabbar_home_button and tabbar_menu_button were referenced by the test but set nowhere in the tree, so those two taps were dead before this PR.
The localization points from my review and its correction are real but they are not code defects, and neither is mine to decide:
"Payments"is present in all 43 catalogs and translated in none, so that tab announces English in every language."More"and"Explore"are shared with the DashSpend / shortcut / menu call sites, and their existing translations were authored for those: ja"More" = "追加"("add"), ko"More" = "더 알아보기"("Learn more"), ja"Explore" = "探求する"(the verb). Re-translating them for the tab bar would change the wording in those other places, so tab-specific keys would be needed instead.
Either is a product call: ship English labels now and fix the strings separately, or introduce distinct keys first. Worth deciding deliberately rather than by default, since VoiceOver is the only surface that reads them.
🤖 Reviewed with Claude Code
Issue being fixed or feature implemented
The icon-only main tab bar items had no accessibility labels because their visible titles are intentionally
nil. Only the Payments item had an automation identifier, leaving Home, Contacts, Explore, and More without stable UI-test selectors.What was done?
UITabBarItemcreation for all five main tabs.How Has This Been Tested?
developbranch.0227fdf5a0c250a38f75b32fa7f8ba3f016e014awith thedashpayscheme for an iPhone 17 Pro simulator running iOS 26.5.org.dashfoundation.dash; verified the process remained alive after stabilization and inspected the captured launch screenshot.git diff --checkand verified the signed commit.Breaking Changes
None.
Checklist:
For repository code-owners and collaborators only
This pull request was created by Codex.
Summary by CodeRabbit