mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-14 22:59:00 +08:00
Allow admins to configure which sections they want to see.
A few tasks in this commit:
- rename the "Customise" menu to "Configure" and removes the calendar
icon from the Custom date range option
- implements the Configure menu:
- toggle section visibility
- drag-and-drop reorder on desktop, up/down arrows on mobile
- empty state when all sections are off
- persists configuration site-wide on menu close via
`admin_dashboard_sections` site setting
- admins and moderators can view, but admins write and moderators read
- `AdminDashboardSectionConfiguration` owns configuration, so storage
can change later if we move to per-user
- `PUT /admin/dashboard/configuration.json` is admin-only (mentioned
above)
- audit log (`SiteSetting.set_and_log`)
- the backend filters `sections` payload to only the visible-and-ordered
list, so mods render the layout admins set without seeing the
configuration meta
- hidden sections skip their server-side data computation
|
||
|---|---|---|
| .. | ||
| components | ||
| modals | ||
| pages | ||
| cdp.rb | ||