Add specific UI elements for some common input variables data types

オープン
#640 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
php
領域
frontend

調査の方向性

まず、ブロック UI で入力変数がどのようにレンダリングされるかを追跡します。各フィールドに使用されている汎用テキスト入力に注目してください。bool 変数がチェックボックスまたはトグルとしてレンダリングされ、enum 変数がサポートされている値を含むセレクトとしてレンダリングされれば完了です。issue では特定のファイルやテストは指定されていません。

索引モデルが issue の本文から書いたものです。

説明

enhancement

For every input variable you add to a block, you get the same generic text input field in the UI.

In the future, it would be great to make the UI component to match the best UI for the specific data type. Integers, dates, etc. It would be also awesome to have hooks to allow plugin developers to use their own components to handle the fields.

But for starters, it would be great if we could add two basic field types:

  • bool - render a checkbox or toggle
  • enum - render a select

At Newspack, we have some usecases that could really use these. For example, in a list block, the API allow you to choose how to order the list. We can do this, but the user needs to know what are the supported fields, and type them perfectly. This could be easily acheived with an enum and a selectbox.

主要言語
PHP
スター
86
フォーク
14
平均マージ
1日 5時間
マージ済み PR(30日)
23

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Automattic/remote-data-blocks のほかの issue

Automattic/remote-data-blocks の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。