withastro / astro

The web framework for content-driven websites. ⭐️ Star to support our work!
https://astro.build
Other
46.56k stars 2.47k forks source link

Custom lit converter not being called #11670

Closed lp247 closed 1 month ago

lp247 commented 2 months ago

Astro Info

Astro                    v4.13.3
Node                     v18.20.3
System                   Linux (x64)
Package Manager          unknown
Output                   static
Adapter                  none
Integrations             @astrojs/lit

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

File src/components/A.js is a lit component with a custom converter for the attribute 'text'. This converter should convert the attribute given as text to the length of the text. This converter is not called.

What's the expected result?

The converter should be called and the rendered text should be "6" instead of "AAAAAA".

Link to Minimal Reproducible Example

https://stackblitz.com/edit/github-kwbwgy?file=src%2Fcomponents%2FA.js

Participation

JulianCataldo commented 2 months ago
Screenshot 2024-08-21 at 21 16 26 Screenshot 2024-08-21 at 21 17 45

Quick and dirty test. Sorry for the screenshots.

Some observations:

This is not very scientific, just poking around. I don't fully understand what is going with these discrepancies.

florian-lefebvre commented 1 month ago

In 5.0, we removed the Lit integration so we don't plan to address this issue. If you’re interested in maintaining a Lit integration yourself, you may wish to use the last published version of @astrojs/lit as a starting point and upgrade the relevant packages.