a2ui-project / a2ui-project/a2ui

Lit renderer - hintedStyles assumption causes additionalStyles to be ignored

Abierto
#602 3 comentarios 0 reacciones 0 asignados Ver en GitHub
component: lit renderer P2 type: bug
Lenguaje dominante
TypeScript
Estrellas
16.4k
Forks
1.3k
Merge medio
2 d 13 h
PR fusionados (30 d)
134

Descripción

### 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

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.