Prevent UI popping during subscription process - #818
Closed
begedin wants to merge 2 commits into
Closed
Conversation
Remove setting of unused "isSubmitting" property
begedin
commented
Dec 1, 2016
|
|
||
| actions: { | ||
| submit() { | ||
| this.set('isSubmitting', true); |
Contributor
Author
There was a problem hiding this comment.
This was actually useless property we don't need anymore, so I would keep this one change in no matter what.
Contributor
|
We can fix this by simply doing: Will need to install this https://github.com/jmurphyau/ember-truth-helpers |
joshsmith
deleted the
811-prevent-ui-popping-during-subscription-process
branch
December 1, 2016 21:12
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.
What's in this PR?
Closes #811
This makes it so while anything is happening in the background on the donate page, both the card form and the card item display are replaced by a "Processing..." indicator, which includes a loading spinner.
Since the change eliminates the need for some logic in the credit-card component (namely, the busy state), commit 260044f also removes all of that code.
If this behavior is not an acceptable solution, the only alternative I can think of is to show the form until the whole process is done, provided the form was there at the start, or show the card item until the process is done, provided the card item was there to begin with.
The problem with that is, it would significantly complicate the logic. In order to achieve that, we should
isBusywrapping from the templatetemplates/project/donate, replace{{#donation/donation-container card=user.stripePlatformCardwith justcard=cardroutes/project/donate, add amodelhook that explicitly loads the project and the user's card. Then add asetupControllerhook that sets the two properties on the controller. That way, the card wont be set automatically and the UI wont switch from the form to the card half-way through.If the current solution is acceptable, finalizing this PR is a matter of setting the right style (in case the current spinner with "Processing..." is not good).
If the proposed alternative is the way to go, then the process id described above. I don't think it would break any tests to do it that way, but as explained, it slightly complicates things.