Inserting a synced pattern from the iOS block inserter adds an unsynced copy
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 75/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- ios, javascript
Hướng nghiên cứu
Bắt đầu với src/components/native-inserter/index.jsx và kiểm tra insertPattern, sau đó so sánh hành vi của nó với tab Reusable blocks của trình chèn gốc và trình chèn của WP Admin. Thực hiện lại các bước trên iOS với một pattern đã đồng bộ và xác nhận khối được chèn vẫn liên kết với nguồn của nó; vấn đề được giải quyết khi các chỉnh sửa sau đó đối với pattern cập nhật khối đã chèn.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
Synced patterns stay linked to their source, so editing the pattern updates every post that uses it. When a synced pattern is inserted from the Patterns section of the native block inserter on iOS, the editor adds a plain copy of its blocks instead. Later changes to the pattern don't reach the post, and nothing tells the user the link was lost.
The Patterns sheet lists the site's own patterns under "Uncategorized", and doesn't show which ones are synced.
Expected: inserting a synced pattern adds a synced pattern block, as WP Admin's inserter does. The native inserter's "Reusable blocks" tab already does this.
Step-by-step reproduction instructions
- Create a synced pattern on the site.
- In the iOS editor, open the block inserter, then Patterns, then "Uncategorized".
- Tap the synced pattern.
- The inserted block is a regular block (e.g. Paragraph), not a Pattern block.
Screenshots, screen recording, code snippet
Additional AI-generated details
- The native inserter's
insertPattern(src/components/native-inserter/index.jsx) always insertsparse( pattern.content ). - Suggested fix: for a user pattern (
pattern.type === 'user') that isn't unsynced (syncStatus !== 'unsynced'), insertcreateBlock( 'core/block', { ref: pattern.id } )instead, as core's inserter does. Optionally, pass the sync status to the native sheet so it can mark synced patterns. - Android's native inserter has no Patterns section, so only iOS is affected.
- Related, unverified: the "Reusable blocks" tab (core's
reusableinserter category) also lists unsynced patterns, and inserts them as references. Check what WP Admin's inserter shows before changing that.
Environment info
GutenbergKit trunk (5f799a1f), iOS demo app with the native inserter enabled, iPhone 18 Pro simulator (iOS 27.1), local WordPress site. WordPress-iOS enables the native inserter by default.
Please confirm that you have searched existing issues in the repo.
- Yes
- Ngôn ngữ chính
- JavaScript
- Star
- 29
- Fork
- 7
- Merge trung bình
- 2 ngày 12 giờ
- Pull request đã merge (30 ngày)
- 77
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
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 wordpress-mobile/GutenbergKit
-
[Type] Bug Android
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
wordpress-mobile/GutenbergKit#847 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Type] Bug iOS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 77/100
wordpress-mobile/GutenbergKit#846 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Type] Bug [Type] Code Quality iOS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
wordpress-mobile/GutenbergKit#668 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Type] Bug [Type] Performance iOS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
wordpress-mobile/GutenbergKit#666 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Type] Bug iOS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
wordpress-mobile/GutenbergKit#664 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của wordpress-mobile/GutenbergKit
Issue tương tự
-
stringify escapes leading digits in pseudo-class arguments (:nth-child(1) becomes :nth-child(\31 ))Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
digitalbazaar/forge#1170 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
getgrav/grav-plugin-form#664 ·
-
bug web-ui
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
jenkinsci/jenkins#27705 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày