From 941e79d33c171a9a45de96f0306cbef85fc0687c Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Thu, 13 Oct 2022 22:29:25 +0200 Subject: [PATCH] Adjust layout of comment input --- app/javascript/styles/components/_comments.scss | 4 ++++ app/views/answerbox/_comments.haml | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/javascript/styles/components/_comments.scss b/app/javascript/styles/components/_comments.scss index 092a4989..88fa3311 100644 --- a/app/javascript/styles/components/_comments.scss +++ b/app/javascript/styles/components/_comments.scss @@ -24,6 +24,10 @@ &__input { z-index: 99; padding-right: 2.5rem; + + &.is-invalid { + background-image: none; + } } &__character-count { diff --git a/app/views/answerbox/_comments.haml b/app/views/answerbox/_comments.haml index 5fecefd3..476fd098 100644 --- a/app/views/answerbox/_comments.haml +++ b/app/views/answerbox/_comments.haml @@ -27,7 +27,5 @@ - if user_signed_in? .form-group.has-feedback.comment__input-group.input-group{ name: "ab-comment-new-group", data: { a_id: a.id, controller: "character-count", "character-count-max-value": 160 } } %input.form-control.comment__input{ type: :text, placeholder: t(".placeholder"), name: "ab-comment-new", data: { a_id: a.id, "character-count-target": "input" } } - %span.text-muted.form-control-feedback.comment__character-count{ id: "ab-comment-charcount-#{a.id}", data: { "character-count-target": "counter" } } 0 / 160 - .input-group-append - %button.btn.btn-primary{ type: :button, name: "ab-comment-new-submit", data: { a_id: a.id, "character-count-target": "action" } }= t(".action") %span.text-muted.form-control-feedback.comment__character-count{ id: "ab-comment-charcount-#{a.id}", data: { "character-count-target": "counter" } } 160 + %button.btn.btn-primary.d-none{ type: :button, name: "ab-comment-new-submit", data: { a_id: a.id, "character-count-target": "action" } }= t(".action")