[Feature] 插件配置项支持折叠:以 template_list 的折叠条目为例,让插件配置不再占满设置页面

Aperta
#11,058 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@XTsat ci sta già lavorando.

Dal 9/11/2026.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

Start by reading dashboard/src/components/shared/AstrBotConfig.vue and AstrBotConfigV4.vue, then compare how TemplateListEditor.vue folds template entries and displays their summaries. Work out how folding should apply to ordinary plugin configuration groups while preserving the existing core settings behavior; done means users can identify groups from their collapsed summaries and expand them to edit their fields.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement
功能描述

当前 WebUI 的配置渲染是完全平铺的:

  • 插件配置页(dashboard/src/components/shared/AstrBotConfig.vue):object 类型递归渲染整棵子树,所有字段一行行往下排,没有任何折叠;
  • 核心配置页(AstrBotConfigV4.vue):虽然有左侧导航和分组标题,但分组内部依然全部平铺,只有 collapsed: true 的字段会被塞进统一的「更多配置」开关里(而且插件配置页连这个都没实现);
  • 唯一具备折叠能力的是 template_list 的条目(TemplateListEditor.vue):每条模板条目折叠成一行标题 + display_item 摘要,点开才渲染字段。

结果是:插件越复杂,配置页越长,用户只能靠滚动条盲找,找不到想要改的那一项。

使用场景
  1. 一屏的信息密度:一个含 3 条模板、每条 6 个字段的 template_list,平铺是 18 行表单项,且完全分不清哪一行属于哪个条目;折叠后是 3 行标题(Attribute Name: my-adapter),一眼看清"有几条、分别是什么",需要细节时再展开。
  2. 定位成本:折叠态一屏能看到十几个配置组,平铺态一屏只能看到三五个字段;找配置从"滚动 + 肉眼扫描"变成"看标题 + 点开"。
  3. 折叠标题即摘要:display_item 让用户不展开就知道当前值,折叠不等于信息丢失——这套模式完全可以搬到普通配置分组上。

我用邪道把所有设置都写到模板里面了,可以看到折叠之后整体信息获取能力和修改配置方面都有极大的提升

原先十页的配置可以压缩到两页以内,只需要专注自己需要修改的设置,现在必须现在设置里面一直找到自己要改的类目

(我这个是有几个在下面没有压缩,也就是把主要核心设置不折叠,然后专用一个方向的功能都分别折叠)

Image Image
检查清单
  • 我已在 Issue 列表中搜索过相关功能,确认该功能想法从未被提出过。
  • 我建议的功能与 AstrBot 本体相关,而非在建议某一插件的功能。
  • 我已阅读并同意本项目的贡献者行为准则。
  • (可选)我愿意提交 PR 以帮助实现该功能。
Lingua principale
Python
Stelle
46.4k
Fork
3.4k
Merge medio
1g 11h
PR unite (30g)
120

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di AstrBotDevs/AstrBot

Tutte le issue di AstrBotDevs/AstrBot

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.