From 78500fb77017ae1defd9d1a77f26164493847624 Mon Sep 17 00:00:00 2001 From: Penar Musaraj Date: Wed, 7 Aug 2019 15:00:03 -0400 Subject: [PATCH] UX: Improve layout of poll builder modal --- .../templates/modal/poll-ui-builder.hbs | 6 ++-- .../stylesheets/common/poll-ui-builder.scss | 34 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/plugins/poll/assets/javascripts/discourse/templates/modal/poll-ui-builder.hbs b/plugins/poll/assets/javascripts/discourse/templates/modal/poll-ui-builder.hbs index d4cd3cdf70d..eced3d2ba13 100644 --- a/plugins/poll/assets/javascripts/discourse/templates/modal/poll-ui-builder.hbs +++ b/plugins/poll/assets/javascripts/discourse/templates/modal/poll-ui-builder.hbs @@ -19,13 +19,13 @@ {{#if showMinMax}}
- {{input-tip validation=minMaxValueValidation}} {{input type='number' value=pollMin valueAttribute="value" class="poll-options-min"}}
+ {{input-tip validation=minMaxValueValidation}}
@@ -44,8 +44,8 @@ valueAttribute="value" min="1" class="poll-options-step"}} - {{input-tip validation=minStepValueValidation}}
+ {{input-tip validation=minStepValueValidation}} {{/if}} {{/if}} @@ -53,8 +53,8 @@
{{textarea value=pollOptions autocomplete="discourse"}} - {{input-tip validation=minNumOfOptionsValidation}}
+ {{input-tip validation=minNumOfOptionsValidation}} {{/unless}}
diff --git a/plugins/poll/assets/stylesheets/common/poll-ui-builder.scss b/plugins/poll/assets/stylesheets/common/poll-ui-builder.scss index 723f332ef44..e807a713342 100644 --- a/plugins/poll/assets/stylesheets/common/poll-ui-builder.scss +++ b/plugins/poll/assets/stylesheets/common/poll-ui-builder.scss @@ -1,3 +1,5 @@ +$poll-margin: 10px; + .poll-ui-builder-form { margin: 0; @@ -8,31 +10,29 @@ .tip { display: block; - } - - .input-group-label { - display: inline-block; - min-width: 55px; + margin-bottom: $poll-margin * 1.5; + margin-top: $poll-margin / 2; + font-size: $font-down-1; } .poll-select { - line-height: 3em; + margin-bottom: $poll-margin; + display: flex; + align-items: center; + } + + .input-group-label { + min-width: 85px; } .poll-number { - margin: 8px 0; - - .tip { - margin-bottom: 6px; - } + margin: $poll-margin 0; + display: flex; + align-items: center; input { width: 70px; } - - input + .tip { - margin-top: 4px; - } } .poll-textarea textarea { @@ -42,10 +42,10 @@ } .poll-select + .poll-textarea { - margin-top: 12px; + margin-top: $poll-margin; } .poll-checkbox { - margin-top: 4px; + margin-top: $poll-margin / 2; } }