-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
Fix virtualization logic with horizontal RTL lists #38529
Conversation
This pull request was exported from Phabricator. Differential Revision: D46586420 |
Base commit: d380bb8 |
Summary: Pull Request resolved: facebook#38529 VirtualizedList internally represents metrics along the scrolling axis using `offset` (x, y), and `length` (width, height). This one dimensional representation allows the list to be generic to being horizontal or vertical. Right now offset conversion directly takes the `x` or `y` axis value, but this is not correct when we are using a horizontal FlatList in RTL. This change converts most VirtualizedList code handling `offset,length` coordinates consistently flow from start to end, including in horizontal RTL and in inverted FlatList. This is paired with a fix to Android native code in D47627115. With these together, basic Horizontal FlatList scenarios should work correctly when laid out in RTL. Differential Revision: D46586420 fbshipit-source-id: ac75b7d743141ff03cc9d6d3fd2d328fe8994b54
1ff698d
to
8bfc118
Compare
This pull request was exported from Phabricator. Differential Revision: D46586420 |
1 similar comment
This pull request was exported from Phabricator. Differential Revision: D46586420 |
Summary: Pull Request resolved: facebook#38529 VirtualizedList internally represents metrics along the scrolling axis using `offset` (x, y), and `length` (width, height). This one dimensional representation allows the list to be generic to being horizontal or vertical. Right now offset conversion directly takes the `x` or `y` axis value, but this is not correct when we are using a horizontal FlatList in RTL. This change converts most VirtualizedList code handling `offset,length` coordinates consistently flow from start to end, including in horizontal RTL and in inverted FlatList. This is paired with a fix to Android native code in D47627115. With these together, basic Horizontal FlatList scenarios should work correctly when laid out in RTL. Differential Revision: D46586420 fbshipit-source-id: ea18a7b29c05be4eb4d212bc92475a2a7fb733a0
8bfc118
to
4e3e6d2
Compare
This pull request was exported from Phabricator. Differential Revision: D46586420 |
Summary: Pull Request resolved: facebook#38529 VirtualizedList internally represents metrics along the scrolling axis using `offset` (x, y), and `length` (width, height). This one dimensional representation allows the list to be generic to being horizontal or vertical. Right now offset conversion directly takes the `x` or `y` axis value, but this is not correct when we are using a horizontal FlatList in RTL. This change converts most VirtualizedList code handling `offset,length` coordinates consistently flow from start to end, including in horizontal RTL and in inverted FlatList. This is paired with a fix to Android native code in D47627115. With these together, basic Horizontal FlatList scenarios should work correctly when laid out in RTL. Differential Revision: D46586420 fbshipit-source-id: ea475f61008d9ea69bf512778ec42d47b77ca7c0
4e3e6d2
to
2c6449a
Compare
Summary: Pull Request resolved: facebook#38529 VirtualizedList internally represents metrics along the scrolling axis using `offset` (x, y), and `length` (width, height). This one dimensional representation allows the list to be generic to being horizontal or vertical. Right now offset conversion directly takes the `x` or `y` axis value, but this is not correct when we are using a horizontal FlatList in RTL. This change converts most VirtualizedList code handling `offset,length` coordinates consistently flow from start to end, including in horizontal RTL and in inverted FlatList. This is paired with a fix to Android native code in D47627115. With these together, basic Horizontal FlatList scenarios should work correctly when laid out in RTL. Reviewed By: vincentriemer Differential Revision: D46586420 fbshipit-source-id: 58be7fe4e4cec31aa73146239d0c2c0929b9d0f6
2c6449a
to
3255cdd
Compare
This pull request was exported from Phabricator. Differential Revision: D46586420 |
Summary: Pull Request resolved: facebook#38529 VirtualizedList internally represents metrics along the scrolling axis using `offset` (x, y), and `length` (width, height). This one dimensional representation allows the list to be generic to being horizontal or vertical. Right now offset conversion directly takes the `x` or `y` axis value, but this is not correct when we are using a horizontal FlatList in RTL. This change converts most VirtualizedList code handling `offset,length` coordinates consistently flow from start to end, including in horizontal RTL and in inverted FlatList. This is paired with a fix to Android native code in D47627115. With these together, basic Horizontal FlatList scenarios should work correctly when laid out in RTL. Changelog: [General][Fixed] - Fix virtualization logic with horizontal RTL lists Reviewed By: vincentriemer Differential Revision: D46586420 fbshipit-source-id: 56a29abc4bdf3b9505b510bcc207fd750c3c08a7
3255cdd
to
3ce1744
Compare
This pull request was exported from Phabricator. Differential Revision: D46586420 |
Summary: This changes the logic we use to correct scroll position on RTL ScrollView content change, to a new more generalized strategy of keeping a constant right-edge offset on layout change. This includes first layout, so that the initial scroll position is correct. Differential Revision: D47627115 fbshipit-source-id: c8964046dcb4cf33424a593e1372a3a8dd3a91df
Summary: Pull Request resolved: facebook#38529 VirtualizedList internally represents metrics along the scrolling axis using `offset` (x, y), and `length` (width, height). This one dimensional representation allows the list to be generic to being horizontal or vertical. Right now offset conversion directly takes the `x` or `y` axis value, but this is not correct when we are using a horizontal FlatList in RTL. This change converts most VirtualizedList code handling `offset,length` coordinates consistently flow from start to end, including in horizontal RTL and in inverted FlatList. This is paired with a fix to Android native code in D47627115. With these together, basic Horizontal FlatList scenarios should work correctly when laid out in RTL. Changelog: [General][Fixed] - Fix virtualization logic with horizontal RTL lists Reviewed By: vincentriemer Differential Revision: D46586420 fbshipit-source-id: 6224fc310035766f7b2473adfd170093119524a7
This pull request was exported from Phabricator. Differential Revision: D46586420 |
3ce1744
to
49c7cb6
Compare
This pull request has been merged in 8b39bfa. |
Summary: Pull Request resolved: facebook#38529 VirtualizedList internally represents metrics along the scrolling axis using `offset` (x, y), and `length` (width, height). This one dimensional representation allows the list to be generic to being horizontal or vertical. Right now offset conversion directly takes the `x` or `y` axis value, but this is not correct when we are using a horizontal FlatList in RTL. This change converts most VirtualizedList code handling `offset,length` coordinates consistently flow from start to end, including in horizontal RTL and in inverted FlatList. This is paired with a fix to Android native code in D47627115. With these together, basic Horizontal FlatList scenarios should work correctly when laid out in RTL. Changelog: [General][Fixed] - Fix virtualization logic with horizontal RTL lists Reviewed By: vincentriemer Differential Revision: D46586420 fbshipit-source-id: 79594e197d21871bb493399999e91fc0d6c7b050
Summary: Pull Request resolved: facebook#38529 VirtualizedList internally represents metrics along the scrolling axis using `offset` (x, y), and `length` (width, height). This one dimensional representation allows the list to be generic to being horizontal or vertical. Right now offset conversion directly takes the `x` or `y` axis value, but this is not correct when we are using a horizontal FlatList in RTL. This change converts most VirtualizedList code handling `offset,length` coordinates consistently flow from start to end, including in horizontal RTL and in inverted FlatList. This is paired with a fix to Android native code in D47627115. With these together, basic Horizontal FlatList scenarios should work correctly when laid out in RTL. Changelog: [General][Fixed] - Fix virtualization logic with horizontal RTL lists Reviewed By: vincentriemer Differential Revision: D46586420 fbshipit-source-id: 79594e197d21871bb493399999e91fc0d6c7b050
Summary: Pull Request resolved: facebook#38529 VirtualizedList internally represents metrics along the scrolling axis using `offset` (x, y), and `length` (width, height). This one dimensional representation allows the list to be generic to being horizontal or vertical. Right now offset conversion directly takes the `x` or `y` axis value, but this is not correct when we are using a horizontal FlatList in RTL. This change converts most VirtualizedList code handling `offset,length` coordinates consistently flow from start to end, including in horizontal RTL and in inverted FlatList. This is paired with a fix to Android native code in D47627115. With these together, basic Horizontal FlatList scenarios should work correctly when laid out in RTL. Changelog: [General][Fixed] - Fix virtualization logic with horizontal RTL lists Reviewed By: vincentriemer Differential Revision: D46586420 fbshipit-source-id: 79594e197d21871bb493399999e91fc0d6c7b050
Summary:
VirtualizedList internally represents metrics along the scrolling axis using
offset
(x, y), andlength
(width, height). This one dimensional representation allows the list to be generic to being horizontal or vertical.Right now offset conversion directly takes the
x
ory
axis value, but this is not correct when we are using an inverted FlatList, or a horizontal FlatList in RTL.This change converts most VirtualizedList code handling
offset,length
coordinates consistently flow from start to end, including in horizontal RTL and in inverted FlatList.This is paired with a fix to Android native code in D47627115. With these together, basic Horizontal FlatList scenarios should work correctly when laid out in RTL.
Differential Revision: D46586420