-
Notifications
You must be signed in to change notification settings - Fork 33
Dash Renderer 2.0 - **Breaking Changes** #32
Conversation
Prerelease versions are available with this code
|
since components can be inside any property now (e.g. inside `options[3].label`, we have to crawl the entire layout object, not just recurse through the `children` tree. we may be able to improve this performance by allowing component authors to specify which of their prop types accept components.
😌 CircleCI tests are passing! |
Any update on the time-line / stability of this to move forward? We are ultimately interested in getting this: plotly/dash-table-experiments#11 (comment) to work down the track, so that this can become true: https://twitter.com/chriddyp/status/920146214062043136 ;) Thanks by the way for this amazing project - we just started to switch from another plotting library a few months ago and it rocks! |
hey @chriddyp, any idea how long it might be until this gets merged? Is there anything we could do to help you get it over the line? |
This PR was experimental and it ends up affecting a huge part of the code base. We'll get there, but probably not for another few months at least. For now, we're focusing on improving the current state of the library through a few other projects: https://github.com/orgs/plotly/projects. Once those wind down, we'll have some more bandwidth to tackle these deeper architectural changes. |
Cool, thanks for the update. The projects look great. Thanks for all your work on Dash, it’s an awesome library. |
This PR is stale. #92 - which itself still needs a bunch more work - is the continuation of these ideas. |
This is a work-in-progress proposal that would allow component authors to write components where any property (
prop
) is a Dash component, not just thechildren
property.This is handled by passing in a 3rd prop to the components:
render
.render
should be used whenever a user-supplied property could be another Dash component. For example, thechildren
property in thedash-html-components
library is now rendered like:rather than simply
This allows the component author to allow the user to supply dash components as any property, for example, a RadioItems component could be composed like:
Notice how the label is now
render(option.label)
. This allows the dash user to supply dash components inside theiroptions.label
property. Instead of just:they could supply something like:
This will allow a whole new level of customizability across all Dash components.
However, this introduces a 🆘breaking change 🆘. All of the component libraries will need to be upgraded to support this version of
dash-renderer
. Third-party component libraries will break if the user upgrades theirdash-renderer
. I’m not sure if there is a way around this (feature detection).