-
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
[HOLD for payment 2024-08-09] [$250] Distance - Page is not scrollable after adding multiple stops #42577
Comments
Triggered auto assignment to @stephanieelliott ( |
We think this issue might be related to the #collect project. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Distance - Page is not scrollable after adding multiple stops What is the root cause of that problem?The footer (map) for android is rendered separately from the App/src/components/DraggableList/index.android.tsx Lines 11 to 21 in 0cb2dc0
What changes do you think we should make in order to solve the problem?We can use <NestableScrollContainer
ref={ref}
contentContainerStyle={styles.flexGrow1}
>
<NestableDraggableFlatList
contentContainerStyle={styles.flex1}
// eslint-disable-next-line react/jsx-props-no-spreading
{...viewProps}
/>
{React.isValidElement(ListFooterComponent) && <View style={styles.flexGrow1}>{ListFooterComponent}</View>}
</NestableScrollContainer> There will be a console error when we will use Resultscroll_issue_distance_page.mp4AlternativesWhat alternative solutions did you explore? (Optional)
<ScrollView style={styles.flex1}>
<DraggableList
data={waypointsList}
keyExtractor={(item) => item}
shouldUsePortal
onDragEnd={updateWaypoints}
ref={scrollViewRef}
renderItem={renderItem}
ListFooterComponent={
<DistanceRequestFooter
waypoints={waypoints}
navigateToWaypointEditPage={navigateToWaypointEditPage}
transaction={transaction}
/>
}
/>
</ScrollView>
App/src/components/DraggableList/index.android.tsx Lines 11 to 20 in 525ad6f
To: <ScrollView contentContainerStyle={{flexGrow: 1}}>
<DraggableFlatList
ref={ref}
containerStyle={ListFooterComponent ? undefined : styles.flex1}
contentContainerStyle={ListFooterComponent ? undefined : styles.flexGrow1}
// eslint-disable-next-line react/jsx-props-no-spreading
{...viewProps}
/>
{React.isValidElement(ListFooterComponent) && <View style={styles.flexGrow1}>{ListFooterComponent}</View>}
</ScrollView> We can wrap both elements in <ScrollView contentContainerStyle={styles.flexGrow1}>
<DraggableFlatList
ref={ref}
containerStyle={ListFooterComponent ? undefined : styles.flex1}
contentContainerStyle={ListFooterComponent ? undefined : styles.flexGrow1}
scrollEnabled={false}
// eslint-disable-next-line react/jsx-props-no-spreading
{...viewProps}
/>
{React.isValidElement(ListFooterComponent) && <View style={styles.flexGrow1}>{ListFooterComponent}</View>}
</ScrollView> Resultdistance_rate_scroll_issue.mp4 |
ProposalPlease re-state the problem that we are trying to solve in this issue.
What is the root cause of that problem?This is bug is for android specific platform because in the Native file, we have wrapped the App/src/components/DraggableList/index.android.tsx Lines 11 to 12 in 525ad6f
This was because we also display the component App/src/components/DraggableList/index.android.tsx Lines 19 to 20 in 525ad6f
Due to which we are unable to scroll on What changes do you think we should make in order to solve the problem?We need to make a function for diff --git a/src/components/DraggableList/index.android.tsx b/src/components/DraggableList/index.android.tsx
index 30bf7c927b..70b2557e8b 100644
--- a/src/components/DraggableList/index.android.tsx
+++ b/src/components/DraggableList/index.android.tsx
@@ -7,17 +7,20 @@ import type {DraggableListProps} from './types';
function DraggableList<T>({renderClone, shouldUsePortal, ListFooterComponent, ...viewProps}: DraggableListProps<T>, ref: React.ForwardedRef<FlatList<T>>) {
const styles = useThemeStyles();
+
+ const FooterComponent = () => {
+ return <View style={styles.flexGrow1}>{React.isValidElement(ListFooterComponent) && ListFooterComponent}</View>;
+ };
+
return (
- <View style={styles.flex1}>
- <DraggableFlatList
- ref={ref}
- containerStyle={ListFooterComponent ? undefined : styles.flex1}
- contentContainerStyle={ListFooterComponent ? undefined : styles.flexGrow1}
- // eslint-disable-next-line react/jsx-props-no-spreading
- {...viewProps}
- />
- {React.isValidElement(ListFooterComponent) && <View style={styles.flexGrow1}>{ListFooterComponent}</View>}
- </View>
+ <DraggableFlatList
+ ref={ref}
+ containerStyle={ListFooterComponent ? undefined : styles.flex1}
+ contentContainerStyle={ListFooterComponent ? undefined : styles.flexGrow1}
+ // eslint-disable-next-line react/jsx-props-no-spreading
+ {...viewProps}
+ ListFooterComponent={FooterComponent}
+ />
);
}
Result VideoScreen.Recording.2024-05-25.at.2.45.49.PM.mov |
Proposal updated
|
@stephanieelliott Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Job added to Upwork: https://www.upwork.com/jobs/~014d91998739178ee2 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mollfpr ( |
Hey @mollfpr, a few proposals here to review when you get a chance! |
@Krishna2323 What's the difference between your main and the alternative solution? Also, I tried the above step but it did not work. In the alternative solution, wrapping the @GandalfGwaihir As mentioned before in the @Krishna2323 proposal, we can't use the |
@mollfpr, I think we only need to add the |
I wasn't able to test on physical device as i don't have one, but when i tested my solution out on emulator, it worked fine even with the issue linked, are you sure that if we implement my proposal, that bug will occur again @mollfpr ? |
@GandalfGwaihir I'm pretty sure the bug will occur again. The PR #41603 is also intentionally moved to the android file to avoid using @Krishna2323 Could you update your proposal? |
oh cool, I will think of something else here, also @Krishna2323 , don’t wrap inside scrollview, We can’t wrap a virtual list inside scroll view, we will get console error for that |
|
@mollfpr, @stephanieelliott Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@Krishna2323 The result looks good, but I think the expected result is similar to what we have in iOS where the scroll can be used above the waypoint list instead of just space beside the add stop button. Simulator.Screen.Recording.-.iPhone.15.Pro.17.2.-.2024-06-04.at.02.57.04.mov |
I have a spare android device where i can test my proposal and see if the mentioned issue occurs again, should i do that? or it would be a waste of time? @mollfpr |
📣 @allgandalf! 📣
|
|
Triggered auto assignment to @lschurr ( |
This is held on an upstream fix #43810 (comment) |
Upstream issue we are blocked on is here: computerjazz/react-native-draggable-flatlist#543 |
This issue has not been updated in over 15 days. @mollfpr, @stephanieelliott, @stitesExpensify, @Krishna2323 eroding to Monthly issue. P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do! |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.15-9 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2024-08-09. 🎊 For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Summarizing payment on this issue:
Upwork job is here: https://www.upwork.com/jobs/~1737876297360310272 |
@mollfpr can you please complete the BZ checklist for this issue? |
I couldn't find the offending PR.
The regression step should be good.
|
$250 approved for @mollfpr |
@mollfpr, @stephanieelliott, @stitesExpensify, @Krishna2323 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Test case issue created: https://github.com/Expensify/Expensify/issues/420216 All done here, thanks! |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 1.4.75-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4572868
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team
Action Performed:
Expected Result:
Page becomes scrollable to view the whole content after adding multiple waypoints (Same behavior as in mWeb)
Actual Result:
Page is not scrollable to view the whole content after adding multiple waypoints which is a different behavior compared to mWeb.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Bug6490254_1716535967530.Screen_Recording_20240524_102844_New_Expensify.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @stephanieelliottThe text was updated successfully, but these errors were encountered: