-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Allow layout to be a list of components. #2795
Conversation
Co-authored-by: Nathan Drezner <[email protected]>
Just curious about the purpose of this PR. |
Yes that is all it does, reduce the number of characters and remove a mostly useless div in many cases. 🙂 |
The main advantage is that we can make a lot of our introductory documentation easier to understand for folks with a Python background but with no HTML background. |
To me, it seems like it's just another rule to learn. You need to use a component everywhere except with top level of |
You can also think of it as changing from one existing rule to another - now layout looks like a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although I see @AnnMarieW 's point as a "new rule" I think generally this introduces better parity with children
, and to me more importantly means that the "Hello World!" Dash examples do not require html.Div
but require instead the far more understandable Python list -- ofc you can always do it the traditional way but it'll be a nice simplication of our early docs that I expect won't take much away in terms of pedagogy (hopefully soon we can come to a place where Dash devs don't need to learn HTML concepts to build cool projects!).
Nice work Phillipe and nice test as well! 💃
Co-authored-by: Nathan Drezner <[email protected]>
Add the ability to set the layout as a list of components.
Example: