2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-10-03 17:21:20 +08:00
Commit graph

7 commits

Author SHA1 Message Date
chapoi
759fc04041
UX: rework button classes (#34882)
Context: The `btn` mixin is used for every functional button, but this
includes button elements that are not, or should not be, styled like our
default or primary buttons.

To change how this works this commit:
* stripped down the mixin to the bare essentials, mainly limiting to the
properties that use variables.
* moved most things into the `btn` class
* moved some things into specific descriptive classes (default, danger,
success) such as border-radius
Example of button that does not need a border-radius and would benefit
from this:
<img width="464" height="184" alt="CleanShot 2025-09-19 at 12 56 04@2x"
src="https://github.com/user-attachments/assets/e908b2cf-971f-4c1f-aade-7492bad2f89c"
/>

* Deprecated…
  * FlatButton component
* btn-active: we should use the proper pseudoclass :active or a –-active
modifier in code if we need it
* btn-text: every button by default is a btn-text. We already have a
class to indicate when it isn’t (no-text)
* fixed btn-link property to make DButton component behave like an
inline link (no padding, link-styling)
* Since I moved styling from .btn, ths means every button now needs a
specific declaration. So I’ve added btn-default where necessary.
* Fixed btn-flat hover effect: The difference between btn-flat and
btn-transparent was getting very ambiguous. I’ve fixed the hover effect
for btn-flat so that the distinction is:
<img width="1094" height="408" alt="image"
src="https://github.com/user-attachments/assets/addf56a9-1f61-463d-abd9-5028a3b88fad"
/>
* Changed the custom icon colour from header icons so it follows the
normal btn-flat styling, the way the sidebar icon already was doing.
(Consistency)


**Other small button-related change along the way**
What | BC | AC |
|----| ----|--------|
Inconsistent save/cancel colours | <img width="1720" height="1084"
alt="CleanShot 2025-09-19 at 15 31 40@2x"
src="https://github.com/user-attachments/assets/227289c3-6ded-4633-868d-6e33c32d83c3"
/> | <img width="1720" height="1084" alt="CleanShot 2025-09-19 at 15 30
56@2x"
src="https://github.com/user-attachments/assets/b23f96c9-04f3-40ea-9fba-2be59eae8e64"
/> |

---------

Co-authored-by: Martin Brennan <martin@discourse.org>
2025-10-02 13:32:36 -06:00
Jarek Radosz
f3c6260e1b
DEV: Convert InlineEditCheckbox to glimmer (#34030) 2025-08-11 15:12:09 +02:00
Jarek Radosz
ce6368ca98
DEV: Enable ember/no-classic-components (#33978)
…and apply lint-to-the-future
2025-07-30 14:54:24 +02:00
David Taylor
b29e0b6e1b
DEV: [gjs-codemod] convert admin files to gjs
Updated using `@embroider/template-tag-codemod`, plus some manual fixups.
2025-03-25 16:59:21 +00:00
David Taylor
b203954060
DEV: [gjs-codemod] merge js and hbs 2025-03-25 16:59:13 +00:00
David Taylor
9f9282e070
DEV: [gjs-codemod] renamed js to gjs 2025-03-25 16:59:06 +00:00
David Taylor
596db5966c
DEV: [gjs-codemod] renamed hbs to gjs 2025-03-25 16:58:57 +00:00
Renamed from app/assets/javascripts/admin/addon/components/inline-edit-checkbox.hbs (Browse further)