patternfly / patternfly/patternfly-react
Checkbox/Radio - allow flow content as body
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- TypeScript
- Star
- 862
- Fork
- 392
- Merge trung bình
- 4 ngày 8 giờ
- Pull request đã merge (30 ngày)
- 9
Mô tả
Is this a new component or an extension of an existing one?
Existing components, Checkbox and Radio.
Describe the feature
To allow flow content for their body prop. Currently it's wrapped in a span element, which only admits phrasing content.
Are there visuals for this feature? If applicable, please include examples for each state and for varying widths
I don't think so.
Any other information?
-
The
bodybeing wrapped in aspanwas requested in a review because the RadioisLabelWrappedprop. See https://github.com/patternfly/patternfly-react/pull/5559#pullrequestreview-617903386 -
I've created a
sillyweird example of a Checkbox using flow content in its body, just for illustrating a possible use case of a React node returning adiv. See https://codesandbox.io/s/weird-patternfly-checkbox-91mzqq or the screenshot uploaded belowClick to show/hide a screenshot of the output from the Codesanbox pasted above
-
If the change isn't possible beacuse the benefit does not pay off complicating the code for these components, at least it would be nice to mention in the documentation that the expected React.ReactNode must return phrasing content only
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.
Hướng nghiên cứu
Bắt đầu với các component Checkbox và Radio, đồng thời kiểm tra cách prop body của chúng được bọc, bao gồm cả hành vi isLabelWrapped được đề cập trong issue. Xác định liệu có thể hỗ trợ flow content mà không phá vỡ hành vi label hiện có hay không; được xem là hoàn tất khi cả hai component đều chấp nhận nội dung dự kiến, hoặc tài liệu Checkbox nêu rõ rằng nội dung body phải là phrasing content.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- react, typescript
- Lĩnh vực
- frontend
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100