-
Notifications
You must be signed in to change notification settings - Fork 55
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
Save Insight property config locally #3994
Conversation
Label error. Requires at least 1 of: Feature, Bug, Enhancement, Maintenance, Documentation, Performance, Do not publish. Found: |
doh, I forgot to include the saving of way datasets you have hidden. I'll add that soon |
done! |
seed/static/seed/js/controllers/insights_property_controller.js
Outdated
Show resolved
Hide resolved
seed/static/seed/js/controllers/insights_property_controller.js
Outdated
Show resolved
Hide resolved
seed/static/seed/js/controllers/insights_property_controller.js
Outdated
Show resolved
Hide resolved
seed/static/seed/js/controllers/insights_property_controller.js
Outdated
Show resolved
Hide resolved
dataset_visibility: new_configs.dataset_visibility, | ||
annotation_visibility: new_configs.annotation_visibility, | ||
} | ||
localStorage.setItem('insights.property.configs', JSON.stringify(local_storage_configs)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this localStorage key doesn't include the org id (or a nested structure using the org id as a lookup) these settings will be lost any time someone changes their org and visits this page
seed/static/seed/js/controllers/insights_property_controller.js
Outdated
Show resolved
Hide resolved
seed/static/seed/js/controllers/insights_property_controller.js
Outdated
Show resolved
Hide resolved
seed/static/seed/js/controllers/insights_property_controller.js
Outdated
Show resolved
Hide resolved
seed/static/seed/js/controllers/insights_property_controller.js
Outdated
Show resolved
Hide resolved
seed/static/seed/js/controllers/insights_property_controller.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is working great, even across orgs!
* Save Insight property config locally * Save visiibility locally * Formatting * Fix for mutliple orgs * Fixed annotation_visibility bug --------- Co-authored-by: Alex Swindler <alex.swindler@nrel.gov>
Any background context you want to provide?
On the property insights page, the things you select in the dropdown are now saved locally. 👍
What's this PR do?
How should this be manually tested?
What are the relevant tickets?
Screenshots (if appropriate)