Document how a config field reads the blueprint's other fields
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 40/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- javascript
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- PHP
- スター
- 133
- フォーク
- 405
- 平均マージ
- 21時間 45分
- マージ済み PR(30日)
- 12
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
statamic/docs のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
Chunked Uploadsオープン
難易度 1/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
Installation / Deployment Guides
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
Document how conditions treat empty and null values対応中かも @joshdaugherty が 12 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 25/100
メンテナーはふだん 1 日以内に返信
-
Document the `query_scope` search index option対応中かも @joshdaugherty が 12 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 18/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
needs-triage Platform(Default)
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
Feature-Request
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
RSS-Bridge/rss-bridge#5123 ·
メンテナーはふだん 1 日以内に返信
-
[Store] RstLoader detects headings inside indented code blocks対応中かも @lazerg が今日担当しました。 オープンBug Status: Needs Review Store
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
bug repo:ckeditor
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
No Code Attached Yet
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
joomla/joomla-cms#48611 ·
メンテナーはふだん 1 日以内に返信