CleverCloud / clever-components

Collection of Web Components by Clever Cloud
https://www.clever-cloud.com/doc/clever-components/
Apache License 2.0
221 stars 20 forks source link

Rework event names and behaviour (for React support) #346

Open hsablonniere opened 2 years ago

hsablonniere commented 2 years ago

@Galimede tried to make our components work with the new experimental WC support in React.

We need to follow this issue and comment because we may need to rename our events: https://github.com/facebook/react/issues/11347#issuecomment-996872817

Document: https://docs.google.com/document/d/1wwL_YZ5TnYorEEr2Lkeh9rgbnsynDXXI7tCejVcpE6I/edit#

The other problem regards image URLs because both CRA and Vite seems to break on standard new URL("", import.meta.url) syntax!!! This is sad but it should be fixed with our work on #436.

TODO

just-boris commented 2 years ago

The issue with colon in the event names is not unique to React. The same limitation exists in Angular: https://github.com/material-components/material-components-web/issues/4221

You better reconsider your naming convention, if you want to reach full cross-framework compatibility

hsablonniere commented 2 years ago

@just-boris Thanks for the heads up, I was pretty sure it worked on Angular. This is sad.