discourse/plugins/discourse-solved/lib
chapoi 6f4c1f569d
UX: solved styling (#39180)
This PR restyls the "accepted answer" block in the discourse-solved
plugin, migrating to BEM naming and a more polished visual design.

* Restyled accepted answer component — The header now has a green
($solved-color) background bar with "Solved" title and control buttons.
The solver/accepter info moves from the header into a new footer below
the excerpt.

* BEM class naming — Replaces legacy classes (accepted-answer--solver,
.title, .quote-controls, etc.) with BEM-style .d-solved-answer__header,
__footer, __toggle, __jump, __solver, __accepter, etc.

* Added solver avatar — Includes boundAvatarTemplate in the footer and
passes avatar_template from the backend via
[topic_extension.rb](vscode-webview://0itsi2fkldlqt7ao0fhnjmcj3f36nlt6a1dulngjq32mhir0rnuo/plugins/discourse-solved/lib/discourse_solved/topic_extension.rb).

* Updated copy — "Solved by %{user} in %{post}" → "by %{user} in
%{post}" and "Marked as solved by %{user}" → "accepted by %{user}"
(lowercase, less verbose).

* InterpolatedTranslation::Placeholder gets @class param — New optional
class argument on the <Placeholder> component that applies a CSS class
to the placeholder's wrapper element. This to avoid having to wrap in a
double span just to be able to target it with a class.

* Removed mobile-specific stylesheet —
[mobile/solutions.scss](vscode-webview://0itsi2fkldlqt7ao0fhnjmcj3f36nlt6a1dulngjq32mhir0rnuo/plugins/discourse-solved/assets/stylesheets/mobile/solutions.scss)
deleted entirely; no specific responsive behaviour needed

* Removed `<UserLink>` wrapper from both the solver and accepter
usernames to limit the amount of click targets

| BC | AC |
|--------|--------|
| <img width="1464" height="1270" alt="CleanShot 2026-04-09 at 15 48
48@2x"
src="https://github.com/user-attachments/assets/2da27a02-ccc6-4a7f-9f74-8f8785ce5fcd"
/> | <img width="1458" height="1198" alt="CleanShot 2026-04-09 at 15 37
50@2x"
src="https://github.com/user-attachments/assets/dc2bb932-1a14-4bc9-894d-bf9e518a0357"
/> |

No functionality changes.
2026-04-09 20:53:38 +02:00
..
discourse_automation
discourse_dev DEV: add service objects for accept_answer and unaccept_answer (#37878) 2026-03-04 12:34:37 +04:00
discourse_solved UX: solved styling (#39180) 2026-04-09 20:53:38 +02:00