Uh oh!
There was an error while loading. Please reload this page.
feat: Add iOS Paper implementation of inset logical properties - #36241
feat: Add iOS Paper implementation of inset logical properties#36241gabrieldonadel wants to merge 2 commits into
Conversation
Base commit: 9718c17 |
Yeah, I think that is the main extra thing we need to merge this. Just ensuring that We are allowed to have a sequence that looks like:
There, we should evaluate a top position of "5" at steps 1 and 2, then "10" at step 3. So if we clear out one prop, the state for the other one still needs to be around. The way I solved this in the Fabric case was that we always had the full set of props available to read from (this is already Fabric's prop parsing model), then we generated the flattened YGStyle after parsing everything. The model for how prop parsing works on paper is different, but I imagine we might need the state for both potential props around, to do this sort of thing. |
f3ce6da to
474b0caComparegabrieldonadel
commented
Feb 23, 2023
Thanks for the review @NickGerleman, I managed to fix the precedence problem by adding a |
NickGerleman
left a comment
There was a problem hiding this comment.
Ah, that looks correct. Were you able to validate it against the scenario?
facebook-github-bot
commented
Feb 23, 2023
@NickGerleman has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
gabrieldonadel
commented
Feb 23, 2023
Yeah, from my testing everything is working as expected |
facebook-github-bot
commented
Feb 25, 2023
@NickGerleman merged this pull request in 33d4e2d. |
Hey @gabrieldonadel, we had to revert this change since it caused a few screenshot test failures that seem legitimate. I think this example is setting position via |
…ies" Summary: This backs out #36241 for causing screenshot failures in an app still using Paper. Changelog: [iOS][Removed] - Back out "[react-native][PR] feat: Add iOS Paper implementation of inset logical properties" Reviewed By: motiz88, rshest Differential Revision: D43621612 fbshipit-source-id: 0fc01d6c6ae5c5bfb2813bd60b25e9315e42e3c3
gabrieldonadel
commented
Feb 27, 2023
Hey @NickGerleman, do you mind sharing some more details about this screenshot test? Which combination of props were you using? Setting positions using |
NickGerleman
commented
Feb 27, 2023
It looks like |
gabrieldonadel
commented
Feb 27, 2023
Hmm, not sure why that would happen, maybe we're not computing the position on the first pass somehow? |
lunaleaps
commented
Mar 1, 2023
Let me see if I can get a small repro of the issue out so we can debug and also see if the Android version suffers the same issue |
lunaleaps
commented
Mar 4, 2023
@gabrieldonadel I can reproduce on Paper with this: |
Sorry for the delay on this, I'll take a look this week*! |
lunaleaps
commented
Mar 20, 2023
Hey @gabrieldonadel do you have a status update on this? |
gabrieldonadel
commented
Mar 21, 2023
Hi @lunaleaps unfortunately I was still not able to reproduce this issue, are you testing it through RNTester? |
lunaleaps
commented
Mar 21, 2023
Yes, essentially the same as RNTester, it's an empty surface. You're not able to reproduce on the legacy renderer? |
Yes @lunaleaps, I'm trying to reproduce this inside the View Example of RNTester running Paper Screen.Recording.2023-03-21.at.07.35.14.mov |
gabrieldonadel
commented
Mar 29, 2023
Any thoughts on how can I reproduce this @lunaleaps using RNTester? |
Hey @gabrieldonadel sorry for the delay, I just tested it on the 0.72 release, picking this commit and I was able to reproduce in RNTester Here's the repro code lunaleaps@29c081b |
…#36241) Summary: This PR adds Paper support to `inset` logical properties on iOS as requested on react#34425. This implementation includes the addition of the following style properties - `inset`, equivalent to `top`, `bottom`, `right` and `left`. - `insetBlock`, equivalent to `top` and `bottom`. - `insetBlockEnd`, equivalent to `bottom`. - `insetBlockStart`, equivalent to `top`. - `insetInline`, equivalent to `right` and `left`. - `insetInlineEnd`, equivalent to `right` or `left`. - `insetInlineStart`, equivalent to `right` or `left`. Android changes are in a separate PR to facilitate code review react#36242 ## Changelog [IOS] [ADDED] - Add Paper implementation of inset logical properties Pull Request resolved: react#36241 Test Plan: 1. Open the RNTester app and navigate to the `View` page 2. Test the new style properties through the `Insets` section  Reviewed By: lunaleaps Differential Revision: D43525110 Pulled By: NickGerleman fbshipit-source-id: b70b0ef183dcf192b2c3547422bbe161b7bdba50




Summary
This PR adds Paper support to
insetlogical properties on iOS as requested on #34425. This implementation includes the addition of the following style propertiesinset, equivalent totop,bottom,rightandleft.insetBlock, equivalent totopandbottom.insetBlockEnd, equivalent tobottom.insetBlockStart, equivalent totop.insetInline, equivalent torightandleft.insetInlineEnd, equivalent torightorleft.insetInlineStart, equivalent torightorleft.Android changes are in a separate PR to facilitate code review #36242
Changelog
[IOS] [ADDED] - Add Paper implementation of inset logical properties
Test Plan
ViewpageInsetssection