[6.x]: UI API doesn't appear to have a scoped container Node to nest a component's settingsUi() under a path

已关闭
#19,908 1 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

维护者通常 1 天内回复

@riasvdv 已经在做这个了。

开始于 2026年10月9日。

评估

这个 Issue 还没有评估数据。

描述

bug repo:cms
What happened?

ConfigurableComponentInterface::settingsUi() declares Control paths relative to the component's settings (as docs/ui.md recommends). When that UI is embedded inside a larger UI — e.g. a field layout element on an element edit page that shows the selected component's settings under settings — there's no way to place it under a path prefix.

The twig equivalent was something like:

{% namespace 'providerSettings' %}
  {{ provider.getSettingsHtml()|raw }}
{% endnamespace %}

In the inertia page context it appears:

  • UiContext::$namespace applies to a whole resolved UI, not a subtree.
  • Group children "resolve at the surrounding namespace", so they keep their declared paths.

We currently walk the UI and re-path each Field's Control with Control::withPath() (and give them one delta group so the editor submits the whole settings array instead of replacing it with the single changed key). It works, but it's a stopgap that every plugin with component settings will rewrite.

What would help: a container Node like Scope::make(['settings'], $component->settingsUi()->nodes()) that resolves its children under a path prefix (and optionally assigns a shared delta group).

Craft CMS version

6.0.0-alpha.20

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions
主要语言
PHP
星标
3.6k
派生
712
平均合并
12 小时 44 分钟
30 天内合并 PR
381

环境准备

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

从这里开始

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

craftcms/cms 的其他 Issue

查看 craftcms/cms 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

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