Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed duplicate loading screen #237

Merged
merged 12 commits into from Apr 3, 2019
Merged

Conversation

pcowgill
Copy link
Member

@pcowgill pcowgill commented Apr 1, 2019

Issue link

#166
#217

Auto-close the issue?

Closes #166
Closes #217

Types of changes

New feature (non-breaking change that adds functionality)

Technical debt (a code change that doesn't fix a bug or add a feature but makes something clearer for devs)

@pcowgill
Copy link
Member Author

pcowgill commented Apr 1, 2019

@marcelomorgado This might be a WIP still, because right now after loading the app locally on this feature branch I'm just seeing an empty list of land for sale

@marcelomorgado
Copy link
Contributor

@marcelomorgado This might be a WIP still, because right now after loading the app locally on this feature branch I'm just seeing an empty list of land for sale

Yeah, I've worked on that last week and not figured out why it's happening yet.

@pcowgill pcowgill changed the title Removed duplicate loading screen WIP: Removed duplicate loading screen Apr 2, 2019
@pcowgill
Copy link
Member Author

pcowgill commented Apr 2, 2019

@marcelomorgado I tracked down the error:

Screenshot 2019-04-02 09 41 41
Screenshot 2019-04-02 09 41 52

@pcowgill
Copy link
Member Author

pcowgill commented Apr 2, 2019

@marcelomorgado So I think maybe after reworking the AppNavigator file we're not properly wrapping the app with Root for native-base to work?

@pcowgill
Copy link
Member Author

pcowgill commented Apr 2, 2019

@marcelomorgado Wrapping the ListLandForSaleScreen in Root from native-base addresses the issue, for the record. But that's not the most elegant solution, since using the Root from App.js should be able to work if we set it up right.

@pcowgill
Copy link
Member Author

pcowgill commented Apr 2, 2019

@marcelomorgado Thoughts on whether we should merge in its current form with the Root hack after removing console.logs, or try to fix that first?

@marcelomorgado
Copy link
Contributor

Hey @pcowgill , I've found this comment wix/react-native-navigation#4640 (comment) event it isn't totally clear for me, seems that the Root component will not work from App (we can remove it). I've quickly tried to add it programmatically inside of AppNavigator but my attempts until now don't work. I think will be better do a comment about it and go ahead. Make sense?

@marcelomorgado
Copy link
Contributor

Hey @pcowgill , I've found this comment wix/react-native-navigation#4640 (comment) event it isn't totally clear for me, seems that the Root component will not work from App (we can remove it). I've quickly tried to add it programmatically inside of AppNavigator but my attempts until now don't work. I think will be better do a comment about it and go ahead. Make sense?

If you agree with me, this PR is ready to merge.

marcelomorgado
marcelomorgado previously approved these changes Apr 2, 2019
@pcowgill pcowgill changed the title WIP: Removed duplicate loading screen Removed duplicate loading screen Apr 2, 2019
@@ -11,7 +11,6 @@ import { Action } from "tasit-sdk";
const { ConfigLoader } = Action;
import tasitSdkConfig from "./config/default";
import { checkBlockchain, showFatalError, recoverAccount } from "./helpers";
import { Root } from "native-base";
Copy link
Member Author

Choose a reason for hiding this comment

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

@marcelomorgado Hmm, are you sure removing this won't break the toasts in the account creation / funding flow? I can test that.

Copy link
Contributor

Choose a reason for hiding this comment

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

You are right! I've just undone the removal.

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay, thanks. I'll confirm those toasts are working in this branch anyway before merging after you added it back, since this is the branch that started messing with toasts even when Root was still in App.js

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm glad I checked. Those aren't working on any other screens now. So we'll have to add the Root change on every screen that uses a showInfo, etc. function if we want the toasts everywhere we used to have them.

I'd be potentially okay with removing them from the account creation and funding flow since there's the on-screen text now too, but we at least need the toasts for when the land purchase is complete to work. Maybe that happens back on the ListLandForSaleScreen though where we already have it now?

Copy link
Contributor

Choose a reason for hiding this comment

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

I've tested it before put Root again on the App component. I think that is desirable be able to create a toast from every component that we want, I don't have a strong opinion about keeping or removing account creation steps toasts.

I have to check if the toast from account creation flow will be shown on list land screen even without Root on the App component. Was that your question?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, we have few options now and that seems the better one. Any idea of the content that this screen will have?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'd be potentially okay with removing them from the account creation and funding flow since there's the on-screen text now too, but we at least need the toasts for when the land purchase is complete to work. Maybe that happens back on the ListLandForSaleScreen though where we already have it now?

@marcelomorgado Oh actually, if we merge it as-is, the toasts for finishing buying a piece of land do show up back on the list land screen, so we would have all the toasts we absolutely need if we were to merge this with Root just on the ListLand screen and in App.js, which leads to no errors. Thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

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

Unfortunately, the toast will stop to work on all screen as before, but it's a good option too since we can merge this with no terrible side effects and work on the "coaching" screen and have the toast back to all screens soon.

Copy link
Member Author

Choose a reason for hiding this comment

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

I see you gave a thumbs up in response to the last message, so I will go forward with the merging as-is plan for now.

Copy link
Member Author

Choose a reason for hiding this comment

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

Unfortunately, the toast will stop to work on all screen as before, but it's a good option too since we can merge this with no terrible side effects and work on the "coaching" screen and have the toast back to all screens soon.

Okay, sounds good to me.

@pcowgill
Copy link
Member Author

pcowgill commented Apr 2, 2019

Hey @pcowgill , I've found this comment wix/react-native-navigation#4640 (comment) event it isn't totally clear for me, seems that the Root component will not work from App (we can remove it).

Hmm, but for react-native-navigation as opposed to react-navigation, the navigation is using native code and not JavaScript. We're using JavaScript though for navigation since we're using react-navigation. So I don't think the wix (maker of react-native-navigation) issues are a good reference point for this topic.

@pcowgill
Copy link
Member Author

pcowgill commented Apr 2, 2019

I've quickly tried to add it programmatically inside of AppNavigator but my attempts until now don't work. I think will be better do a comment about it and go ahead. Make sense?

If you agree with me, this PR is ready to merge.

I'm on board with the idea of merging with a temporary working solution and a comment, but I'm not sure if removing Root from App.js will introduce any bugs, given that the issue was a wix one.

@marcelomorgado
Copy link
Contributor

Oh, thanks for the clarification, I got confused a little. I've changed my previous comment about the issue on the code.

@pcowgill
Copy link
Member Author

pcowgill commented Apr 3, 2019

@marcelomorgado Can you review and approve the latest changes before we merge this? Thanks!

@pcowgill
Copy link
Member Author

pcowgill commented Apr 3, 2019

(Not much has changed - just to follow our usual process)

@pcowgill pcowgill merged commit 2e2e970 into develop Apr 3, 2019
@pcowgill pcowgill deleted the feature/no-loading-screen branch April 3, 2019 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants