Build plugin settings from the component's options schema, and define presets as app templates

Đang mở
#2,038 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript, yaml
Lĩnh vực
frontend

Hướng nghiên cứu

Start with the settings form work in #2031 and the related form building in #2016; inspect how Studio currently defines CLUSTER_PRESETS and where component settings are saved. Use page and API caching as the stated test case, since it has the most settings. Done means forms can be built from plugin options schemas and saved to the loading app's config.yaml, and presets can be represented as app templates that can be added to an existing cluster.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Problem

A component page's settings form is a hand-listed fields array with a handful of input types, saved to a table record (#2031). Plugin policy needs richer inputs, and belongs in the loading app's config.yaml rather than a table. Cluster presets are also defined in Studio's own source (CLUSTER_PRESETS), so adding a solution means a Studio release, and a preset can't be added to a cluster that already exists.

Proposal
  • Settings from the schema: once a plugin publishes an options schema (HarperFast/harper#3722), Studio builds its settings form from it and saves to the app's config.yaml.
  • Field types for policy: arrays, key-value maps, lists of nested objects, durations, datetimes, and select options loaded from the cluster (tables, roles). Most fall out of the schema.
  • Presets as app templates: a preset is data, not Studio code: the plugins to load, a prefilled config.yaml, and the few inputs the create form asks for. That takes CLUSTER_PRESETS out of Studio, and lets a cluster add a second solution later.
Related
  • #2016 builds settings forms for Harper's own settings. The two should share their form building.
  • #1267 asks to let a user enable and configure stock plugins.
Context

Raised in review of #2031 (comment). It suggests page and API caching as the test case, since it has the most settings.

🤖 Generated by Claude Code (Claude Opus 5.5); posted via @dawsontoth.

Ngôn ngữ chính
TypeScript
Star
5
Fork
4
Merge trung bình
1 ngày 12 giờ
Pull request đã merge (30 ngày)
65

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của HarperFast/studio

Tất cả issue của HarperFast/studio

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.