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

ambiguous documentation for 'onsave' plugin callbacks #96

Closed
tomaszn opened this issue Oct 29, 2017 · 1 comment
Closed

ambiguous documentation for 'onsave' plugin callbacks #96

tomaszn opened this issue Oct 29, 2017 · 1 comment

Comments

@tomaszn
Copy link
Contributor

tomaszn commented Oct 29, 2017

The documentation should define when the onsave callbacks are run - before or after actually sending the pending items. Current outbox implementation runs all onsave plugins after the outbox items were sent and the local store is updated:

wq.app/js/wq/app.js

Lines 1393 to 1397 in 463c99a

return model.update([result]).then(function() {
return Promise.all(_callPlugins(
'onsave', undefined, [item, result]
));
});

@tomaszn tomaszn changed the title 'onsave' plugin callbacks are run after synchronization and update are finished ambiguous documentation for 'onsave' plugin callbacks Nov 17, 2017
@sheppard sheppard added this to the 1.2 - Redux Integration milestone Apr 17, 2019
sheppard added a commit that referenced this issue Oct 1, 2019
 - onsave -> onsync (see #96)
 - postsave -> postsaveurl
 - saveerror -> onsync
 - presync/postsync -> onsync
 - showOutboxErrors -> onsync/run
@sheppard
Copy link
Member

sheppard commented Oct 1, 2019

For version 1.2, I renamed this hook to "onsync" and updated the documentation. As the new name reflects, it always runs after the item is sent to the server.

@sheppard sheppard closed this as completed Oct 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants