-
Notifications
You must be signed in to change notification settings - Fork 76
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
Local Forage support #278
base: master
Are you sure you want to change the base?
Local Forage support #278
Conversation
82860a9
to
e8e8039
Compare
@Mogball wow. Thanks. I'll review as soon as possible! |
26751ac
to
57208a3
Compare
57208a3
to
702b5cc
Compare
9a24e47
to
c6a66a8
Compare
@fsmanuel, I would love to have this change merged in. @Mogball actually contributed this code for my project's use case mentioned here. Right now we're using @Mogball's fork directly but would prefer to use the official ember-local-storage plugin. If there's anything I can do to help in this review, please let me know. |
@Mogball @akshaisarma I didn't had time to review yet. The main problem is that it changes the api to async. That would break every app that uses the addon. At least that would require a manjor release. My goal is to have // config/environment.js
module.exports = function() {
var ENV = {
'ember-local-storage': {
useLocalForage: true
}
}
}; That way we can add a section to the readme that explains how the async api works if To make that possible we need some wrapper fuctions that abstracts the I'll ping you as soon as I have done the review. |
Removed bower dependencies
8681e5e
to
a86a20a
Compare
#155
#153
This is my attempt to add localforage into
ember-local-storage
.A few things to note:
ember-local-storage
has to be async (otherwise one risks dealing with race conditions)storage
event as mentioned in Discussion: Local Forage, moving beyond LS #153; there is alocalForage-observable
package that functions across tabs and essentially does the same as the storage event, but this package is not available onbower
because one of its dependencies is notThose things considered, it might do better as a fork. On the other hand, commit 548b361 seems to function okay without the async API (testing in an actual ember app) but a few test cases weren't dealing with race conditions well.