FixedNode#24323
Open
ickshonpe wants to merge 7 commits into
Open
Conversation
Contributor
|
What should happen if a root node has |
Contributor
|
It looks like your PR has been selected for a highlight in the next release blog post, but you didn't provide a release note. Please review the instructions for writing release notes, then expand or revise the content in the release notes directory to showcase your changes. |
Contributor
Author
Hopefully just adding a |
…lter to FixedNode queries.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Allow UI elements to be positioned relative to the window rather than its parent element.
Fixes #9564
Solution
New UI marker component
FixedNode.FixedNodeentities are treated as UI roots in layout, even if they have a parent.During the taffy layout updates children with
FixedNodeare skipped.--
The original suggestion was to implement it as a
PositionType::Fixedvariant that could used withNode, but I think that would be much more complicated without support from Taffy. Being able to just directly query for and filter outFixedNodeentities directly makes everything much simpler.Testing
Basic example which shows events bubbling up to the parent from the fixed node:
I need to write some tests to make sure the layout isn't broken when
FixedNodes are removed or reparented etc, but otherwise it seems like a reasonable approach.