From b053130e68e3570fec0cce8e88b87208e4fec170 Mon Sep 17 00:00:00 2001 From: Kyle Shockey Date: Fri, 28 Sep 2018 20:03:42 -0500 Subject: [PATCH 1/2] improve: nest Servers within Schemes container --- src/core/components/layouts/base.jsx | 5 +-- src/core/containers/schemes.jsx | 1 + .../oas3/components/servers-container.jsx | 32 +++++++------------ src/style/_layout.scss | 2 +- src/style/_servers.scss | 16 ++-------- 5 files changed, 20 insertions(+), 36 deletions(-) diff --git a/src/core/components/layouts/base.jsx b/src/core/components/layouts/base.jsx index f1d09b891b7..0c58a5984a5 100644 --- a/src/core/components/layouts/base.jsx +++ b/src/core/components/layouts/base.jsx @@ -60,9 +60,10 @@ export default class BaseLayout extends React.Component { - + + + - diff --git a/src/core/containers/schemes.jsx b/src/core/containers/schemes.jsx index 8d64c283ff0..1bff7c6fbad 100644 --- a/src/core/containers/schemes.jsx +++ b/src/core/containers/schemes.jsx @@ -24,6 +24,7 @@ export default class SchemesContainer extends React.Component { {schemes && schemes.size || securityDefinitions ? (
+ {this.props.children} {schemes && schemes.size ? ( - {servers && servers.size ? ( -
- - Server - - -
- - ) : null} -
- ) + Servers + + ) : null } -} +} \ No newline at end of file diff --git a/src/style/_layout.scss b/src/style/_layout.scss index 0c47c6177c7..45eb9fe9889 100644 --- a/src/style/_layout.scss +++ b/src/style/_layout.scss @@ -667,7 +667,7 @@ .schemes { display: flex; - align-items: center; + align-items: flex-end; > label { diff --git a/src/style/_servers.scss b/src/style/_servers.scss index 6df9756e2c9..fc350ec9310 100644 --- a/src/style/_servers.scss +++ b/src/style/_servers.scss @@ -53,19 +53,9 @@ } } - -.global-server-container -{ - margin: 0 0 20px 0; - padding: 30px 0; - - background: $server-container-background-color; - box-shadow: 0 1px 2px 0 rgba($server-container-box-shadow-color,.15); - - .servers-title { - line-height: 2em; - font-weight: bold; - } +.servers-title { + font-size: 12px; + font-weight: bold; } .operation-servers { From ad6eb74b5c81b73bbae7a9df50c3d14f0216781f Mon Sep 17 00:00:00 2001 From: Kyle Shockey Date: Fri, 28 Sep 2018 20:30:59 -0500 Subject: [PATCH 2/2] linter fixes --- src/core/containers/schemes.jsx | 1 + src/core/plugins/oas3/components/servers-container.jsx | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/containers/schemes.jsx b/src/core/containers/schemes.jsx index 1bff7c6fbad..fb5414f2094 100644 --- a/src/core/containers/schemes.jsx +++ b/src/core/containers/schemes.jsx @@ -7,6 +7,7 @@ export default class SchemesContainer extends React.Component { specActions: PropTypes.object.isRequired, specSelectors: PropTypes.object.isRequired, getComponent: PropTypes.func.isRequired, + children: PropTypes.any } render () { diff --git a/src/core/plugins/oas3/components/servers-container.jsx b/src/core/plugins/oas3/components/servers-container.jsx index 1b5dd997139..819c4e58674 100644 --- a/src/core/plugins/oas3/components/servers-container.jsx +++ b/src/core/plugins/oas3/components/servers-container.jsx @@ -15,7 +15,6 @@ export default class ServersContainer extends React.Component { const servers = specSelectors.servers() - const Col = getComponent("Col") const Servers = getComponent("Servers") return servers && servers.size ? (