You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Web/mWeb] URL / Address bar is not updated after login or landing on root #2325
AuthScreens can retrieve any last viewed reportID from Onyx
A alternative is to let the ReportScreen update the route if that's necessary
Common case:
The app starts.
The user ends up on the Report Screen as this is the default home screen.
Attach to the navigation lifecycle (using a listener or via HOC, navigation prop is available as it's a screen component)
When the screen is focused, update the route to the currently viewed report
only update navigation state if it doesn't represent the current route.
The app starts from a deep link
The app starts.
A deep link is resolved
The user is navigated to the deep linked screen
Since the user is not ending up on the Home/Report screen - it's not focused so it won't run the logic to override the current route
Because Home is at the root of the stack it will still be appended before the deeplinked path and going back would return you "home", then if the route/path needs updates they will be addressed by the common case logic
Activity
kidroca commentedon Apr 9, 2021
Proposal
It should be possible to simplify the logic here
https://github.com/Expensify/Expensify.cash/blob/1359f9fc5906e31975d4d68327d943a6090f6c2c/src/libs/Navigation/NavigationRoot.js#L44-L83
To just
By providing
initialParamsfor the home screen here:https://github.com/Expensify/Expensify.cash/blob/68169d3a7f1383533d3faae01d0d4589f7cd3887/src/libs/Navigation/AppNavigator/AuthScreens.js#L143-L151
Like this:
AuthScreenscan retrieve any last viewed reportID from OnyxA alternative is to let the
ReportScreenupdate the route if that's necessaryCommon case:
The app starts from a deep link
Edit: I think just following the guide here can sort things out and would replace the entire
componentDidMountlogic: https://reactnavigation.org/docs/configuring-links/MelvinBot commentedon Apr 9, 2021
Triggered auto assignment to @Christinadobrzyn (
External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.marcaaron commentedon Apr 9, 2021
Proposal looks good to me if you want to send a PR 👍
@Christinadobrzyn can you create an E/E issues + Upwork job please and hire @kidroca?
We don't need to add the
Exportedlabel in this case since it is already triaged.MelvinBot commentedon Apr 12, 2021
Triggered auto assignment to @marcaaron (
Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.Christinadobrzyn commentedon Apr 12, 2021
Ack! My bad marcaaron I added an engineering label to this, please disregard the ping!
Christinadobrzyn commentedon Apr 12, 2021
Expensify/Expensify issue - https://github.com/Expensify/Expensify/issues/160016
Job posting in Upwork - https://www.upwork.com/jobs/~01b52f69509ac6e225
Sent a hire request to @kidroca in Upwork
kidroca commentedon Apr 12, 2021
@Christinadobrzyn
Thank you, I've responded on upwork. I'll post updates here on github
kidroca commentedon Apr 20, 2021
@Christinadobrzyn
Hey, sorry to bring this up here but I didn't receive a bonus for finding this issue and documenting it in a ticket as per proposing-a-job-that-expensify-hasnt-posted
For example my other ticket did receive a bonus #2109
Julesssss commentedon Apr 20, 2021
FYI, I've left a note on our internal issue here that we should pay an additional bonus when completing this outstanding Upwork Contract
So this ^ should be taken care of soon.
Christinadobrzyn commentedon Apr 21, 2021
Thanks for the heads up @Julesssss - I'm paying the contributor today so I'll add the bonus you requested here to the payment.
Contractor paid!