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

Aperta
#2,038 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript, yaml
Ambito
frontend

Direzione di ricerca

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.

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

Descrizione

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.

Lingua principale
TypeScript
Stelle
5
Fork
4
Merge medio
1g 19h
PR unite (30g)
144

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 HarperFast/studio

Tutte le issue di HarperFast/studio

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.