code-connect icon indicating copy to clipboard operation
code-connect copied to clipboard

[Angular] [HTML] Keep exact formatting of Inputs instead of forcing lower case

Open massi08 opened this issue 1 year ago • 3 comments

We are using code-connect with angular. We use the html parser for that but some of our inputs are converted to lowercase. We would like to keep the exact formatting instead.

for e.g:

 example: (props) => html`
      <component [a11YAriaLabel]="${props.ariaLabel}">
      </component>
    `,

In this case [a11YAriaLabel]="${props.ariaLabel}" is converted to [a11yarialabel]="label" on the code preview in figma.

massi08 avatar Sep 24 '24 11:09 massi08

Maybe a solution is to provide a new config option to keep the exact formatting of props when needed. It would be nice to have at the root config level and at the "story" level as well. This is a big issue for us at the moment since code connect produces non working code in some scenarios.

massi08 avatar Sep 27 '24 09:09 massi08

@tomduncalf-figma any news on this?

massi08 avatar Oct 08 '24 08:10 massi08

Hey @massi08, sorry for the slow response to this one! We're looking into this at the moment and should have a fix soon.

slees-figma avatar Oct 08 '24 10:10 slees-figma

Hey @massi08, we've released a fix for this in v1.2.0. Please let us know if you encounter further issues.

slees-figma avatar Oct 16 '24 14:10 slees-figma

Cool. We were having this same issue. Thanks for the fix.

miguel-ama avatar Oct 21 '24 16:10 miguel-ama