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

Fix rsx rosetta element and attribute mapping #1782

Merged

Conversation

ealmloff
Copy link
Member

@ealmloff ealmloff commented Jan 3, 2024

This PR changes rsx-rosetta to use the mapping of html->rsx names for elements and attributes defined in dioxus-html instead of converting the case of the attributes and elements.

This fixes the following cases:

  • translating h1-h6

old:

h_1 {}

new:

h1 {}
  • translating web components

old:

my_component {}

new:

my-component {}
  • translating unsupported attributes

old:

div { unrecognizedattribute: "asd", "hello world" }

new:

div { "unrecognizedattribute": "asd", "hello world" }

@ealmloff ealmloff added bug Something isn't working cli Related to the dioxus-cli program labels Jan 3, 2024
@jkelleyrtp jkelleyrtp merged commit fb4eb34 into DioxusLabs:master Jan 4, 2024
9 of 10 checks passed
@jkelleyrtp
Copy link
Member

Sweet, thanks!

@ealmloff ealmloff deleted the dx-translate-element-conversion branch January 4, 2024 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cli Related to the dioxus-cli program
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants