Commit 07c7edd3 authored by Eric Eastwood's avatar Eric Eastwood

Update variable rows to be full width with extra button

See https://gitlab.slack.com/archives/C5XGWBRJA/p1499355359953774
parent 8a950baf
...@@ -153,6 +153,7 @@ $code_line_height: 1.6; ...@@ -153,6 +153,7 @@ $code_line_height: 1.6;
* Padding * Padding
*/ */
$gl-padding: 16px; $gl-padding: 16px;
$gl-col-padding: 15px;
$gl-btn-padding: 10px; $gl-btn-padding: 10px;
$gl-input-padding: 10px; $gl-input-padding: 10px;
$gl-vert-padding: 6px; $gl-vert-padding: 6px;
...@@ -443,6 +444,7 @@ $logs-p-color: #333; ...@@ -443,6 +444,7 @@ $logs-p-color: #333;
/* /*
* Forms * Forms
*/ */
$input-height: 34px;
$input-danger-bg: #f2dede; $input-danger-bg: #f2dede;
$input-danger-border: $red-400; $input-danger-border: $red-400;
$input-group-addon-bg: #f7f8fa; $input-group-addon-bg: #f7f8fa;
......
...@@ -79,42 +79,60 @@ ...@@ -79,42 +79,60 @@
margin-left: 0; margin-left: 0;
margin-bottom: 0; margin-bottom: 0;
padding-left: 0; padding-left: 0;
list-style: none;
clear: both;
} }
.pipeline-variable-row { .pipeline-variable-row {
display: flex; display: flex;
align-items: flex-end;
&:not(:last-child) { &:not(:last-child) {
margin-bottom: $gl-btn-padding; margin-bottom: $gl-btn-padding;
} }
@media (max-width: $screen-xs-max) { @media (max-width: $screen-sm-max) {
flex-wrap: wrap; padding-right: $gl-col-padding;
} }
&:last-child { &:last-child {
& > .pipeline-variable-row-remove-button { & .pipeline-variable-row-remove-button {
display: none; display: none;
} }
& > .pipeline-variable-value-input { @media (max-width: $screen-sm-max) {
& .pipeline-variable-value-input {
margin-right: $pipeline-variable-remove-button-width;
}
}
@media (max-width: $screen-xs-max) {
.pipeline-variable-row-body {
margin-right: $pipeline-variable-remove-button-width; margin-right: $pipeline-variable-remove-button-width;
} }
} }
}
} }
.pipeline-variable-key-input { .pipeline-variable-row-body {
margin-right: $gl-btn-padding; display: flex;
width: calc(75% - #{$gl-col-padding});
padding-left: $gl-col-padding;
@media (max-width: $screen-sm-max) {
width: 100%;
}
@media (max-width: $screen-xs-max) { @media (max-width: $screen-xs-max) {
margin-right: $pipeline-variable-remove-button-width; display: block;
margin-bottom: $gl-btn-padding;
} }
} }
.pipeline-variable-value-input { .pipeline-variable-key-input {
margin-right: $gl-btn-padding;
@media (max-width: $screen-xs-max) { @media (max-width: $screen-xs-max) {
flex: 1; margin-bottom: $gl-btn-padding;
} }
} }
...@@ -124,6 +142,7 @@ ...@@ -124,6 +142,7 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
width: $pipeline-variable-remove-button-width; width: $pipeline-variable-remove-button-width;
height: $input-height;
padding: 0; padding: 0;
background: transparent; background: transparent;
border: 0; border: 0;
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
- key = local_assigns.fetch(:key, "") - key = local_assigns.fetch(:key, "")
- value = local_assigns.fetch(:value, "") - value = local_assigns.fetch(:value, "")
%li.js-row.pipeline-variable-row{ data: { is_persisted: "#{!id.nil?}" } } %li.js-row.pipeline-variable-row{ data: { is_persisted: "#{!id.nil?}" } }
.pipeline-variable-row-body
%input{ type: "hidden", name: "schedule[variables_attributes][][id]", value: id } %input{ type: "hidden", name: "schedule[variables_attributes][][id]", value: id }
%input.js-destroy-input{ type: "hidden", name: "schedule[variables_attributes][][_destroy]" } %input.js-destroy-input{ type: "hidden", name: "schedule[variables_attributes][][_destroy]" }
%input.js-user-input.pipeline-variable-key-input.form-control{ type: "text", %input.js-user-input.pipeline-variable-key-input.form-control{ type: "text",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment