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

[JS-951] ember-local-storage config is not correctly handle when not default #111

Closed
romgere opened this issue Apr 8, 2021 · 3 comments · Fixed by #112 or #165
Closed

[JS-951] ember-local-storage config is not correctly handle when not default #111

romgere opened this issue Apr 8, 2021 · 3 comments · Fixed by #112 or #165

Comments

@romgere
Copy link
Contributor

romgere commented Apr 8, 2021

Features values are not correctly restored by instance-initializer when ember-local-storage is used with namespace or keyDelimiter options.

The reason is :

feature-controls component uses storageFor from ember-local-storage to write values in locale Store (https://github.com/peopledoc/ember-feature-controls/blob/master/addon/components/feature-controls.js#L6).
storageFor take into account the ember-local-storage config to write the key at the right place in locale storage (with correct namespace and/or delimiter).

In other hand, the instance initializer uses getStorage & get value with the storage:feature-controls key wich does not take into account the ember-local-storage config (https://github.com/peopledoc/ember-feature-controls/blob/master/addon/instance-initializers/load-feature-controls.js#L9)

It results with a desynchronisation between ember-feature-controls & ember-feature-flags as the value are not correctly restored onto ember-feature-flags features service.

@BlueCutOfficial
Copy link
Member

@romgere can you create a JIRA ticket on Tribe JS board? 🙏

@romgere
Copy link
Contributor Author

romgere commented Apr 9, 2021

Sure I will

@romgere romgere changed the title ember-local-storage config is not correctly handle when not default [JS-951] ember-local-storage config is not correctly handle when not default Apr 9, 2021
@romgere
Copy link
Contributor Author

romgere commented Apr 9, 2021

Done : JS-951

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants