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

fix(ONYX-1383): some artwork rail images get mangled after horizontal scrolling #11207

Conversation

dariakoko
Copy link
Contributor

@dariakoko dariakoko commented Nov 27, 2024

This PR resolves ONYX-1383

Description

Use flatList instead of FlashList on artwork rails

Follow-up on #11142: The max and min width for the artwork rail card were missing. Adding these constraints resolved the issue where the metadata was stretched to its full width. More details: https://artsy.slack.com/archives/C02BAQ5K7/p1732116471982649

Summary after the bug investigation: https://artsy.slack.com/archives/C02BAQ5K7/p1732102644251849

Screenshots confirming that the layout of the artwork rail card is not broken when using FlatList

Android FF is off Android FF is on iOS FF is off iOS FF is on
Screenshot_1732712502 Screenshot_1732712559 image image
Screen.Recording.2024-11-27.at.14.37.23.mov

PR Checklist

  • I have tested my changes on iOS and Android.
  • I hid my changes behind a feature flag, or they don't need one.
  • I have included screenshots or videos, or I have not changed the UI.
  • I have added tests, or my changes don't require any.
  • I added an app state migration, or my changes do not require one.
  • I have documented any follow-up work that this PR will require, or it does not require any.
  • I have added a changelog entry below, or my changes do not require one.

To the reviewers 👀

  • I would like at least one of the reviewers to run this PR on the simulator or device.
Changelog updates

Changelog updates

Cross-platform user-facing changes

  • some artwork rail images get mangled after horizontal scrolling (use flatList instead of FlashList on artwork rails)

iOS user-facing changes

Android user-facing changes

Dev changes

Need help with something? Have a look at our docs, or get in touch with us.

@ArtsyOpenSource
Copy link
Contributor

ArtsyOpenSource commented Nov 27, 2024

This PR contains the following changes:

  • Cross-platform user-facing changes (some artwork rail images get mangled after horizontal scrolling (use flatList instead of FlashList on artwork rails) - dariakoko)

Generated by 🚫 dangerJS against 70d289f

Copy link
Member

@MounirDhahri MounirDhahri left a comment

Choose a reason for hiding this comment

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

Was setting the height and width not enough to fix things inside PrefetchFlashList? Can we avoid migrating the PrefetchFlatList

Copy link
Member

@gkartalis gkartalis left a comment

Choose a reason for hiding this comment

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

Nice :)

@gkartalis
Copy link
Member

gkartalis commented Nov 27, 2024

@MounirDhahri we had to migrate to flatlist instead of flashlist due to the bug in android stated here

another issue that using flatlist over flashlist is fixed with this PR is that the flatlist draws the elements way faster (in android) vs flashlist for some reason.

The layout issues were the fix for the second issue mentioned here

@dariakoko
Copy link
Contributor Author

Thanks @gkartalis for explaining!

Setting the height and width not enough to fix things inside PrefetchFlashList did not work, unfortunately

@MounirDhahri
Copy link
Member

thanks for explaing

Copy link
Member

@anandaroop anandaroop left a comment

Choose a reason for hiding this comment

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

🙏🏽 🙏🏽

@dariakoko dariakoko added the Squash On Green A label to indicate that Peril should squash-merge this PR when all statuses are green label Nov 27, 2024
…l-images-get-mangled-after-horizontal-scrolling
@artsy-peril artsy-peril bot merged commit 64893d4 into main Nov 28, 2024
7 checks passed
@artsy-peril artsy-peril bot deleted the dariakoko/ONYX-1383/android-some-artwork-rail-images-get-mangled-after-horizontal-scrolling branch November 28, 2024 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Jira Synced Squash On Green A label to indicate that Peril should squash-merge this PR when all statuses are green
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants