bevy
bevy copied to clipboard
Rename `text_layout` example to `flex_layout`
Objective
- Rename
text_layout
example toflex_layout
to better reflect the example purpose -
AlignItems
/JustifyContent
is not related to text layout, it's about child nodes positioning
Solution
- Rename the example
I think I originally named it flex_layout
even. I changed it because I thought most users probably don't know or care about flex and all the questions and issues I saw were asking about text positioning.
I would keep it as flex_layout
or maybe nodes_layout
… but that will get old as soon as we add CSS grid. I've merged Alice's suggestion, what do you think of?
Demonstrates how the AlignItems and JustifyContent properties can be composed to layout nodes and position text
I would keep it as
flex_layout
or maybenodes_layout
… but that will get old as soon as we add CSS grid. I've merged Alice's suggestion, what do you think of?Demonstrates how the AlignItems and JustifyContent properties can be composed to layout nodes and position text
Yep, that looks really good. The renaming definitely makes sense now that we are incorporating grid
.
Once grid is implemented, it might be useful to have an equivalent grid_layout
example that gives identical output but uses grid to create the layout.
Yup. That was another reason for the rename. ^_^
Also, this example could use a flex-direction
toggle, to see how changing the main axis direction affects the layout. But that's for another issue/PR.
Yup. That was another reason for the rename. ^_^
Also, this example could use a
flex-direction
toggle, to see how changing the main axis direction affects the layout. But that's for another issue/PR.
I considered doing this, but I think it might overcomplicate things. It's probably better to have many smaller examples and cover flex-direction by itself.