Document how a config field reads the blueprint's other fields
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 40/100
- Tipo di issue
- Documentazione
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- javascript
- Ambito
- documentation
Direzione di ricerca
Start in the fieldtype documentation page of the statamic/docs repo, where injectPublishContext() is already covered, and look for a place to describe sibling-field access. Read the blueprint builder source for suggestableConditionFieldsProvider and its set-scoped variant, and check how the field-settings component receives suggestableConditionFields. Done means the page either documents a supported way for a config field to read sibling fields, including inside Replicator and Bard sets, or the issue gets a maintainer answer naming the supported API.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The fieldtype docs cover how a fieldtype's own component reads other values in the form (injectPublishContext()), but not how a config field reads the other fields of the blueprint being edited. A config field is a component rendered inside the field-settings panel of the blueprint builder.
Use case
A custom date fieldtype offers "earliest date" and "latest date" config options. Each should be a select that lists the blueprint's other date fields, so a boundary can reference a sibling field by handle. To populate that select, the config field's Vue component needs the list of fields in the blueprint.
What works today (v6.26.0)
The only mechanism found is the blueprint builder's provided suggestableConditionFieldsProvider, the same provider the field-conditions builder uses:
inject: {
suggestableConditionFieldsProvider: { default: null },
},
computed: {
siblingFields() {
return this.suggestableConditionFieldsProvider?.suggestableFields?.() ?? [];
},
},
suggestableFields() returns the flat field list ({ handle, type, config: { display, ... } }).
Two things make it hard to rely on:
- It isn't documented, so it's unclear whether it's meant for addons or may change between releases.
- It behaves differently inside a Replicator or Bard set. There, the nearest provider is the set-scoped variant, whose
suggestableFields(vm)readsvm.section.fieldsand throws when called without an argument. A config field has nosectionto pass, so the set's sibling fields have to be found by walking$parentto the field-settings component, which receives them as asuggestableConditionFieldsarray.
injectPublishContext() doesn't cover this: inside the field-settings panel it resolves to the field's own config values, not the parent blueprint's fields.
Request
Either:
- document
suggestableConditionFieldsProvider(or whatever is intended for this) on the fieldtype page, including how it behaves inside sets; or - say which supported API a config field should use to read sibling fields, if the provider is internal.
- Lingua principale
- PHP
- Stelle
- 133
- Fork
- 405
- Merge medio
- 2g 2h
- PR unite (30g)
- 11
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di statamic/docs
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Chunked UploadsAperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
Installation / Deployment Guides
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
Document how conditions treat empty and null valuesForse già presa @joshdaugherty l’ha presa 16 giorni fa. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 25/100
I maintainer di solito rispondono entro 1 giorno
-
Document the `query_scope` search index optionForse già presa @joshdaugherty l’ha presa 16 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 18/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di statamic/docs
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
Automattic/blocks-engine#2866 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
community-scripts/ProxmoxVE#17944 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
EasyCorp/EasyAdminBundle#7861 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Good first issue: add laravel-inertia stack budget preset (Laravel 11 + Inertia.js + PHP 8.3)Apertaenhancement good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
backend gamification P0
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
semanadeinformatica/website#461 ·