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

Fix Forms implementation for MvvmCross #2035

Merged
merged 6 commits into from
Jul 13, 2017
Merged

Conversation

martijn00
Copy link
Contributor

@martijn00 martijn00 commented Jul 13, 2017

✨ What kind of change does this PR introduce? (Bug fix, feature, docs update...)

Makes Forms easy to use with MvvmCross.

⤵️ What is the current behavior?

Hacks and stuff not working

🆕 What is the new behavior (if this is a feature change)?

Easy to get started with a Forms app

💥 Does this PR introduce a breaking change?

No, apps keep working, but are recommended to update.

🐛 Recommendations for testing

📝 Links to relevant issues/docs

🤔 Checklist before submitting

  • All projects build
  • Follows style guide lines (code style guide)
  • Relevant documentation was updated (docs style guide)
  • Nuspec files were updated (when applicable)
  • Rebased onto current develop

@martijn00 martijn00 added the p/forms Xamarin.Forms platform label Jul 13, 2017
@martijn00 martijn00 added this to the 5.0.7 milestone Jul 13, 2017
Copy link
Contributor

@nmilcoff nmilcoff left a comment

Choose a reason for hiding this comment

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

This looks great. However, I'm worried about the ctor MvxIosSetup(IMvxApplicationDelegate applicationDelegate, IMvxIosViewPresenter presenter) that is gone now, because it's necessary to start the app for background fetch and other background services what happen without a Window

{
_presenter = presenter;
_window = window;
_applicationDelegate = applicationDelegate;
Copy link
Contributor

Choose a reason for hiding this comment

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

_applicationDelegate and _window are already set in the call for : this (applicationDelegate, window), no need to assigning them again here


public Application MvxFormsApp
private MvxFormsApplication _formsApplication;
public MvxFormsApplication FormsApplication
Copy link
Contributor

Choose a reason for hiding this comment

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

This rename is actually a breaking change, isn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. But it is necessary because otherwise we can't extend this with MvvmCross methods.

@@ -14,8 +14,8 @@ public Setup(MvxApplicationDelegate applicationDelegate, UIWindow window)
{
}

public Setup(MvxApplicationDelegate applicationDelegate, IMvxIosViewPresenter presenter)
: base(applicationDelegate, presenter)
public Setup(MvxApplicationDelegate applicationDelegate, UIWindow window, IMvxIosViewPresenter presenter)
Copy link
Contributor

Choose a reason for hiding this comment

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

If I'm not missing anything, then this is a big breaking change. The constructor
public Setup(MvxApplicationDelegate applicationDelegate, IMvxIosViewPresenter presenter) doesn't exist anymore on MvxIosSetup. Do we need this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The problem with this was that in this case Window was never set, so it was never working. In any case, i've never used this ctor, but always the other one.

Copy link
Contributor

@nmilcoff nmilcoff left a comment

Choose a reason for hiding this comment

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

Great!! We just need to update the docs for the new stuff, mainly about the breaking change about the FormsApplication property

@nmilcoff nmilcoff merged commit 8218d74 into MvvmCross:develop Jul 13, 2017
@martijn00 martijn00 modified the milestones: 5.1.0, 5.0.7 Jul 17, 2017
@martijn00 martijn00 deleted the forms branch July 20, 2017 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p/forms Xamarin.Forms platform
Development

Successfully merging this pull request may close these issues.

2 participants