Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: React output target v0.7.0 overwrites classNames #485

Open
3 tasks done
sean-perkins opened this issue Sep 27, 2024 · 1 comment
Open
3 tasks done

bug: React output target v0.7.0 overwrites classNames #485

sean-perkins opened this issue Sep 27, 2024 · 1 comment
Labels
package: react @stencil/react-output-target package type: bug Something isn't working

Comments

@sean-perkins
Copy link
Collaborator

Prerequisites

Stencil Version

4.20.0

Stencil Framework Output Target

Angular

Stencil Framework Output Target Version

v0.7.0

Current Behavior

When assigning CSS classes to the generated react component wrapper, they will overwrite any host level classes set internally by the Stencil runtime. This causes many issues/problems.

Expected Behavior

CSS classes should be appended to the existing classes. This was the previous behavior with the old component wrappers.

Steps to Reproduce

  1. Open reproduction
  2. Click the checkbox
  3. Inspect the DOM on the checkbox node
  4. Observe: The CSS classes are overwritten
  5. Upgrade to v8.3.1 (or any version of Ionic Framework where the output target is on the previous version)
  6. Repeat steps
  7. Observe: not-valid is appended to the existing class list

Code Reproduction URL

https://stackblitz.com/edit/gzdvsh?file=src%2Fmain.tsx

Additional Information

This is likely a problem in the @lit/react wrappers. Unsure if it is a compatibility issue with Stencil's runtime or a larger issue for the web component community. I'd suspect it would have been reported already if it impacted Lit.

@ionitron-bot ionitron-bot bot added the triage label Sep 27, 2024
Copy link

ionitron-bot bot commented Sep 27, 2024

Thanks for the issue!

This project is currently maintained for the purposes of supporting Ionic Framework. At this time, only new issues & pull requests that support Ionic Framework will be prioritized. For the latest updates regarding the maintenance status of this project, please see this section of the project's README

@sean-perkins sean-perkins added type: bug Something isn't working package: react @stencil/react-output-target package labels Sep 27, 2024
@ionitron-bot ionitron-bot bot removed the triage label Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: react @stencil/react-output-target package type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant