You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/07/19 04:37:20 UTC

[GitHub] graceguo-supercat commented on a change in pull request #5425: set default charts layout

graceguo-supercat commented on a change in pull request #5425: set default charts layout
URL: https://github.com/apache/incubator-superset/pull/5425#discussion_r203599535
 
 

 ##########
 File path: superset/assets/src/dashboard/reducers/getInitialState.js
 ##########
 @@ -98,20 +102,22 @@ export default function(bootstrapData) {
 
       sliceIds.add(key);
 
-      // if chart is newly added from explore view, add a row in layout
+      // if there are newly added slices from explore view, add 3 slices-per-row into layout
       if (!chartIdToLayoutId[key] && layout[parentId]) {
-        const parent = layout[parentId];
-        const rowContainer = newComponentFactory(ROW_TYPE);
-        layout[rowContainer.id] = rowContainer;
-        parent.children.push(rowContainer.id);
+        if (newSlicesCounter % 3 === 0) {
 
 Review comment:
   fixed per comment.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org