Repository navigation
refactor(nav): move the nav bar homes into AppRoute.Tabs - #1539
Merged
Merged
Conversation
The Chats tab's home was AppRoute.Sheets.Tips. It is not a sheet and no longer shows tips, and Wallet and Menu had the same problem under Sheets. resolveRoutes had to check asNavBarTab() on every Sheets route so that these three were not wrapped in Main.Sheet. AppRoute.Tabs now holds Scanner, Wallet, Chats and Menu. Everything left under Sheets is a real sheet, so resolveRoutes wraps any Sheets route and the special case is gone. The tab-home checks in navigateAll, AppContent and NavTabBarInsetEntryDecorator become `is AppRoute.Tabs`. Chats also drops the tipping flow it was hosted in. TipFlowViewModel only ever set its steps to listOf(TipStep.Tips), so TipStep.Intro never ran, TipInfoScreen was never shown, and nothing built Tips(resumed = true), the only way to reach TipStep.TipCard. The ShareTipCard event was never sent. Tabs.Chats is a data object that renders ChatsScreen (was TipsScreen) backed by ChatsViewModel, which keeps only the chat-feed mapping. TippingFlowScreen, TipCardScreen, TipInfoScreen, TipStep, TipResult and ic_tipping_hand_large are deleted. The screen-root tag follows the route name, so tips_screen becomes chats_screen in the Maestro flows and BaselineProfileGenerator. The other tabs keep their tags. The back stack is held in remember, not saved state, so the renamed serializable routes have nothing to restore from.
Since #1529 a signed-in launch with no deeplink opens on Chats, but subflows/login.yaml still waited for wallet_screen. Every flow that logs in by seed timed out on that check before reaching its own steps. Flows that need the wallet after login already go through navigate_to_wallet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Chats tab's home was
AppRoute.Sheets.Tips. It isn't a sheet, and it doesn't show tips anymore.Sheets.WalletandSheets.Menuwere mislabelled the same way.resolveRouteshad to callasNavBarTab()on everySheetsroute to keep these three out ofMain.Sheet.Routes
AppRoute.Tabsholds the four nav bar homes:Scanner(wasMain.Scanner),Wallet,ChatsandMenu.Sheetsis a real sheet, soresolveRouteswraps anySheetsroute and no longer needs the tab special case.navigateAll,AppContentandNavTabBarInsetEntryDecoratorare nowis AppRoute.Tabs.asNavBarTab()is still there because the nav bar andBillOverlayneed to know which button a route maps to.Dead tipping flow
Tabs.Chatsis adata object. It rendersChatsScreen(renamed fromTipsScreen) with its ownChatsViewModelinstead of going through aFlowHost.The flow had stopped doing anything:
TipFlowViewModelonly ever set its steps tolistOf(TipStep.Tips), soTipStep.Intronever ran andTipInfoScreenwas never shown.TipInfoScreenwas the only place that builtTips(resumed = true), the only way to reachTipStep.TipCard.ShareTipCardevent.Deleted:
TippingFlowScreen,TipCardScreen,TipInfoScreen,TipStep,TipResult,ic_tipping_hand_large. The tip card and its share flow are still on the You tab (MenuScreenViewModel), which this PR doesn't touch.Test tags
annotatedEntrybuilds each screen's root tag from the route's class name, sotips_screenis nowchats_screen. That's updated inblocking.yaml,tipping_setup.yaml,subflows/open_tip_chat.yamlandBaselineProfileGenerator. The other three tabs keep their tags.subflows/login.yamlnow waits forchats_screen. Since #1529 a seed login opens on Chats, so itswallet_screencheck timed out and every seed-login flow failed before reaching its own steps.The back stack lives in
remember, not saved state, so the renamed@Serializableroutes don't break anything on restore.