Skip to content

Commit

Permalink
Merge pull request #29253 from bernhardoj/fix/27931-inverted-scroll
Browse files Browse the repository at this point in the history
Fix report screen scrollbar on Android is on the left screen
  • Loading branch information
cristipaval authored Oct 12, 2023
2 parents 12112d2 + c217028 commit a24dfc9
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 136 deletions.
22 changes: 0 additions & 22 deletions patches/react-native+0.72.4+003+VerticalScrollBarPosition.patch

This file was deleted.

1 change: 1 addition & 0 deletions src/components/InvertedFlatList/BaseInvertedFlatList.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ function BaseInvertedFlatList(props) {
// Web requires that items be measured or else crazy things happen when scrolling.
getItemLayout={shouldMeasureItems ? getItemLayout : undefined}
windowSize={15}
inverted
/>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ function CellRendererComponent(props) {
{...props}
style={[
props.style,

/**
* To achieve absolute positioning and handle overflows for list items,
* it is necessary to assign zIndex values. In the case of inverted lists,
Expand Down

This file was deleted.

71 changes: 0 additions & 71 deletions src/components/InvertedFlatList/index.android.js

This file was deleted.

1 change: 0 additions & 1 deletion src/components/InvertedFlatList/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ function InvertedFlatList(props) {
<BaseInvertedFlatList
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
inverted
ref={listRef}
shouldMeasureItems
contentContainerStyle={StyleSheet.compose(contentContainerStyle, styles.justifyContentEnd)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@ export default forwardRef((props, ref) => (
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
ref={ref}
inverted
CellRendererComponent={CellRendererComponent}
/**
* To achieve absolute positioning and handle overflows for list items, the property must be disabled
* for Android native builds.
* Source: https://reactnative.dev/docs/0.71/optimizing-flatlist-configuration#removeclippedsubviews
*/
removeClippedSubviews={false}
/>
));
5 changes: 0 additions & 5 deletions src/styles/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -2964,11 +2964,6 @@ const styles = (theme) => ({
horizontal: windowWidth - 140,
}),

invert: {
// It's important to invert the Y AND X axis to prevent a react native issue that can lead to ANRs on android 13
transform: [{scaleX: -1}, {scaleY: -1}],
},

iPhoneXSafeArea: {
backgroundColor: theme.inverse,
flex: 1,
Expand Down

0 comments on commit a24dfc9

Please sign in to comment.