mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-06-19 09:24:23 +08:00
Currently the AI features settings pages show site settings in one big list, making it difficult to navigate. Each setting also needs to be saved individually. This converts all AI feature settings pages to use FormKit with settings grouped by theme... for example, AI Helper (/admin/plugins/discourse-ai/ai-features/5/edit) has 4 groups: Access & Permissions, Enabled Features, Automation, Personas. Now these settings are all saved together as a single form, with the setting field component acting as a bridge to site settings. Also includes: - Fixes FormKit warning for unsaved changes from subroutes (the back button wasn't working) - Adds `@route` support to breadcrumbs (helps fix the unsaved changes issue above) - Hides "(optional)" labels on all fields via scoped CSS (temporary, eventually needs a feature in FormKit) Setting groups are managed in `ai-feature-setting-groups.js` Example before/after for the AI Helper settings... Before: <img width="573" alt="image" src="https://github.com/user-attachments/assets/679eb40b-5c33-4815-9b45-c988333d9db0" /> <img width="616" alt="image" src="https://github.com/user-attachments/assets/58822b9f-66a0-451b-89ce-ab63e5c73164" /> After: <img width="415" alt="image" src="https://github.com/user-attachments/assets/8ba019b6-afe1-488a-bc52-f0ed68dcc3d5" /> <img width="988" alt="image" src="https://github.com/user-attachments/assets/8a7f4091-9d95-47aa-a479-510f77bd703d" />
6 lines
131 B
SCSS
Vendored
6 lines
131 B
SCSS
Vendored
.ai-feature-editor {
|
|
.form-kit__container-optional {
|
|
// ideally need to add this ability to formkit
|
|
display: none;
|
|
}
|
|
}
|