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

Add button processing state to forms that send data to server #130

Open
jeffshaver opened this issue Jul 9, 2015 · 8 comments
Open

Add button processing state to forms that send data to server #130

jeffshaver opened this issue Jul 9, 2015 · 8 comments

Comments

@jeffshaver
Copy link
Contributor

Disable button/change text while submission is happening so they are aware of the changes

@jeffshaver
Copy link
Contributor Author

@iamlasse is this still an issue if we move the meteor methods out of the server folder in order to allow optimistic UI updates?

@jeffshaver jeffshaver added ready and removed sprint labels Jul 9, 2015
@iamlasse
Copy link
Contributor

iamlasse commented Jul 9, 2015

@jeffshaver I'm not sure i know what optimistic UI is..?

@chrisco23
Copy link
Contributor

It's "optimistic" because it believes that its communication to the server will be handled appropriately, so presents the UI as if it had already happened. http://info.meteor.com/blog/optimistic-ui-with-meteor-latency-compensation

@jeffshaver
Copy link
Contributor Author

@iamlasse yeah. basically what chris said. So Meteor methods will run on the client and update minimongo (therefore updating the UI). The server has full final control of the outcome. But since the client can run the method, we get "optimistic" updates. Meaning that as long as the server agrees with the client about what happened, nothing changes from what the client did.

This basically gets rid of server-round-trip time for methods to run by mimicking what the server will do. I have a ticket already to move the methods into the file with the collection they work against: #54. @ZachStoltz will be taking that one on I believe.

@weslers
Copy link
Contributor

weslers commented Jul 9, 2015

Would it not be better to keep the button disabled until all the form fields are filled in.

@jeffshaver
Copy link
Contributor Author

@weslers This ticket is only related to button state while waiting for a server response. Form validation/disabling buttons until all fields are valid is handled in #129

@iamlasse
Copy link
Contributor

iamlasse commented Jul 9, 2015

I see, I will read more up on this.

@iamlasse
Copy link
Contributor

@jeffshaver @Wesler how does it work in blaze? In angular youd just set a ngdisabled conditional attr on buttons. Would it be a helper perhaps or an autorun?

@iamlasse iamlasse removed their assignment Jul 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants