williaster commented on a change in pull request #6257: Add sql lab
localStorage config
URL:
https://github.com/apache/incubator-superset/pull/6257#discussion_r230205940
##########
File path: superset/assets/src/SqlLab/App.jsx
##########
@@ -20,14 +20,27 @@ setupApp();
const appContainer = document.getElementById('app');
const bootstrapData = JSON.parse(appContainer.getAttribute('data-bootstrap'));
initFeatureFlags(bootstrapData.common.feature_flags);
-const state = getInitialState(bootstrapData);
+const initialState = getInitialState(bootstrapData);
+const sqlLabPersistStateConfig = {
+ paths: ['sqlLab'],
+ config: {
+ slicer: paths => (state) => {
+ const subset = {};
+ paths.forEach((path) => {
+ delete state[path].common; // eslint-disable-line no-param-reassign
Review comment:
can you add a comment explaining what is going on here so people that don't
have context can understand it?
also, what's the plan for removing this once it becomes dead code? can we
safely delete it in a month? 2 months?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]