mirror of
https://github.com/discourse/discourse.git
synced 2025-02-22 08:00:53 +08:00

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. ``` <button class="sidebar-section-header sidebar-section-header-collapsable btn-flat btn no-text " aria-controls="sidebar-section-content-categories" aria-expanded="true" title="Toggle section" type="button"> ... </button> ``` 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: ``` <button class="sidebar-section-header sidebar-section-header-collapsable btn-flat btn no-text" aria-controls="sidebar-section-content-categories" aria-expanded="true" title="Toggle section" type="button"> ... </button> ```