graceguo-supercat edited a comment on issue #5543: Reduce dashboard position_json data size URL: https://github.com/apache/incubator-superset/pull/5543#issuecomment-410020328 @kristw Thank you for all the good comments! Here are my explanations: - Keep an `id: [key]` property is a good practice for `normalized redux state`: https://redux.js.org/recipes/structuringreducers/normalizingstateshape. It did duplicate the entry key, but it gives us a lot of convenience when access/traverse the data itself. - Encode `type` information in `id` property is optional, i still want `type` is mandatory property. Currently `id` has type information, but it is optional (for easier debug). In the worst case we can remove type from id. But most of code won't affected since we have 'type' mandatory property. - remove `children:[]` from leave node is a good idea, but it also involved both frontend JS and more complicated migration code. I also feel in our code base we assume `children` property is required for all nodes. it required a lot tests before we can remove it.
---------------------------------------------------------------- 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]
