Add address component rendered while addAddress is processing.
http://g.recordit.co/uk5NFd5G8l.gif
@nnnnat confirmed that this bug exists in #4167
Please provide starting context, i.e. logged in as a user, configure a particular payment method.
release-1.14.0, setup a shop with fixed-rate shippingCurrent best guess is that this bug was introduced in #4167 in some way. It exists in release-1.14.0 before the /server files were migrated to plugins.
Node: 9.11.1
NPM: 5.6.0
Meteor Node: 8.11.2
Meteor NPM: 5.10.0
Reaction CLI: 0.29.0
Reaction: 1.14.0
Reaction branch: release-1.14.0
Docker: 18.03.1-ce
@spencern My guess is that this is because it's now being done using non-Meteor collections. So Meteor has to wait until it sees the change come through in the oplog, which takes a few seconds generally. The proper fix would be to update the local state using the address that is returned from the method call. Since the local state is a minimongo collection, I'm not sure how easy this is.
Definitely something funky going on here.
It looks like immediately, the address book switches to the correct "view" mode, then almost immediately after that, it switches back to the input mode, It then (consistently, over 10+ tests) re-renders 17 times, and after the 17th finally switches back to the correct mode.
Will look into @aldeed's solution.
@kieckhafer I realized that we're not actually using oplog in our setup (no MONGO_OPLOG_URL). I just tried enabling oplog and now I don't see the delay here anymore. I will push this on a branch and have you see if it fixes it for you.