-
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
[$16000] Pagination seems broken for chats (please see #12054) #7860
Comments
Triggered auto assignment to @neil-marcellini ( |
I was able to reproduce this on Web and Desktop, particularly if I scrolled up quickly. As shown in the video, this occurs on any chat, not just with Chronos. |
Triggered auto assignment to @adelekennedy ( |
Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Still overdue 6 days?! Let's take care of this! |
8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it! |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Santhosh-Sellavel ( |
Triggered auto assignment to @AndrewGable ( |
From this slack convo this may be related to the flatlist fix (purely for context) |
Triggered auto assignment to @bfitzexpensify ( |
The VirtualizedList component in react-native-web is just copied over from react-native, with only a few specific changes. Please open all your issues and pull requests against react-native, not react-native-web |
Hey guys! I proposed the changes to the react-native-web upstream repo. I will create an issue on Expensify's App repo for each problem. |
@roryabraham Oh, I didn't know that. Do you know exactly where the VirtualizedList file is in react-native? |
Yes, it's right here |
@roryabraham Also I'm having trouble finding UIManager/index.js and useElementLayout/index.js implementations in react-native. Do you have an idea where they could be? |
react-native doesn't have those implementations. The UIManager module is not supported in the Fabric architecture. And As I mentioned on the react-native-web PR, you shouldn't need to touch those files for web anyway. The question I have is about how much of these code changes should go into react-native instead of react-native-web. And whether the |
Something else to have in mind is this (big) refactor of the
Per the above summary it seems any enhancements would be better off to be applied on the latest code I think ATM react-native-web is using the implementation from 6-7 months ago: necolas/react-native-web@edec979 |
Yeah I think we should update VirtualizedList and FlatList in the 0.19-dev branch, removing any web-specific patches that might be in those modules in react-native-web, and then I can cut a canary that can be tested here and elsewhere. You might want to migrate your own patches, which will probably be a pain, but that's the price of forking forks. We really need to get to a point where the upstream VirtualizedList works well enough on web out-of-the-box, and can be installed in react-native-web as a specific package. That would make all our lives easier, and I think there is a good chance of that happening in the context of "How can we make React Native better" (which you should comment on about this topic if you haven't already) react-native-community/discussions-and-proposals#528 |
Update: right now I'm testing if the problems and solutions stated in my proposal still apply to the refactor of VirtualizedList. |
@bfitzexpensify @roryabraham Some of my solutions do not apply to the new VirtualizedList refactor in the react-native repo. It will take me time to fully understand the new functionality and come up with a new proposal. I believe the issue will persist in Web using the new refactor but I can't be sure as I can’t test it because these changes are not released in react-native-web yet. |
I can progress if I create my own branch in react-native-web with react-native latest changes (thanks for the tip necolas). |
Update: I am still applying the react-native's VirtualizedList new changes to react-native-web, there are many files to copy and paths to resolve. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Looks like the discussion on holding on #7925 originated here in relation to bi-directional scrolling. That issue is in-turn held on Comment Linking. |
Apologies @trjExpensify, I hid the comment. I swear a checked the issue numbers multiple times (maybe I had stacked windows/browsers?) |
Update: I managed to run the updated VirtualizedList on Web and test it with my proposal. I confirm the issue still exists with the new refactor and my proposal (with minor changes) still applies to fix the issue. It works great! I want to make tests on native platforms just to make sure I don't break something there. Also, I am working to reproduce this issue with minimal code in a sandbox so I can present it as an issue in react-native code. |
Thanks for the update @LucioChavezFuentes. Please keep us in the loop and let us know how best we can support you. |
Update: I reproduced this issue in a sandbox here While doing the sandbox I realized that problems 2, 3, and 4 are not caused by Inverted VirtualizedList but by VirtualizedList's struggle to render expensive items, which affects both Inverted and Normal VirtualizedList. Inverted VirtualizedList only causes the first problem. Also, I found edge cases that made me update the solution for Problem 4. I made tests on Android, it works fine. I still haven't tested my solution in iOS as I have trouble running the rn-tester on this platform. |
Following instructions for the weekly update chore: @roryabraham this is one of the oldest issues in the /App repo. To help us clear out the large backlog of bugs, can you:
I recognize this issue is on hold, but given it's age do you think we should move it to internal anyways? |
@tjferriss I think we're on a good path in this issue, despite it's age. There's a lot of tricky stuff going on, including the HOLD and related issue in the title. |
Update: After further testing in native platforms and some more insights from the react-native maintainers' feedback, this is where I am: My proposal is applicable only on Web. I can not reproduce the problems stated in my proposal in Native platforms except for Problem 2 but this problem has a low impact. My proposal fixes the VirtualizedList in Web in a superficial way because I am still failing to understand the root issue. There are new discoveries that question my understanding of the problems:
These discoveries just make more questions: Why does onLayout's e.target.offsetTop return zero for offset on an element that is supposed to be mounted and definitely have an offset different to zero? If offsetTop is unreliable, Is there a solution for the Web’s onLayout to behave the same as its native counterpart without using offsetTop (or at least in a way that doesn’t cause issues)? Why does the inverted scroll wheel patch cause Problem 3? Does it cause race conditions on mounting new items in VirtualizedList? Why using Web's onLayout 'y' returns negative offsets on scroll fast? Do the answers to these questions are inside of react-native or react-native-web, or both? I am curious to answer the new questions and find out the true root issue but it will take time. If there is urgency on fixing issue #7860 we can merge my solutions in react-native-web fork. I don't think uploading the solutions to react-native fork will help, except for Problem 2. Something about issue #2545I don't think my solutions will help to fix the issue #2545, however, let me share something that could help to fix this issue: Not long ago I reported a bug where the jpg images get values equal to zero for width and height. This bug caused a little movement among items on lists because the initial state of the images rendered a tiny element and the next moment the image shows. Perhaps the issue exists only in lists with jpg images uploaded before the bug fix. |
A couple of housekeeping items as I circle back on this issue:
|
We opened #12054 as a kind of 'reset' since this issue had grown long and a bit unwieldy. @LucioChavezFuentes is assigned over there, but it does seem like there's some confusion on which issue is the better one to communicate on. I think we can probably close this in favour of the other to eliminate that confusion and keep progress and questions/answers in the one place. |
Ah, thanks. I'm not passionate, so up to you and @roryabraham. |
Cool, I'll go ahead and close then. Anyone coming here, please head to #12054 instead. Title also updated. |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Action Performed:
Expected Result:
Messages should load without any issue
Actual Result:
Messages get stuck and pagination doesn't load properly
Workaround:
unknown
Platform:
Where is this issue occurring?
Version Number: 1.1.39-1
Reproducible in staging?: Y
Reproducible in production?: Y
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation
New.Expensify.-.Google.Chrome.2022-02-09.22-29-03.mp4
Expensify/Expensify Issue URL:
Issue reported by: @marcaaron @kidroca
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1644435691436529
https://expensify.slack.com/archives/C01GTK53T8Q/p1641586928143800?thread_ts=1641315371.490700&cid=C01GTK53T8Q
View all open jobs on GitHub
The text was updated successfully, but these errors were encountered: