Skip to content

Conversation

@IQuick143
Copy link
Contributor

Objective

Solution

  • Make the ui_surface module public (not just pub(crate)), so that UiSurface can be querried and used with the function.

Notes

Making this public may break encapsulation (notably it could allow removing the Resource), but given how lax the guarantees of ECS state are, I don't think that (a resource existing) is an assumption anyone can truly rely on.

@IQuick143 IQuick143 added C-Docs An addition or correction to our documentation D-Trivial Nice and easy! A great choice to get started with Bevy A-UI Graphical user interfaces, styles, layouts, and widgets C-Code-Quality A section of code that is hard to understand or change C-Usability A targeted quality-of-life change that makes Bevy easier to use A-Dev-Tools Tools used to debug Bevy applications. S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Dec 7, 2025
@IQuick143 IQuick143 added this to the 0.18 milestone Dec 7, 2025
Copy link
Contributor

@ickshonpe ickshonpe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC it was me who added the print_ui_layout_tree function a couple of years ago, and back then there wasn't a ui_surface module and UiSurface was still in layout/mod.rs. And I haven't given it a thought really since then.

Making ui_surface public seems fine, shouldn't cause any problems.

@IQuick143 IQuick143 added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Dec 8, 2025
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Dec 9, 2025
Merged via the queue into bevyengine:main with commit 98d4adb Dec 10, 2025
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Dev-Tools Tools used to debug Bevy applications. A-UI Graphical user interfaces, styles, layouts, and widgets C-Code-Quality A section of code that is hard to understand or change C-Docs An addition or correction to our documentation C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

print_ui_layout_tree is exported, but not usable

4 participants