bevy/crates/bevy_ui/src
Alice Cecile 2f63ebc9c9
Remove warning for children in UI hierarchies without Style (#15736)
# Objective

As discussed in #15591, this warning prevents us from storing leaf nodes
without a `Style` component. Because text sections (as distinct
entities) should not be laid out using `taffy`, this warning is
incorrect.

Users may also have other uses for doing this, and this should generally
increase flexibility without posing particularly serious correctness
concerns.

## Solution

- removed warning about non-UI children with UI parents
- improved the warning about UI parents with non-UI parents
- this warning should stay, for now, as it results in a genuine failure
to perform `taffy` layout
- that said, we should be clearer about the cause and potentially
harmful results of this!
   
## Testing

I inserted an empty entity into the hierarchy in the `button` example as
a leaf node, and it ran with no warnings.
2024-10-08 19:51:47 +00:00
..
layout Remove warning for children in UI hierarchies without Style (#15736) 2024-10-08 19:51:47 +00:00
render Replace Handle<M: UiMaterial> component with UiMaterialHandle wrapper (#15740) 2024-10-08 19:07:58 +00:00
widget Rename BreakLineOn to LineBreak (#15583) 2024-10-01 22:30:50 +00:00
accessibility.rs Add UI GhostNode (#15341) 2024-10-02 00:24:28 +00:00
focus.rs use precomputed border values (#15163) 2024-09-26 23:10:35 +00:00
geometry.rs Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
ghost_hierarchy.rs Add UI GhostNode (#15341) 2024-10-02 00:24:28 +00:00
lib.rs Replace Handle<M: UiMaterial> component with UiMaterialHandle wrapper (#15740) 2024-10-08 19:07:58 +00:00
measurement.rs Add core and alloc over std Lints (#15281) 2024-09-27 00:59:59 +00:00
node_bundles.rs Replace Handle<M: UiMaterial> component with UiMaterialHandle wrapper (#15740) 2024-10-08 19:07:58 +00:00
picking_backend.rs Rename the Pickable component and fix incorrect documentation (#15707) 2024-10-07 17:09:57 +00:00
stack.rs Add UI GhostNode (#15341) 2024-10-02 00:24:28 +00:00
ui_material.rs Replace Handle<M: UiMaterial> component with UiMaterialHandle wrapper (#15740) 2024-10-08 19:07:58 +00:00
ui_node.rs box shadow (#15204) 2024-10-08 16:26:17 +00:00
update.rs Add UI GhostNode (#15341) 2024-10-02 00:24:28 +00:00