REF: continue transition to native bar items#8749
Conversation
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
…ve header items (#8745)
There was a problem hiding this comment.
Pull request overview
This PR refactors how multiple screens provide header-right actions by shifting from navigation.setOptions(...) to route-param–driven header configuration (setParams) and adds support utilities for iOS 26 native header menu items (unstable_header*Items). It also includes a small locale-switch fix and a new unit test.
Changes:
- Migrate several screens to set header options via route params (
setParams) and extend param lists to carryheaderRightandunstable_headerRightItems. - Introduce
mapActionsToNativeHeaderMenuItemsto reuse existingAction[]definitions for iOS 26 native header menus. - Fix missing
breakstatements in the locale switch for multiple languages.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/add-wallet-stack.test.ts | Adds a unit test covering keyboard-dismiss + menu-state toggle behavior for ImportWallet header menu. |
| screen/wallets/WalletTransactions.tsx | Avoids overriding header actions when updating scrolled header options by stripping header action keys. |
| screen/wallets/MultisigAdvanced.tsx | Switches headerRight injection from setOptions to route params. |
| screen/wallets/ImportWallet.tsx | Moves advanced menu state to route params (instead of component state) and removes per-screen headerRight setup. |
| screen/wallets/addMultisigStep2.tsx | Switches headerRight injection from setOptions to route params. |
| screen/wallets/Add.tsx | Switches headerRight/statusBarStyle injection from setOptions to route params. |
| screen/settings/ElectrumSettings.tsx | Switches headerRight injection from setOptions to route params. |
| screen/send/SendDetails.tsx | Adds iOS 26 native menu items and switches header config to route params. |
| screen/send/create.tsx | Switches headerRight injection from setOptions to route params. |
| screen/send/Confirm.tsx | Switches headerRight injection from setOptions to route params. |
| screen/send/CoinControl.tsx | Adds iOS 26 native menu items and switches header config to route params. |
| navigation/SendDetailsStackParamList.ts | Adds unstable_headerRightItems to relevant route params. |
| navigation/SendDetailsStack.tsx | Enables route-param mapping for unstable_headerRightItems in Send stack screens. |
| navigation/DetailViewStackParamList.ts | Adds headerRight + unstable_headerRightItems to WalletTransactions route params. |
| navigation/DetailViewScreensStack.tsx | Refactors ReceiveDetails screen options and adjusts iOS26 header items usage. |
| navigation/AddWalletStack.tsx | Introduces createAddWalletOptions/createImportWalletOptions with native header menu support. |
| loc/index.ts | Adds missing break statements and documents intentional fallthrough cases. |
| components/navigationStyle.tsx | Extends withRouteParamHeaderOptions to support unstable_headerLeftItems / unstable_headerRightItems; adds native close button items. |
| components/nativeHeaderMenuItems.ts | New helper mapping existing Action objects into native stack menu item structures. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const allowBIP47 = route.params?.allowBIP47 ?? false; | ||
| const isBIP47Enabled = route.params?.isBIP47Enabled ?? false; | ||
| const showBip47Menu = allowBIP47 && isBIP47Enabled; | ||
| const onPressMenuItem = () => { |
There was a problem hiding this comment.
Fixed in commit FIX: respect ReceiveDetails setParams header via withRouteParamHeaderOptions. Replaced the broken allowBIP47/isBIP47Enabled route-param-driven formatter with withRouteParamHeaderOptions({ headerLeft: true, headerRight: true, headerBackVisible: true }), so the screen's own setParams calls for header components are now properly respected by the navigation options callback. Also removed the now-unused imports and style.
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
limpbrains
left a comment
There was a problem hiding this comment.
#8739 comes first I guess
|
Wake the fuck up samurai, we have PRs to merge [all PRs for @Overtorment] https://github.com/BlueWallet/BlueWallet/pulls/review-requested/Overtorment |
1 similar comment
|
Wake the fuck up samurai, we have PRs to merge [all PRs for @Overtorment] https://github.com/BlueWallet/BlueWallet/pulls/review-requested/Overtorment |

More native