From 3b75120b3dae491df7e4f6cf3920072baff83e2c Mon Sep 17 00:00:00 2001 From: Penar Musaraj Date: Thu, 3 Feb 2022 13:50:24 +0100 Subject: [PATCH] UX: Support `type=search` inputs in inline forms (#15790) --- app/assets/stylesheets/common/foundation/base.scss | 4 +++- .../templates/styleguide/atoms/05-input-fields.hbs | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/common/foundation/base.scss b/app/assets/stylesheets/common/foundation/base.scss index e1a47dbd712..972e2f7ac7c 100644 --- a/app/assets/stylesheets/common/foundation/base.scss +++ b/app/assets/stylesheets/common/foundation/base.scss @@ -167,13 +167,15 @@ input[type="submit"] { display: flex; } - > input[type="text"] { + > input[type="text"], + > input[type="search"] { display: inline-flex; flex: 1; } > .select-kit, > input[type="text"], + > input[type="search"], > label, > .btn, > .d-date-input { diff --git a/plugins/styleguide/assets/javascripts/discourse/templates/styleguide/atoms/05-input-fields.hbs b/plugins/styleguide/assets/javascripts/discourse/templates/styleguide/atoms/05-input-fields.hbs index b9f95285153..d3b743b793a 100644 --- a/plugins/styleguide/assets/javascripts/discourse/templates/styleguide/atoms/05-input-fields.hbs +++ b/plugins/styleguide/assets/javascripts/discourse/templates/styleguide/atoms/05-input-fields.hbs @@ -62,6 +62,12 @@ {{/styleguide-example}} +{{#styleguide-example title="full-width inline-form with search type input"}} +
+ {{input placeholder="Search type input" type="search"}} +
+{{/styleguide-example}} + {{#styleguide-example title="category-notifications-button and regular button"}}
{{category-notifications-button category=dummy.categories.[0] value=1 onChange=(action "dummy")}}