Open snehilvj opened 1 year ago
Thanks for the report @snehilvj .
Hi @T4rk1n Thanks for the fix on 2nd point above. Any thing going with the 1st point above? Btw loving the typescript experience so far. Migrated entire dmc to typescript in the latest 0.11.0a0 release.
Hi @T4rk1n
Currently experiencing the same issue with the dangerouslySetInnerHTML prop which includes an "__html" key. Interestingly, the component generation script runs successfully in windows, but we get this on Unix:
ERROR: "__html" matches reserved word pattern: /^_.*$/
extract-meta failed
The same thing happens with any prop that has , e.g. @iterator@1234. We're converting an internal typescript component library to Dash, and it's pretty frustrating, because we can't generate components on our unix system without doing a billion workarounds to exclude problematic props. Would really appreciate any help.
@tsveti22
There might be an issue with the arguments not getting passed on windows so the reserved word patterns is not defined there and it generates the props with _
.
There is no way to override the pattern with the included command, but you can generate the metadata.json with the command (node path/to/extract-meta.js
): https://github.com/plotly/dash/blob/993b57f04f6a0d9f07758f46a0890b5ef2f81423/dash/extract-meta.js#L29-L30
Then use the python generator: https://github.com/plotly/dash/blob/993b57f04f6a0d9f07758f46a0890b5ef2f81423/dash/development/component_generator.py#L39-L52
With the metadata given the json.load("metadata.json")
.
The __@iterator@1234
bug is with a type could not be handled, even with allowing the _
it would generate something that is not good. The tuple case was fixed in #2257, if there is other cases that needs to be handled we would need examples for fixing.
Part 1 of this issue is still unfixed, that is when you have an enum type with mixed types it only generates one type.
@T4rk1n will your work on the code generator fix this as a side effect?
@T4rk1n will your work on the code generator fix this as a side effect?
No the enum types is another bug.
Hi, I am migrating dash-mantine-components to typescript. However, I have been facing some issues with the doc strings generation. The doc strings are not very accurate, in fact, for some prop types, doc string generation just fails.
Example 1 Have a look at how the doc string is generated for the radius prop.
The radius property will accept both strings and numbers but the doc string is misleading.
Example 2 For somewhat complex prop types such as value here, the prop generation just fails with the below error.
Error:
Thanks Snehil