From eb3bea2b53914402325f6edfd5be88956744ec59 Mon Sep 17 00:00:00 2001
From: Bogdan Cochior <bogdan.cochior@thinslices.com>
Date: Wed, 12 Sep 2018 11:24:14 +0300
Subject: [PATCH] fix(layout): fix loading... position

---
 .../component-faraday-ui/src/gridItems/Row.js |  2 +-
 .../components/Dashboard/DashboardItems.js    | 37 +++++++++++--------
 packages/xpub-faraday/app/FaradayApp.js       |  6 +--
 3 files changed, 25 insertions(+), 20 deletions(-)

diff --git a/packages/component-faraday-ui/src/gridItems/Row.js b/packages/component-faraday-ui/src/gridItems/Row.js
index 349abc8ee..9743b633c 100644
--- a/packages/component-faraday-ui/src/gridItems/Row.js
+++ b/packages/component-faraday-ui/src/gridItems/Row.js
@@ -11,7 +11,7 @@ export default styled.div.attrs({
   background-color: ${props => props.bgColor || 'transparent'};
   display: flex;
   flex-wrap: ${props => props.flexWrap || 'initial'};
-  flex-direction: row;
+  flex-direction: ${props => props.flexDirection || 'row'};
   justify-content: ${({ justify }) => justify || 'space-evenly'};
   height: ${props => get(props, 'height', 'auto')};
 
diff --git a/packages/components-faraday/src/components/Dashboard/DashboardItems.js b/packages/components-faraday/src/components/Dashboard/DashboardItems.js
index d1c45c111..ec1fdeafa 100644
--- a/packages/components-faraday/src/components/Dashboard/DashboardItems.js
+++ b/packages/components-faraday/src/components/Dashboard/DashboardItems.js
@@ -19,14 +19,14 @@ const DashboardItems = ({ onClick, list, deleteProject }) => (
       </Row>
     ) : (
       list.map(collection => (
-        // <HideLoading>
-        <DashboardItem
-          collection={collection}
-          key={collection.id}
-          onClick={onClick}
-          onDelete={() => deleteProject(collection)}
-        />
-        // </HideLoading>
+        <HideLoading key={collection.id}>
+          <DashboardItem
+            collection={collection}
+            key={collection.id}
+            onClick={onClick}
+            onDelete={() => deleteProject(collection)}
+          />
+        </HideLoading>
       ))
     )}
   </Root>
@@ -64,12 +64,17 @@ const Root = styled.div`
     width: auto;
   }
 `
-// const HideLoading = styled.div`
-//   > div {
-//     display: none;
-//   }
-//   > div[data-test-id|='fragment'] {
-//     display: flex;
-//   }
-// `
+const HideLoading = styled.div`
+  > div {
+    display: none;
+  }
+
+  &:first-of-type > div {
+    display: flex;
+  }
+
+  > div[data-test-id|='fragment'] {
+    display: flex;
+  }
+`
 // #endregion
diff --git a/packages/xpub-faraday/app/FaradayApp.js b/packages/xpub-faraday/app/FaradayApp.js
index 8ad80491b..2c460e6e3 100644
--- a/packages/xpub-faraday/app/FaradayApp.js
+++ b/packages/xpub-faraday/app/FaradayApp.js
@@ -91,11 +91,11 @@ const Root = styled.div`
 const appBarPaddingHelper = props =>
   props.canCreateDraft
     ? css`
-        padding: calc(${th('appBar.height')}) calc(${th('gridUnit')} * 12)
-          calc(${th('gridUnit')} * 2);
+        padding: calc(${th('appBar.height')} + ${th('gridUnit')})
+          calc(${th('gridUnit')} * 12) calc(${th('gridUnit')} * 2);
       `
     : css`
-        padding: calc(${th('appBar.height')} + ${th('gridUnit')} * 2.5)
+        padding: calc(${th('appBar.height')} + ${th('gridUnit')} * 4)
           calc(${th('gridUnit')} * 12) calc(${th('gridUnit')} * 2);
       `
 
-- 
GitLab