-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add tests for LayoutableChildren iterator
#1731
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
Closed
j-piasecki
wants to merge
1
commit into
facebook:main
from
j-piasecki:@jpiasecki/layoutable_children_tests
Closed
Add tests for LayoutableChildren iterator
#1731
j-piasecki
wants to merge
1
commit into
facebook:main
from
j-piasecki:@jpiasecki/layoutable_children_tests
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
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Contributor
|
@NickGerleman has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
NickGerleman
pushed a commit
to NickGerleman/react-native
that referenced
this pull request
Oct 25, 2024
Summary: Adds unit tests that directly cover the order in which `LayoutableChildren` iterator goes over the descendant nodes. The covered cases are as follows (nodes with `display: contents` are marked green): ### Single `display: contents` node ```mermaid flowchart TD R((R)) --> A((A)) R --> B((B)) R --> C((C)) B --> D((D)) B --> E((E)) style B fill:facebook/yoga#90 ``` Correct order: `A, D, E, C` ### Multiple `display: contents` nodes ```mermaid flowchart TD R((R)) --> A((A)) R --> B((B)) R --> C((C)) A --> D((D)) A --> E((E)) B --> F((F)) B --> G((G)) C --> H((H)) C --> I((I)) style A fill:facebook/yoga#90 style B fill:facebook/yoga#90 style C fill:facebook/yoga#90 ``` Correct order: `D, E, F, G, H, I` ### Nested `display: contents` nodes ```mermaid flowchart TD R((R)) --> A((A)) R --> B((B)) R --> C((C)) B --> D((D)) B --> E((E)) E --> F((F)) E --> G((G)) style B fill:facebook/yoga#90 style E fill:facebook/yoga#90 ``` Correct order: `A, D, F, G, C` ### Leaf `display: contents` node ```mermaid flowchart TD R((R)) --> A((A)) R --> B((B)) R --> C((C)) style B fill:facebook/yoga#90 ``` Correct order: `A, C` ### Root `display: contents` node ```mermaid flowchart TD R((R)) --> A((A)) R --> B((B)) R --> C((C)) style R fill:facebook/yoga#90 ``` Correct order: `A, B, C` - `LayoutableChildren` goes over the children with `display: contents` property, setting it on the root node should have no effect. X-link: facebook/yoga#1731 Differential Revision: D64981779 Pulled By: NickGerleman
Contributor
|
@NickGerleman merged this pull request in 6fed4df. |
facebook-github-bot
pushed a commit
to facebook/litho
that referenced
this pull request
Oct 26, 2024
Summary: Adds unit tests that directly cover the order in which `LayoutableChildren` iterator goes over the descendant nodes. The covered cases are as follows (nodes with `display: contents` are marked green): ### Single `display: contents` node ```mermaid flowchart TD R((R)) --> A((A)) R --> B((B)) R --> C((C)) B --> D((D)) B --> E((E)) style B fill:facebook/yoga#90 ``` Correct order: `A, D, E, C` ### Multiple `display: contents` nodes ```mermaid flowchart TD R((R)) --> A((A)) R --> B((B)) R --> C((C)) A --> D((D)) A --> E((E)) B --> F((F)) B --> G((G)) C --> H((H)) C --> I((I)) style A fill:facebook/yoga#90 style B fill:facebook/yoga#90 style C fill:facebook/yoga#90 ``` Correct order: `D, E, F, G, H, I` ### Nested `display: contents` nodes ```mermaid flowchart TD R((R)) --> A((A)) R --> B((B)) R --> C((C)) B --> D((D)) B --> E((E)) E --> F((F)) E --> G((G)) style B fill:facebook/yoga#90 style E fill:facebook/yoga#90 ``` Correct order: `A, D, F, G, C` ### Leaf `display: contents` node ```mermaid flowchart TD R((R)) --> A((A)) R --> B((B)) R --> C((C)) style B fill:facebook/yoga#90 ``` Correct order: `A, C` ### Root `display: contents` node ```mermaid flowchart TD R((R)) --> A((A)) R --> B((B)) R --> C((C)) style R fill:facebook/yoga#90 ``` Correct order: `A, B, C` - `LayoutableChildren` goes over the children with `display: contents` property, setting it on the root node should have no effect. Changelog: [Internal] X-link: facebook/yoga#1731 Reviewed By: joevilches Differential Revision: D64981779 Pulled By: NickGerleman fbshipit-source-id: ee39759c663a40f96ad313f1b775d53ab68fb442
facebook-github-bot
pushed a commit
to facebook/react-native
that referenced
this pull request
Oct 26, 2024
Summary: Adds unit tests that directly cover the order in which `LayoutableChildren` iterator goes over the descendant nodes. The covered cases are as follows (nodes with `display: contents` are marked green): ### Single `display: contents` node ```mermaid flowchart TD R((R)) --> A((A)) R --> B((B)) R --> C((C)) B --> D((D)) B --> E((E)) style B fill:facebook/yoga#90 ``` Correct order: `A, D, E, C` ### Multiple `display: contents` nodes ```mermaid flowchart TD R((R)) --> A((A)) R --> B((B)) R --> C((C)) A --> D((D)) A --> E((E)) B --> F((F)) B --> G((G)) C --> H((H)) C --> I((I)) style A fill:facebook/yoga#90 style B fill:facebook/yoga#90 style C fill:facebook/yoga#90 ``` Correct order: `D, E, F, G, H, I` ### Nested `display: contents` nodes ```mermaid flowchart TD R((R)) --> A((A)) R --> B((B)) R --> C((C)) B --> D((D)) B --> E((E)) E --> F((F)) E --> G((G)) style B fill:facebook/yoga#90 style E fill:facebook/yoga#90 ``` Correct order: `A, D, F, G, C` ### Leaf `display: contents` node ```mermaid flowchart TD R((R)) --> A((A)) R --> B((B)) R --> C((C)) style B fill:facebook/yoga#90 ``` Correct order: `A, C` ### Root `display: contents` node ```mermaid flowchart TD R((R)) --> A((A)) R --> B((B)) R --> C((C)) style R fill:facebook/yoga#90 ``` Correct order: `A, B, C` - `LayoutableChildren` goes over the children with `display: contents` property, setting it on the root node should have no effect. Changelog: [Internal] X-link: facebook/yoga#1731 Reviewed By: joevilches Differential Revision: D64981779 Pulled By: NickGerleman fbshipit-source-id: ee39759c663a40f96ad313f1b775d53ab68fb442
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CLA Signed
Merged
Shared with Meta
Applied via automation to indicate that an Issue or Pull Request has been shared with the team.
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.
Summary
Adds unit tests that directly cover the order in which
LayoutableChildreniterator goes over the descendant nodes. The covered cases are as follows (nodes withdisplay: contentsare marked green):Single
display: contentsnodeCorrect order:
A, D, E, CMultiple
display: contentsnodesCorrect order:
D, E, F, G, H, INested
display: contentsnodesCorrect order:
A, D, F, G, CLeaf
display: contentsnodeCorrect order:
A, CRoot
display: contentsnodeCorrect order:
A, B, C-LayoutableChildrengoes over the children withdisplay: contentsproperty, setting it on the root node should have no effect.