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

feat: wip on replacing artwork grids with more performant masonry #doNotMerge #7693

Closed
wants to merge 5 commits into from

Conversation

gkartalis
Copy link
Member

This PR resolves []

Description

wip

PR Checklist

  • I tested my changes on iOS / Android.
  • I added screenshots or videos to illustrate my changes.
  • I added Tests and Stories for my changes.
  • I added an app state migration.
  • I hid my changes behind a feature flag.
  • I have prefixed changes that need to be tested during a release QA with [NEEDS EXTERNAL QA] on the changelog.

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

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.

@gkartalis gkartalis self-assigned this Nov 18, 2022
contextScreenOwnerType={OwnerType.artist}
contextScreenOwnerId={artist.internalID}
contextScreenOwnerSlug={artist.slug}
<Box flex={1} height={height}>
Copy link
Member Author

Choose a reason for hiding this comment

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

if we don't add the height here the loadmore is triggered all the time.

data={artworkdata}
numColumns={2}
estimatedItemSize={width / 2}
// contentContainerStyle={{ paddingTop: space(2), paddingHorizontal: space(2) }}
Copy link
Member Author

Choose a reason for hiding this comment

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

we can remove this completely

@gkartalis gkartalis changed the title feat: wip on replacing #doNotMerge feat: wip on replacing artwork grids with more performant masonry #doNotMerge Nov 18, 2022
Comment on lines 239 to 243
// <Artwork
// artwork={item}
// updateRecentSearchesOnTap
// itemIndex={index}
// />
Copy link
Member Author

Choose a reason for hiding this comment

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

this is our artwork component. If we use it instead of the other one above the images jump a bit, they basically display another image briefly before rendering the correct one.

Comment on lines +52 to +73
<MasonryFlashList
contentContainerStyle={{ paddingVertical: space(2) }}
numColumns={2}
data={test}
estimatedItemSize={width / 2}
renderItem={({ item }) => {
console.warn({ img: item.image?.url })
return (
<Box mx={1}>
<OpaqueImageView
imageURL={item.image?.url}
width={width / 2 - space("2")}
aspectRatio={item.image?.aspectRatio}
/>
<Text>{item.title}</Text>
</Box>
)
}}
ListEmptyComponent={
<SimpleMessage m={2}>Nothing yet. Please check back later.</SimpleMessage>
}
/>
Copy link
Member Author

Choose a reason for hiding this comment

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

without the need of infinite scrolling flashlist works amazingly well without issues.

@@ -154,7 +154,7 @@ export const StickyTabPage: React.FC<StickyTabPageProps> = ({
>
{tabs.map(({ content }, index) => {
return (
<View style={{ flex: 1, width }} key={index}>
<View style={{ backgroundColor: "green", flex: 1, width }} key={index}>
Copy link
Member Author

Choose a reason for hiding this comment

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

this can also be removed, it was added for debugging

@@ -50,7 +50,7 @@ interface StickyTabPageProps {
*/
export const StickyTabPage: React.FC<StickyTabPageProps> = ({
tabs,
staticHeaderContent = <></>,
staticHeaderContent = <Text>YOLO</Text>,
Copy link
Member Author

Choose a reason for hiding this comment

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

this can be also removed 🙈

Comment on lines +263 to +267
contentInset={{ top: stickyHeaderHeightValue + staticHeaderHeightValue }}
contentOffset={{
y: -stickyHeaderHeightValue - staticHeaderHeightValue - space(6),
x: 0,
}}
Copy link
Member Author

Choose a reason for hiding this comment

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

essential in order to render the list correctly on the first render

y: -stickyHeaderHeightValue - staticHeaderHeightValue - space(6),
x: 0,
}}
scrollEventThrottle={0.00000000001}
Copy link
Member Author

Choose a reason for hiding this comment

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

not sure if we need this

@gkartalis
Copy link
Member Author

cc @MrSltun

@gkartalis
Copy link
Member Author

Closing for now, will revisit if they fix the issue from flashlist

@gkartalis gkartalis closed this Apr 5, 2023
@gkartalis gkartalis deleted the gkartalis/MOPLAT-483 branch April 5, 2023 15:05
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.

1 participant