a2ui-project / a2ui-project/a2ui

Lit renderer - hintedStyles assumption causes additionalStyles to be ignored

Đang mở
#602 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
component: lit renderer P2 type: bug
Ngôn ngữ chính
TypeScript
Star
16.4k
Fork
1.3k
Merge trung bình
2 ngày 13 giờ
Pull request đã merge (30 ngày)
134

Mô tả

### Description

areHintedStyles() expects ["h1", "h2", "h3", "h4", "h5", "h6", "caption", "body"] and uses .every() to check if additionalStyles.Text is a hinted styles object.

This requires all 8 keys including h6 to be present. In practice, themes rarely define h6 styles (the HintedStyles interface doesn't even declare it). When any key is missing, the check returns false and the entire object is passed to styleMap() as a flat Record — but the values are nested objects, so nothing gets applied.

### Location

lit/src/0.8/ui/text.ts [Line 125 - 132]

### Suggested fix

Change .every() to .some() and remove h6 from the expected list so any recognized key triggers hinted mode

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

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.