Skip to content
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

(PC-17083) fix(Home): fix modules not loading on homepage #3498

Merged
merged 1 commit into from
Sep 5, 2022

Conversation

yorickeando
Copy link
Contributor

@yorickeando yorickeando commented Sep 5, 2022

Link to JIRA ticket: https://passculture.atlassian.net/browse/PC-17083

Module loading is triggered by the call of onEndReached on the react native Flatlist. It is a current bug of React Native that onEndReached is sometimes only called once because of race conditions between two flatlist behaviors. We do notice that onEndReached is indeed called once when this bug occurs.

This pull request transfers the logic inside onEndReached to onScroll, more reliable.

Our hypothesis is partly based on these discussions.

The bug was not only on disconnected users, but it was made more visible because of the lack of displayable modules in the batch of modules made available by the first and only onEndReached. For geolocated users, about 10 module ere shown so the fact that no more could be loaded was less noticeable.

Checklist

I have:

  • Made sure the title of my PR follows the convention ($jira) $type($scope): $summary.
  • Made sure my feature is working on the relevant real / virtual devices (native and web).
  • Written unit tests native (and web when implementation is different) for my feature.
  • Added a screenshot for UI tickets.
  • Added new reusable components to AppComponents page and communicate to the team on slack.
  • If my PR is a bugfix, I add the link of the "résolution de problème sur le bug" on Notion

Screenshots

@yorickeando yorickeando self-assigned this Sep 5, 2022
@yorickeando yorickeando changed the title (PC-17083) fix modules not loading on homepage (PC-17083) bug(Home):ifx modules not loading on homepage Sep 5, 2022
@yorickeando yorickeando changed the title (PC-17083) bug(Home):ifx modules not loading on homepage (PC-17083) fix(Home): fix modules not loading on homepage Sep 5, 2022
Copy link
Contributor

@anoukhello anoukhello left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OKPMBJ

@yorickeando yorickeando merged commit 9f8deaa into master Sep 5, 2022
@yorickeando yorickeando deleted the pc-17083/fix-modules-not-loading-on-home branch September 5, 2022 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants