-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[$1000] Skeleton-view is right oriented when scrolling up and loading new messages on Android #13636
Comments
Triggered auto assignment to @kevinksullivan ( |
Current assignee @kevinksullivan is eligible for the External assigner, not assigning anyone new. |
Job added to Upwork: https://www.upwork.com/jobs/~01383ef4f4c88c4510 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav ( |
Triggered auto assignment to @sketchydroide ( |
Proposal The inverted FlatList on Android set the App/src/components/InvertedFlatList/index.android.js Lines 6 to 24 in 3620bf2
As you can see, we also set the CellRendererComponent and apply the <BaseInvertedFlatList
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
ref={ref}
// Manually invert the FlatList to circumvent a react-native bug that causes ANR (application not responding) on android 13
inverted={false}
style={styles.invert}
verticalScrollbarPosition="left" // We are mirroring the X and Y axis, so we need to swap the scrollbar position
CellRendererComponent={InvertedCell}
+ ListFooterComponentStyle={styles.invert}
/>
Result 328544.t.mp4 |
Proposal the skeleton view was right-oriented because the BaseInvertedFlatList component was configured to invert the layout of the FlatList. This was done by setting the inverted prop to false and applying the styles.invert style to the FlatList component. To fix the issue and display the skeleton view in a left-oriented manner, you can set the inverted prop to true and remove the styles.invert style. This will restore the default, non-inverted layout of the FlatList and display the skeleton view in a left-oriented manner. I hope this helps to clarify the cause of the issue and how to fix it. I have written code that can solve it. |
Thanks for the proposal folks. @bernhardoj proposal looks good here. I am also tagging @mountiny and @Beamanator for second review as this broken when we moved @sketchydroide all yours. |
That sooounnnds good to me, what do you think @mountiny ? Also I think it could be good to get @hannojg 's opinion here since they've been working on a lot of Android fixes lately, and they're the author of that PR that caused this issue. @hannojg would you mind taking a look at this proposal which could fix this issue that was probably caused by your PR? :D |
The proposal from @bernhardoj looks good to me! Setting the inverted back to true is currently not an option due to a bug in the Android framework on Android 13. Good catch! |
Proposalhttps://github.com/Expensify/App/blob/main/src/components/InvertedFlatList/index.android.js
+ const renderEmptyComponent = (props) => {
+ const ListEmptyComponent = props.ListEmptyComponent;
+ if (!ListEmptyComponent) {
+ return null;
+ }
+ return (
+ <View style={[styles.invert, props.ListEmptyComponentStyle]}>
+ <ListEmptyComponent />
+ </View>
+ );
+ };
export default forwardRef((props, ref) => (
<BaseInvertedFlatList
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
ref={ref}
// Manually invert the FlatList to circumvent a react-native bug that causes ANR (application not responding) on android 13
inverted={false}
style={styles.invert}
verticalScrollbarPosition="left" // We are mirroring the X and Y axis, so we need to swap the scrollbar position
CellRendererComponent={InvertedCell}
+ ListEmptyComponent={renderEmptyComponent(props)}
+ ListFooterComponentStyle={[styles.invert, props.ListFooterComponentStyle]}
+ ListHeaderComponentStyle={[styles.invert, props.ListHeaderComponentStyle]}
/>
)); propTypes definition can be done in PR stage |
Shouldn't we fix the bug in RN instead of the style workaround? |
As @hannojg commented here, I think it's android native sdk issue should be fixed by Google team |
I think we can go with @bernhardoj suggestion then |
📣 @bernhardoj You have been assigned to this job by @sketchydroide! |
@sketchydroide just to confirm if you checked my proposal already Though Same applies to header, empty components |
Applied on Upwork. I will open the PR today or tomorrow. |
Do we have a video of the bug occurring? While I agree with @bernhardoj approach to apply the style to other parts of the flatlist (instead of inverting the list by using the |
@hannojg Current app uses |
Nice find! I think @0xmiroslav proposal would be great once we start using the |
I have opened the PR, however I'm currently unable to test it on iOS Safari because of the 403 sign in problem. |
the PR has been merged |
still in QA at the moment as far as I can tell, I think QA is on holidays, so it might take some time |
ok this is already in prod, I don't know if everyone has been payed yet, @kevinksullivan when come back next week can you check that? |
This was deployed to production 5 days back so should be ready for payout in 2 days! Title isn't updated but payment is pending. |
thanks @mananjadhav |
@sketchydroide @kevinksullivan This is ready for payout today! |
@kevinksullivan maybe you can take of this when you come in tomorrow |
Thanks for your patience @mananjadhav @bernhardoj . I just sent offers to you both. Let me know when you've accepted and I'll get this paid. |
Accepted @kevinksullivan. Thanks for helping out here. |
@kevinksullivan Accepted. |
@kevinksullivan Is the contributor paid out too? Anything else pending here or are we good to close this one out? |
I already get paid. |
Thanks for confirming @bernhardoj. @kevinksullivan anything else pending here? |
if both of you ae payed I think we can close it |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
The skeleton view that indicated we're loading more chats is left-oriented like on other platforms.
Actual Result:
The skeleton view is right-oriented
Workaround:
N/A
Platform:
Where is this issue occurring?
Version Number:
1.2.40
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers): N/A
Logs: N/A
Notes/Photos/Videos:
https://user-images.githubusercontent.com/4741899/207949730-7c6c4800-24b1-427b-9590-7f296d098353.mp4
Expensify/Expensify Issue URL: N/A
Issue reported by: @yuwenmemon
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1671130333575879
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: