Skip to content

Taffy node removal fix - #25535

Open
ickshonpe wants to merge 4 commits into
bevyengine:mainfrom
ickshonpe:layout-node-removal-detection-tests
Open

Taffy node removal fix#25535
ickshonpe wants to merge 4 commits into
bevyengine:mainfrom
ickshonpe:layout-node-removal-detection-tests

Conversation

@ickshonpe

@ickshonpe ickshonpe commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Objective

Taffy's remove function deletes a node, but if the node has a parent it leaves a stale id in its children.

Add tests to bevy_ui::layout.

Solution

When removing a taffy node in remove_entities, also remove it from its parent's children.

Added two new UI tests to bevy_ui::layout:

  • removing_node_from_ui_child_should_relayout_parent
  • removing_intermediate_ghost_should_relayout_parent

They check that a parent's layout is updated after removal of Node or GhostNode from its child.

- `removing_node_from_ui_child_should_relayout_parent`
- `removing_intermediate_ghost_should_relayout_parent`

They check that a parent's layout is updated after removal of `Node` or `GhostNode` from its child.
@ickshonpe ickshonpe added A-UI Graphical user interfaces, styles, layouts, and widgets S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Aug 24, 2026
@github-project-automation github-project-automation Bot moved this to Needs SME Triage in UI Aug 24, 2026
@ickshonpe ickshonpe added C-Testing A change that impacts how we test Bevy or how users test their apps D-Straightforward Simple bug fixes and API improvements, docs, test and examples labels Aug 24, 2026
@ickshonpe ickshonpe added this to the 0.19.2 milestone Aug 24, 2026
@ickshonpe ickshonpe added the C-Bug An unexpected or incorrect behavior label Aug 24, 2026
@ickshonpe ickshonpe changed the title More bevy_ui::layout tests Taffy node removal fix Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-UI Graphical user interfaces, styles, layouts, and widgets C-Bug An unexpected or incorrect behavior C-Testing A change that impacts how we test Bevy or how users test their apps D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Needs-Review Needs reviewer attention (from anyone!) to move forward

Projects

Status: Needs SME Triage

Development

Successfully merging this pull request may close these issues.

1 participant