-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
"flex-direction: column-reverse" doesn't follow the specs #866
Comments
Can't anyone familiar with the project give me some directions? I couldn't locate where the flex-direction properties are interpreted by Yoga. |
Ok, thanks to this PR, I found that flex-directions is handled by Searching for 'flex-direction' in master lead me nowhere. The current files structure in master looks more like a maze to me. Could someone tell me where the Layout files ended up? |
looks like it uses enums to reference the flex properties Lines 91 to 96 in 4840495
searching for you mentioned knowing the changes that needs to happen to fix the issue, would you mind sharing what those might be? thanks for your sleuthing on this! |
Oh cool ! Thanks ! Ok, for what I understand, it should be this part in yoga.cpp:
Or maybe this in YGNode.cpp
I don't understand this code exactly yet, but I think that this is where we could force the starting edge depending on the value of flexColumnDirection |
Or maybe just this in yoga.cpp:
I need to make some tests to understand how all this works... |
Would you think that it would be acceptable to just switch YGAlignFlexStart and YGAlignFlexEnd in YGNodeAlignItem when flex-direction is reversed? |
I'm not 100% sure yoga is the problem here - can you make a yoga unit test that demonstrates the problem and will enforce the fix? |
This definitely isn't a Yoga problem. This is an implementation detail of browsers. One of two things is likely at play here:
I recommend closing here and re-opening in react-native. |
Report
This might be related, but not a duplicate of #807
Issues and Steps to Reproduce
The issue has been discussed here and was attributed to yoga.
Expected Behavior
This is the expected behaviour for
column-reverse
.Actual Behavior
As you can see in the screencast here, the scroll doesn't start at the bottom of the container. This is specified in the specs
Link to Code
You can recreate the bug by cloning this project, and then replacing the content of the file
nodes_modules/react-native/Libraries/Lists/VirtualizedList.js
by the content of this fileIn the FlatList, you now have a list with
flex-direction: row-reverse
, but it doesn't start at the bottom like it should.If someone can give me some directions, I might be able to propose a pull-request.
The text was updated successfully, but these errors were encountered: