Skip to content

refactor(DIA-1281): Code cleanup on InfiniteDiscovery #12007

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

Merged

Conversation

araujobarret
Copy link
Contributor

@araujobarret araujobarret commented Apr 29, 2025

This PR resolves DIA-1281

Description

No Changes expected, just code org:

  • separation of tracking code
  • broke smaller elements into separate components
  • added named functions to the swiper gesture to indicate what's happening
  • props name improvement

PR Checklist

  • I have tested my changes on the following platforms:
    • Android.
    • iOS.
  • I hid my changes behind a feature flag, or they don't need one.
  • I have included screenshots or videos at least on Android, 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

  • refactor: infinite discovery code org

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.

@araujobarret araujobarret requested review from MounirDhahri and a team April 29, 2025 08:02
@araujobarret araujobarret self-assigned this Apr 29, 2025
@ArtsyOpenSource
Copy link
Contributor

ArtsyOpenSource commented Apr 29, 2025

This PR contains the following changes:

  • Cross-platform user-facing changes (refactor: infinite discovery code org - araujobarret)

Generated by 🚫 dangerJS against 1dd313a

@@ -54,7 +42,7 @@ export const InfiniteDiscoveryArtworkCard: React.FC<InfiniteDiscoveryArtworkCard
const setHasSavedArtwors = GlobalStore.actions.infiniteDiscovery.setHasSavedArtworks
const gestureState = useRef({ lastTapTimestamp: 0, numTaps: 0 })

const { trackEvent } = useTracking()
const track = useInfiniteDiscoveryTracking()
Copy link
Member

Choose a reason for hiding this comment

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

👌

})
},
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Thanks much 👍

@araujobarret araujobarret merged commit b4cbe74 into main May 2, 2025
7 checks passed
@araujobarret araujobarret deleted the araujobarret/refactor/infinite-discover-code-reorg branch May 2, 2025 07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants