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

Component groups: max-components prop (limit how many components a group holds)

Đang mở
#246 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
15/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
nuxt
Lĩnh vực
full-stack

Hướng nghiên cứu

The work spans the CwaComponentGroup prop, the synchroniser that writes it, the admin Group tab and add/merge options, and an api-components-bundle release containing #467, so start by confirming that release exists. Read commit 6789579f in cwa-nuxt-module to see how allowedComponents is synced, then mirror that path for maxComponents. Done means a full group disables adds, a refused save shows the API message, and the fixture builder accepts max: n.

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

Mô tả

documentation

cwa-nuxt-module#398 (commit 6789579f, unreleased after 2.0.0-alpha.17) with api-components-bundle#467.

<CwaComponentGroup> takes :max-components="n" alongside allowed-components:

  • The synchroniser writes it to the group as it does allowedComponents: omitted leaves the stored value, null clears it. Anything but a positive whole number logs a warning and is not sent.
  • The count is the group's positions, as the API counts them: a dynamic page-data slot counts as one, and a draft and its published component count once.
  • A full group: the Group tab's Add to start/end are disabled with the reason on hover, the manager's add options are left out, and the stranded-group merge doesn't offer it as a target unless it has room for every component.
  • A group over its limit (the limit was set after content existed) shows a warning in the Group tab. Nothing is removed; it takes no more components until it's under the limit.
  • If a save is refused anyway, the API's message ("The component group <reference> is full …") shows in the admin's error notification.
  • Needs an api-components-bundle release containing #467; the fixture builder takes max: n on group(...).

Example: <CwaComponentGroup reference="headerButton" :location="$cwa.resources.layoutIri.value" :allowed-components="['HeaderButton']" :max-components="1" />

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ề Web Dev

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.