-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
GhostNode
trait
#17901
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
Open
ickshonpe
wants to merge
11
commits into
bevyengine:main
Choose a base branch
from
ickshonpe:ghostnode-trait
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
GhostNode
trait
#17901
+239
−207
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Give every entity in the UI hierarchy a `UiElement` marker component and, if the "ghost_nodes" feature is enabled, implement the `Ghost` trait for `UiElement`
* `Ghost` to `GhostNode` * `UiElement` to `UiNode` * `Ghost::Completion` to `GhostNode::Actual` Both system param impl changes: * `iter_ui_children` to `iter_actual_actual_children` * `is_ui_node` to `is_actual_node` The `experimental` module now only contains the `GhostNode` trait and it's implementation. It works with any hierarchy now, not just UI nodes. The "ghost_nodes" feature gate and UI specfic navigation implementation has been moved to a new `navigation` module.
…nto ghostnode-trait
Triage: has merge conflicts |
I can't even remember writing these ghost node PRs. I think updating them is pointless right now, need to get the computed node and UI transform changes merged first. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-ECS
Entities, components, systems, and events
A-UI
Graphical user interfaces, styles, layouts, and widgets
S-Blocked
This cannot move forward until something else changes
X-Controversial
There is active debate or serious implications around merging this PR
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Objective
Replace the UI's ghost node implementation with a trait that can be used with any hierarchy, not just UI
Node
s.Solution
Make
GhostNode
into a trait with anActual
associated type.GhostNode
should be implemented on a marker component that must be inserted on every entity in the collapsible hierarchy.The flattened view of the hierarchy sees only those nodes with an
Actual
component.The UI specfic parts of the old ghost nodes implementation and the feature gate have been moved to a new module named
navigation
.The marker component that implements
GhostNode
is calledUiNode
and the associatedActual
type isNode
.Node
requiresUiNode
.The navigation
SystemParam
s are mostly unchanged except for some renamings:iter_ui_children
->iter_actual_children
is_ui_node
->is_actual
Migration Guide