-
Notifications
You must be signed in to change notification settings - Fork 583
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(DIA-1064): add another works by artist tab on Infinite Discovery #11487
feat(DIA-1064): add another works by artist tab on Infinite Discovery #11487
Conversation
}) => { | ||
const color = useColor() | ||
|
||
// animated variables | ||
const containerAnimatedStyle = useAnimatedStyle(() => { | ||
"worklet" | ||
|
||
if (appearsOnIndex === undefined || disappearsOnIndex === undefined) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extended the backdrop to be able to control the animation if wanted given appearing/disappearing properties
</LinkText> | ||
</Text> | ||
</Flex> | ||
<ElementInView onVisible={handleOnVisible}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tried to compare the Sentinel
vs ElementInView
to see which one is simpler to read and understand and ended up picking ElementInView
because it's simpler to read/understand
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, I didn't know about this component!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me, left a few questions
} | ||
|
||
export const DefaultBottomSheetBackdrop: React.FC<DefaultBottomSheetBackdrop> = ({ | ||
animatedIndex, | ||
onClose, | ||
pressBehavior, | ||
style, | ||
appearsOnIndex, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: should we add a note what these options do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you think we should we can add, but that's from the original API https://gorhom.dev/react-native-bottom-sheet/components/bottomsheetbackdrop#appearsonindex
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah interesting, I thought this is our own thing. nevermind then
</LinkText> | ||
</Text> | ||
</Flex> | ||
<ElementInView onVisible={handleOnVisible}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, I didn't know about this component!
import { useRecordViewArtwork } from "app/utils/mutations/useRecordArtworkView" | ||
import { useState } from "react" | ||
|
||
export const useSetArtworkAsRecentlyViewed = (artworkId?: string) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: why ?
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bc it might be undefined since we use it as a hook we can't conditionally call this hook if artworkId is present
This PR resolves DIA-1064 DIA-1065 DIA-1066
Description
This PR wraps up most of the work of the bottom sheet in the infinite discovery:
iOS
Simulator.Screen.Recording.-.iPhone.14.Pro.-.2025-02-05.at.10.16.14.mp4
PR Checklist
To the reviewers 👀
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.