discourse/plugins/chat
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
..
admin/assets/javascripts DEV: Replace deprecated Ember's array sortBy with sort (#34998) 2025-09-26 13:38:26 -03:00
app DEV: Clean up scope resolution operators in plugins (#34979) 2025-09-30 14:36:34 +02:00
assets UX: rework button classes (#34882) 2025-10-02 13:32:36 -06:00
config Update translations (#35065) 2025-09-30 16:06:14 +02:00
db DEV: Promote historic core plugins post_deploy migrations (#34274) 2025-08-13 15:52:19 +08:00
lib DEV: Clean up scope resolution operators in plugins (#34979) 2025-09-30 14:36:34 +02:00
public
spec Revert "FIX: notification reminder is deleted with bookmark (#35069)" (#35138) 2025-10-02 17:56:51 +10:00
test/javascripts FIX: hides redundant chat icon on mobile chat routes (#35015) 2025-10-01 22:34:15 +08:00
about.json DEV: Only load specific plugin bundles during qunit test (#33678) 2025-07-21 21:00:48 +01:00
plugin.rb FIX: Catch possible PG exception from Chat::AutoJoinChannels (#34132) 2025-08-07 12:50:22 +02:00
README.md DEV: Chat service object initial implementation (#19814) 2023-02-13 13:09:57 +01:00

This plugin is still in active development and may change frequently

Documentation

The Discourse Chat plugin adds chat functionality to your Discourse so it can natively support both long-form and short-form communication needs of your online community.

For user documentation, see Discourse Chat.

For developer documentation, see Discourse Documentation.