-
Notifications
You must be signed in to change notification settings - Fork 581
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-1017): add bottom sheet to infinite discovery #11318
feat(DIA-1017): add bottom sheet to infinite discovery #11318
Conversation
@@ -46,7 +47,10 @@ export const ArtistAbout: React.FC<Props> = ({ artist }) => { | |||
{!!hasBiography && ( | |||
<> | |||
<Spacer y={1} /> | |||
<Biography artist={artist} /> | |||
<Flex maxWidth={MAX_WIDTH_BIO} px={2}> |
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.
nothing changed so far, lifted up some elements to be able to share the Biography element easily
artist: ArtistFollowButton_artist$key | ||
} | ||
|
||
export const ArtistFollowButton: FC<ArtistFollowButtonProps> = ({ artist }) => { |
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.
Separated the personalized data into an individual query.
partner: PartnerFollowButton_partner$key | ||
} | ||
|
||
export const PartnerFollowButton: FC<PartnerFollowButtonProps> = ({ partner }) => { |
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.
Created a version of the follow button personalized and with an isolated query. Same as we do for ArtistFollows
@@ -3,46 +3,46 @@ import { useMutation, graphql } from "react-relay" | |||
export interface FollowProfileOptions { | |||
id: string | |||
internalID: string | |||
isFollowd: boolean | null | |||
onCompleted?: (isFollowd: boolean) => void | |||
isFollowed: boolean | null |
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.
fixed the typo, was even creating ambiguity on the store, if somewhere we updated the isFollowed
within the updater
it wouldn't reflect to the elements using this one because of the typo.
/** | ||
* @deprecated in favor of PartnerFollowButtonWithSuspense | ||
* @reason moving away personalized data into different queries | ||
*/ | ||
@track() | ||
export class PartnerFollowButton extends React.Component<Props, State> { |
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.
We need to get rid of this Element at some point, deprecated it to avoid ppl using it
@@ -144,7 +144,7 @@ export const ArtworkHeaderFragmentContainer = createFragmentContainer(ArtworkHea | |||
artists(shallow: true) { | |||
name | |||
} | |||
partner { | |||
partner(shallow: true) { |
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.
since I wanted to use shallow true in the new elements, the shared children started complaining about inconsistencies, so I had to replicate it which is a good improvement in general avoiding extra hits to partner and artist endpoint when the artwork already has all the data
import { setupTestWrapper } from "app/utils/tests/setupTestWrapper" | ||
import { graphql } from "react-relay" | ||
|
||
describe("InfiniteDiscoveryBottomSheetFooter", () => { |
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.
61d44aa
to
e80af24
Compare
e80af24
to
1abc528
Compare
This PR resolves DIA-1017
Description
This PR adds the bottom sheet element to the infinite discovery screen. We use preloaded data from the artwork card screen have the data ready if the user wants to swipe to check more details.
For next PRs:
iOS
Simulator.Screen.Recording.-.iPhone.14.Pro.-.2024-12-19.at.23.12.55.mp4
Android
Screen.Recording.2024-12-19.at.23.23.16.mov
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.