Consider deprecating `core/react/blocks` and its hooks

Đang mở
#900 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Lĩnh vực
frontend, web-dev

Hướng nghiên cứu

Bắt đầu bằng việc xem xét các triển khai trong core/react/blocks và các hook useBlock, useBlockAttribute cùng những hook liên quan được đề cập trong issue. Đọc cách các thuộc tính của block được xử lý với app router, server components và client components. Hoàn thành khi định hướng xử lý block trong tương lai, phạm vi deprecation và khả năng có một blocks package riêng được xác định rõ ràng.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Is your enhancement related to a problem? Please describe.

The original implementations of block parsing for core blocks relied a lot on the generate HTML which is cumbersome. With the headstartwp plugin we should be able to rely on actual block attributtes instead.

This whole thing needs a big overhaul, especially with the introduction of Universal Blocks.

Additionally we should consider shipping a separate blocks package as a replacement for the default block implementations and to ship default blocks in the future.

With the move to app router and server components there's no reason to keep using the useBlock and related hooks such as useBlockAttribute and those should also be deprecated. The new way of handling block attributes on server components also works for client components.

This issue is initially for fleshing out the future of blocks handling on HeadstartWP.

Designs

No response

Describe alternatives you've considered

No response

Code of Conduct
  • I agree to follow this project's Code of Conduct
Ngôn ngữ chính
TypeScript
Star
204
Fork
26
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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 10up/headstartwp

Tất cả issue của 10up/headstartwp

Issue tương tự

Thêm issue về TypeScript

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.