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(ONYX-149): trigger mutations on artist preview bottom sheet #9034

Conversation

MounirDhahri
Copy link
Member

@MounirDhahri MounirDhahri commented Jul 21, 2023

This PR resolves ONYX-149

Description

This PR adds the missing mutations to the artist preview bottom sheet

Screen.Recording.2023-07-25.at.13.29.30.mov

PS: After recording the video, I realized it's not good UX to delete the artist immediately and added an alert first.

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

  • trigger mutations on artist preview bottom sheet - mounir

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 Jul 21, 2023

This PR contains the following changes:

  • Cross-platform user-facing changes (trigger mutations on artist preview bottom sheet - mounir)

Generated by 🚫 dangerJS against edece5f

@MounirDhahri MounirDhahri force-pushed the feat/ONYX-149/trigger-mutations-on-artist-preview-bottom-sheet branch from 5e4e881 to b23060a Compare July 25, 2023 11:33
@MounirDhahri MounirDhahri self-assigned this Jul 25, 2023
@MounirDhahri MounirDhahri force-pushed the feat/ONYX-149/trigger-mutations-on-artist-preview-bottom-sheet branch from b23060a to edece5f Compare July 25, 2023 11:34
input,
},
// @ts-expect-error
optimisticResponse: {
Copy link
Member Author

Choose a reason for hiding this comment

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

added this for a better ux

variables: {
input,
},
// @ts-expect-error
Copy link
Member Author

Choose a reason for hiding this comment

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

types are old here because of some relay types weirdness, we should at some point fix this everywhere in Eigen

keyExtractor={({ internalID }) => internalID!}
data={filteredUserInterests}
renderItem={({ item }) => {
if (item?.node && item.internalID && item.node.internalID) {
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 never going to be null because we're checking for it above this call. I added this to make typescript happy

Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion / non-blocking: very tiny suggestion, I think this can be written as

item.internalID && item.node?.internalID

@MounirDhahri MounirDhahri marked this pull request as ready for review July 25, 2023 11:38
Copy link
Contributor

@olerichter00 olerichter00 left a comment

Choose a reason for hiding this comment

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

Great work!

@MounirDhahri
Copy link
Member Author

@dariakoko I will merge this to make sure you can continue on the work on showing the privacy icon next to the artist name

@MounirDhahri MounirDhahri merged commit 512467e into main Jul 25, 2023
1 check passed
@MounirDhahri MounirDhahri deleted the feat/ONYX-149/trigger-mutations-on-artist-preview-bottom-sheet branch July 25, 2023 12:39
Copy link
Contributor

@nickskalkin nickskalkin left a comment

Choose a reason for hiding this comment

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

I don't know much about this part of codebase, but looks good to me 👍


if (!collectedArtists) return <></>

const filteredUserInterests = userInterests.filter((userInterest) => {
if (userInterest?.internalID && userInterest.node && userInterest.node.internalID) {
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion / non-blocking: very tiny suggestion, I think this can be written as

userInterest?.internalID && userInterest.node?.internalID

keyExtractor={({ internalID }) => internalID!}
data={filteredUserInterests}
renderItem={({ item }) => {
if (item?.node && item.internalID && item.node.internalID) {
Copy link
Contributor

Choose a reason for hiding this comment

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

suggestion / non-blocking: very tiny suggestion, I think this can be written as

item.internalID && item.node?.internalID

Copy link
Contributor

@dariakoko dariakoko left a comment

Choose a reason for hiding this comment

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

Thank you!

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.

5 participants