Closed keithamus closed 4 months ago
Checklist
--dev
Playground link
Catalyst attributes are dasherised when serialised to HTML, which the Catalyst plugin does not quite properly reflect.
Expected behavior
The following code:
import { controller, attr } from '@github/catalyst' @controller class HelloWorldElement extends HTMLElement { @attr fooBar = 'hello' }
Would result in an attribute of data-foo-bar in Catalyst 1.x and an attribute of foo-bar in 2.x and so the attributes json should be:
data-foo-bar
foo-bar
attributes
"attributes": [ { "name": "data-foo-bar", // just `foo-bar` in v2 "type": { "text": "string" }, "default": "'hello'", "fieldName": "fooBar" } ],
Actual behavior
The generated manifest has the following:
"attributes": [ { "name": "fooBar", "type": { "text": "string" }, "default": "'hello'", "fieldName": "fooBar" } ],
@keithamus Could you take a look at this PR to make sure I got it right? 🙂 Thanks https://github.com/open-wc/custom-elements-manifest/pull/188
This was fixed :) closing
Checklist
--dev
flag to get more information?Playground link
Catalyst attributes are dasherised when serialised to HTML, which the Catalyst plugin does not quite properly reflect.
Expected behavior
The following code:
Would result in an attribute of
data-foo-bar
in Catalyst 1.x and an attribute offoo-bar
in 2.x and so theattributes
json should be:Actual behavior
The generated manifest has the following: