Nested Replicator inside Bard set remounts and resets collapsed state on field interaction
Maintainer thường phản hồi trong vòng 1 ngày
Một pull request liên quan đã được merge.
- #15688 của @edalzell — đã merge
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
Hướng nghiên cứu
Start by tracing the Bard NodeView attribute sync and the Replicator initialization from node.attrs.values and meta.collapsed; the issue does not name source files or tests. Reproduce the nested Bard → set → Replicator → Grid interaction and inspect whether a remount resets expanded state. Done means editing a nested field preserves the expanded set.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Bug description
When a Replicator (with collapse: true) lives inside a Bard set, interacting with nested fields (e.g. Grid stacked rows, nested Bard) destroys and remounts the parent Bard NodeView. The nested Replicator re-initializes from meta.collapsed, which still lists every set as collapsed from page load, so an expanded set snaps shut.
This makes nested page-builder blocks (Accordion / FAQ style sets with Grid + Bard inside) very hard to edit: open the set, click a field inside, the whole set collapses.
How to reproduce
- Bard field with a set that contains a Replicator (
collapse: true). - That Replicator set contains a Grid (stacked) and/or nested Bard fields.
- Edit an entry, expand one Replicator set.
- Click into a nested field (heading input, ProseMirror, field header, etc.).
- Observe: the Bard NodeView / Replicator DOM is remounted (
data-replicator-setnode replaced), and the set is collapsed again.
Evidence from debugging
- After expand:
data-collapsed="false". - After clicking nested UI: previous set node is gone (
document.contains(oldNode) === false), new node mounts withdata-collapsed="true"whencollapse: true. - The Replicator set header toggle button does not receive the click; collapse comes from remount +
collapsed: clone(this.meta.collapsed)re-init. - Workaround:
collapse: falseon the nested Replicator — remount still happens, but sets stay open.
Expected behaviour
Expanding a nested Replicator set should survive interaction with its own fields. Collapsed state (and preferably the set DOM) should not reset when nested values cause the parent Bard set NodeView to sync/remount.
Environment
- Statamic 6.36.0
- Reproduced in Chromium (Cursor browser) against a Prime site page-builder Bard → set → Replicator → Grid/Bard nest
Related
Possibly related to Bard NodeView attr sync / remount behaviour when nested publish values change (watcher updating node.attrs.values).
- Ngôn ngữ chính
- PHP
- Star
- 4.9k
- Fork
- 647
- Merge trung bình
- 1 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 138
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của statamic/cms
-
Setting up URL to a custom elevated session page in config/statamic/users.php won't work in CpĐang mởauth needs more info
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
statamic/cms#15698 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Make native filesystem directory permissions configurable to support shared POSIX ACL accessĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
accessibility
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[7.x] Reintroduce parser error for mixed pipe/shorthand modifier syntaxCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởantlers
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày
-
caching nocache
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
statamic/cms#15643 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 87/100
WordPress/phpunit-test-runner#364 ·
Maintainer thường phản hồi trong vòng 4 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
EasyCorp/EasyAdminBundle#7875 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Sync EN] PDOException::getCode(): document the int|string return typeCó thể đã có người làm @lacatoire đã nhận hôm nay. Đang mởsync-en
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
sync-en
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 2 ngày