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

Fixture builder: a PageBuilder or PageDataBuilder as a route target

Đang mở Phù hợp với người mới
#245 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ó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
70/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Lĩnh vực
documentation, testing

Hướng nghiên cứu

Payload không nêu tên tệp tài liệu, vì vậy hãy tìm trang fixtures / scaffold trong tài liệu API trước. Đọc hành vi trong api-components-bundle#474 (được liên kết trong issue) để xác nhận chữ ký của linkRoute, redirect và linkIri cùng các trường hợp lỗi trước khi viết. Hoàn thành khi trang tài liệu mô tả ba dạng gọi hàm, quy tắc chỉ được dùng một trong hai giữa routeName hoặc page:, các trường hợp của --append, và ngoại lệ đối với builder không có route.

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

Mô tả

The API bundle's CwaFixtureBuilder now accepts the builder itself wherever a scaffold referred to a route by name (components-web-app/api-components-bundle#474, fixes components-web-app/api-components-bundle#471).

Please document, in the fixtures / scaffold page of the API docs:

  • $cwa->component($link)->linkRoute('route', page: $about) and the same on a PageDataBuilder: page: takes a PageBuilder or PageDataBuilder; pass exactly one of routeName and page:.
  • $cwa->redirect('/old', to: $about): to: takes a route name, a PageBuilder or a PageDataBuilder.
  • linkIri(): route: takes either builder (the IRI of its route), page: a PageBuilder and pageData: a PageDataBuilder (the IRI of the entity).
  • It resolves to the route generated for that page, whatever its name (e.g. a suffixed about-1), at the same moment named links resolve, so it costs no extra flush. In an --append load a kept page resolves to its existing route, and a page whose declared path was already in use resolves to the route at that path.
  • A builder with no route (a template page, withoutRoute(), untitled page data) throws, naming the page and the call that referred to it.
  • generate-fixtures keeps writing route names; this is a convenience for scaffolds written by hand.
Ngôn ngữ chính
Vue
Star
0
Fork
0
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

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

  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 components-web-app/docs

Tất cả issue của components-web-app/docs

Issue tương tự

Thêm issue về Documentation

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.