Add specific UI elements for some common input variables data types

未关闭
#640 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
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 小时
30 天内合并 PR
23

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Automattic/remote-data-blocks 的其他 Issue

查看 Automattic/remote-data-blocks 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。