0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-06 13:08:40 +08:00
discourse/plugins/discourse-solved/lib/discourse_solved
Krzysztof Kotlarek 1101080b10
FEATURE: Add a Support section to the admin dashboard0 (#41359)
Previously, the redesigned admin dashboard couldn't show how a community
handles its support topics, and plugins had no way to contribute their
own dashboard sections — only individual highlight KPIs.
This change adds a register_admin_dashboard_section plugin API and uses
it in discourse-solved to add a Support section for communities with at
least one category where accepted answers are enabled.

**Core: register_admin_dashboard_section**

A new plugin API (mirroring the existing highlight-KPI registration)
lets a plugin register a dashboard section with an id, an optional
enabled gate, and a data loader; the JS
api.registerAdminDashboardSection(id, component) supplies the matching
client component. The section configuration, parallel loader, and
dashboard component render registered sections dynamically alongside the
core ones.

Also in the core commit: the dev database pool is raised so the
dashboard's parallel section loader isn't starved of connections with an
extra section, and a stray db-section__row-block divider on mobile is
fixed.

**Support section (discourse-solved)**

For the selected period, scoped to categories where "Allow topic owner
and staff to mark a reply as the solution" is enabled, the section
shows:

- KPIs with previous-period deltas: resolution rate (drill-through to
the accepted_solutions report), staff involvement, and average
first-reply time.
- Topic outcomes - resolved / in progress / unanswered.
- Who's answering - a breakdown of repliers by trust level and staff.
- Response time distribution - first-reply times bucketed into <1h,
1–4h, 4–24h, >24h, with a faster/slower trend.
- A category filter when more than one support category exists.

Screenshots:
<img width="804" height="748" alt="Screenshot 2026-07-02 at 10 58 13 am"
src="https://github.com/user-attachments/assets/8e938a5e-93df-446f-885c-3d779431ab9b"
/>
<img width="396" height="789" alt="Screenshot 2026-07-02 at 10 58 01 am"
src="https://github.com/user-attachments/assets/9a9a171d-42d9-482c-950c-5daad055a746"
/>

---------

Co-authored-by: chapoi <101828855+chapoi@users.noreply.github.com>
2026-07-06 09:31:51 +08:00
..
accepted_answer_cache.rb
accepted_answers_helper.rb FIX: Ensure 'accepted answers' can never include whispers (#40797) 2026-06-12 09:18:00 +01:00
admin_dashboard_support.rb FEATURE: Add a Support section to the admin dashboard0 (#41359) 2026-07-06 09:31:51 +08:00
category_extension.rb FEATURE: make shared issues optional per-category (#40501) 2026-06-04 11:58:28 -04:00
engine.rb
first_accepted_post_solution_validator.rb DEV: Allow multiple solutions in solved plugin (#39806) 2026-05-28 07:12:28 -05:00
guardian_extensions.rb UX: don't show shared issue button on deleted, disable for closed (#41351) 2026-07-02 12:03:58 -04:00
post_mover_extension.rb DEV: Allow multiple solutions in solved plugin (#39806) 2026-05-28 07:12:28 -05:00
post_serializer_extension.rb
queries.rb DEV: Allow multiple solutions in solved plugin (#39806) 2026-05-28 07:12:28 -05:00
register_filters.rb DEV: Hand-pick Rails/WhereNot autofixes (#35117) 2025-10-03 13:29:22 +02:00
schema_utils.rb FIX: prevent empty QA Page schema in Solved (#40471) 2026-06-02 22:43:49 +08:00
seed_admin_dashboard_reports.rb DEV: Scaffold backend for the new admin dashboard Reports section (#40017) 2026-05-20 09:53:26 +03:00
topic_extension.rb DEV: Allow multiple solutions in solved plugin (#39806) 2026-05-28 07:12:28 -05:00
topic_posters_summary_extension.rb DEV: Allow multiple solutions in solved plugin (#39806) 2026-05-28 07:12:28 -05:00
topic_view_serializer_extension.rb FIX: Show solved status on topic titles loaded directly (#41186) 2026-06-25 15:28:24 +02:00
user_extension.rb FEATURE: add solved me too button (#39652) 2026-05-13 17:03:25 +04:00
user_summary_extension.rb DEV: refactor user card/summary accepted answer's query (#35500) 2025-10-31 08:49:36 +01:00
web_hook_extension.rb