From db58882a15fc70818e5f64da11081753976ed5a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=CC=81rgio=20Ramos?= Date: Wed, 26 Jul 2017 16:11:23 +0100 Subject: [PATCH] fix(ui-toolkit): make Card compatible with grid system --- packages/cp-frontend/package.json | 2 +- .../src/containers/services/list.js | 4 +- .../.snapguidist/__snapshots__/Card-0.snap | 2 +- .../.snapguidist/__snapshots__/Card-10.snap | 10 +-- .../.snapguidist/__snapshots__/Card-2.snap | 2 +- .../.snapguidist/__snapshots__/Card-4.snap | 4 +- .../.snapguidist/__snapshots__/Card-6.snap | 4 +- .../.snapguidist/__snapshots__/Card-8.snap | 2 +- .../__snapshots__/Checkbox-0.snap | 8 +- .../__snapshots__/Checkbox-10.snap | 32 +++---- .../__snapshots__/Checkbox-12.snap | 32 +++---- .../__snapshots__/Checkbox-14.snap | 8 +- .../__snapshots__/Checkbox-16.snap | 16 ++-- .../__snapshots__/Checkbox-2.snap | 8 +- .../__snapshots__/Checkbox-4.snap | 8 +- .../__snapshots__/Checkbox-6.snap | 8 +- .../__snapshots__/Checkbox-8.snap | 32 +++---- .../__snapshots__/CloseButton-0.snap | 2 +- .../__snapshots__/Dropdown-0.snap | 6 +- .../.snapguidist/__snapshots__/Header-0.snap | 6 +- .../.snapguidist/__snapshots__/Input-10.snap | 4 +- .../.snapguidist/__snapshots__/Input-2.snap | 4 +- .../.snapguidist/__snapshots__/Input-4.snap | 16 ++-- .../.snapguidist/__snapshots__/Input-6.snap | 16 ++-- .../.snapguidist/__snapshots__/Input-8.snap | 16 ++-- .../__snapshots__/ProgressBar-0.snap | 24 ++--- .../.snapguidist/__snapshots__/Radio-0.snap | 28 +++--- .../.snapguidist/__snapshots__/Radio-10.snap | 22 ++--- .../.snapguidist/__snapshots__/Radio-2.snap | 22 ++--- .../.snapguidist/__snapshots__/Radio-4.snap | 88 +++++++++---------- .../.snapguidist/__snapshots__/Radio-6.snap | 88 +++++++++---------- .../.snapguidist/__snapshots__/Radio-8.snap | 88 +++++++++---------- .../__snapshots__/SectionList-0.snap | 26 +++--- .../.snapguidist/__snapshots__/Select-0.snap | 6 +- .../.snapguidist/__snapshots__/Select-10.snap | 24 ++--- .../.snapguidist/__snapshots__/Select-12.snap | 24 ++--- .../.snapguidist/__snapshots__/Select-14.snap | 24 ++--- .../.snapguidist/__snapshots__/Select-16.snap | 6 +- .../.snapguidist/__snapshots__/Select-2.snap | 2 +- .../.snapguidist/__snapshots__/Select-4.snap | 6 +- .../.snapguidist/__snapshots__/Select-6.snap | 6 +- .../.snapguidist/__snapshots__/Select-8.snap | 6 +- .../.snapguidist/__snapshots__/Toggle-0.snap | 28 +++--- .../.snapguidist/__snapshots__/Toggle-2.snap | 28 +++--- .../.snapguidist/__snapshots__/Toggle-4.snap | 20 ++--- .../.snapguidist/__snapshots__/Toggle-6.snap | 28 +++--- packages/ui-toolkit/src/card/card.js | 3 + 47 files changed, 427 insertions(+), 422 deletions(-) diff --git a/packages/cp-frontend/package.json b/packages/cp-frontend/package.json index 91320367..e6949b06 100644 --- a/packages/cp-frontend/package.json +++ b/packages/cp-frontend/package.json @@ -8,7 +8,7 @@ "scripts": { "dev": "REACT_APP_GQL_PORT=3000 PORT=3069 react-scripts start", "start": "PORT=3069 react-scripts start", - "build": "react-scripts build", + "build": "NODE_ENV=production react-scripts build", "lint:css": "echo 0", "lint:js": "eslint . --fix", "lint": "redrun -s lint:*", diff --git a/packages/cp-frontend/src/containers/services/list.js b/packages/cp-frontend/src/containers/services/list.js index ff67ea62..36317813 100644 --- a/packages/cp-frontend/src/containers/services/list.js +++ b/packages/cp-frontend/src/containers/services/list.js @@ -2,6 +2,8 @@ import React, { Component } from 'react'; import { compose, graphql } from 'react-apollo'; import { connect } from 'react-redux'; import styled from 'styled-components'; +import forceArray from 'force-array'; + import ServicesQuery from '@graphql/Services.gql'; import ServicesRestartMutation from '@graphql/ServicesRestartMutation.gql'; import ServicesStopMutation from '@graphql/ServicesStopMutation.gql'; @@ -45,7 +47,7 @@ class ServiceList extends Component { } = this.props; if ( - loading || + (loading && !forceArray(services).length) || (deploymentGroup.status === 'PROVISIONING' && !services.length) ) { return ( diff --git a/packages/ui-toolkit/.snapguidist/__snapshots__/Card-0.snap b/packages/ui-toolkit/.snapguidist/__snapshots__/Card-0.snap index 35114ca8..d10854b9 100644 --- a/packages/ui-toolkit/.snapguidist/__snapshots__/Card-0.snap +++ b/packages/ui-toolkit/.snapguidist/__snapshots__/Card-0.snap @@ -1,6 +1,6 @@ exports[`Card-0 1`] = `
diff --git a/packages/ui-toolkit/.snapguidist/__snapshots__/Checkbox-10.snap b/packages/ui-toolkit/.snapguidist/__snapshots__/Checkbox-10.snap index 29c6c2de..46af1fdd 100644 --- a/packages/ui-toolkit/.snapguidist/__snapshots__/Checkbox-10.snap +++ b/packages/ui-toolkit/.snapguidist/__snapshots__/Checkbox-10.snap @@ -7,16 +7,16 @@ exports[`Checkbox-10 1`] = ` className="toggle__InnerContainer-hKefxl bVmJyd" type="checkbox">
@@ -62,19 +62,19 @@ exports[`Checkbox-16 1`] = ` className="Col__Col-hCQanm rqKxU">
diff --git a/packages/ui-toolkit/.snapguidist/__snapshots__/Checkbox-2.snap b/packages/ui-toolkit/.snapguidist/__snapshots__/Checkbox-2.snap index c7e0a4f7..8c6e46df 100644 --- a/packages/ui-toolkit/.snapguidist/__snapshots__/Checkbox-2.snap +++ b/packages/ui-toolkit/.snapguidist/__snapshots__/Checkbox-2.snap @@ -7,16 +7,16 @@ exports[`Checkbox-2 1`] = ` type="checkbox">