Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đã đóng
#19,908 1 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@riasvdv đang làm issue này rồi.

Từ ngày 9/10/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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
Ngôn ngữ chính
PHP
Star
3.6k
Fork
706
Merge trung bình
12 giờ 30 phút
Pull request đã merge (30 ngày)
274

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của craftcms/cms

Tất cả issue của craftcms/cms

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.