You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
A detail I noticed with the property validation PR is that all properties that are not n_click, n_click_timestamp and children in dash-html-components are strings.
Some HTML props sort of behave like they are booleans, numbers, ect. and are transparently serialized to a string. For example, Details.open can be set to True which will serialize as 'true', HTML interprets this as the presence of a string and sets the value open to be true.
This pattern currently breaks with the property validation PR (plotly/dash#340) since props have PropType.string, you would have to set the value to be 'true' or some other string.
I haven't been able to find a good resource that has each HTML attribute and its type, so I was thinking of just not validating anything from dash-html-components since having to convert everything to a string would get tedious.
Anyone have any thoughts on this / ideas to remedy?
...or rather than completely punting, we can only validate children, since that is probably the only prop that causes serious issues in dash-html-components
Yeah, I guess I meant to say a resource that maps each HTML attribute to the type it would have if HTML had a typing system like jsx does. The Mozilla docs does this sometimes, e.g. saying Details.openis a boolean attribute, but that documentation is pretty inconsistent and not parsable.
Activity
rmarren1 commentedon Sep 27, 2018
...or rather than completely punting, we can only validate
children, since that is probably the onlypropthat causes serious issues indash-html-componentsT4rk1n commentedon Sep 27, 2018
HTML attributes are all strings in the tags like xml, it's the jsx that have types.
rmarren1 commentedon Sep 27, 2018
Yeah, I guess I meant to say a resource that maps each HTML attribute to the type it would have if HTML had a typing system like jsx does. The Mozilla docs does this sometimes, e.g. saying
Details.openis a boolean attribute, but that documentation is pretty inconsistent and not parsable.T4rk1n commentedon Sep 27, 2018
https://www.w3schools.com/tags/tag_textarea.asp
the value column got some typing info.
rmarren1 commentedon Oct 18, 2018
Only validating the children has been working pretty and no real problems were caused. We can revisit this is some issues come up