-
Notifications
You must be signed in to change notification settings - Fork 31
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
Draft: add attribute control for components + docs #74
Conversation
Thanks again for this. I looked up a performance benchmark and it seems that |
I moved this into its own function so it wasn't repeated and I also added some type checking and a warning message. One question though is what if you want to dynamically unset these properties? Should this function make sure that the properties are always synced with the value of |
|
Sorry for taking so long to get back on this. I definitely think it makes sense to be able to dynamically unset the properties. I imagine you could use an internal I've checked locally to make sure everything built properly but agree that we should add a test scenario, particularly one that handles unsetting/resetting attributes. Also, a quick note on the |
I don't totally understand. How does the |
Sorry I wasn't clear. Say you want to pass this object as const attrs = { hidden: "" } If you did this, according to the DOM spec, If I'm not mistaken, this should already allow for changing an existing property, since |
I'm going to close this in favor of #133 since that will add the ability for aria-labels without the possible performance issues cited here. Let me know if there's a good reason for continuing with this approach, though, or if there are other commonly used props that we should pass to layout components. |
This adds attribute-level control to the
Svg
,ScaledSvg
,Canvas
,Html
, andWebgl
layout layers. Addresses #71 .