From b4611114f960e3aedcc6fa44d7f51c6148517b94 Mon Sep 17 00:00:00 2001 From: Alan Guo Xiang Tan Date: Mon, 12 Jun 2023 09:29:21 +0900 Subject: [PATCH] DEV: Use `concat-class` helper when setting class for `DButton` (#21998) Why this change? Currently, we're interpolating within a string to set the class for the `DButton` component. However, the interpolation and formatting of our handlebars templates result in unnecessary spaces being added to the class attribute. ``` ``` This makes the HTML elements for buttons hard to read especially when we're debugging issues in the console. After this change, this is what we get: ``` ``` --- .../discourse/app/components/d-button.hbs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/app/assets/javascripts/discourse/app/components/d-button.hbs b/app/assets/javascripts/discourse/app/components/d-button.hbs index 09b44b2ed2e..4719a12dacd 100644 --- a/app/assets/javascripts/discourse/app/components/d-button.hbs +++ b/app/assets/javascripts/discourse/app/components/d-button.hbs @@ -1,11 +1,13 @@ {{! template-lint-disable no-down-event-binding }}