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-1293): redesign save cta and add follow cta #11062

Merged
merged 31 commits into from
Nov 12, 2024

Conversation

dariakoko
Copy link
Contributor

@dariakoko dariakoko commented Nov 5, 2024

This PR resolves ONYX-1293 ONYX-1286

Description

Redesign Save CTA and add Follow CTA to the artwork card and grid item

Implement experiments: variant-a, variant-b and variant-c

  • Control variation: app users will see rail cards with current design with the save button in its original position.
  • Variant B: app users will see rail cards with save button below.
  • Variant C: app users will see rail cards with save and follow button below.

Add confirmation toast for the Artist follow action

Hide changes behind a feature flag AREnableNewSaveAndFollowOnArtworkCard

Figma: https://www.figma.com/design/tZ5OjG3dXFmNKFY3zqXlYV/App-Card-and-Rail?node-id=411-12304&node-type=canvas&m=dev

Rail

iOS variant-a iOS variant-b iOS variant-c
image image image
Android variant-a Android variant-b Android variant-c
Screenshot_1730992571 Screenshot_1730992635 Screenshot_1730992702

Grid with 1 column

iOS variant-a iOS variant-b iOS variant-c
image image image
Android variant-a Android variant-b Android variant-c
Screenshot_1730992546 Screenshot_1730992640 Screenshot_1730992696

Grid with 2 columns

iOS variant-a iOS variant-b iOS variant-c
image image image
Android variant-a Android variant-b Android variant-c
Screenshot_1730992550 Screenshot_1730992638 Screenshot_1730992699

Follow Artist toast

iOS Android
image Screenshot_1730992767

Save button on Artwork screen

Before Liked Before not Liked After (experiment b or c) Liked After (experiment b or c) not Liked
image image image image

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

  • redesign Save CTA and add Follow CTA, use A/B test with 3 variants - daria

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.

@dariakoko dariakoko self-assigned this Nov 5, 2024
@dariakoko dariakoko marked this pull request as ready for review November 7, 2024 15:23
@dariakoko
Copy link
Contributor Author

Note: the tracking of the experiment has to be adjusted: we need to track the experiment on the ArtworksRail component and track once per session. Will be addressed in a separate PR

@ArtsyOpenSource
Copy link
Contributor

ArtsyOpenSource commented Nov 7, 2024

This PR contains the following changes:

  • Cross-platform user-facing changes (redesign Save CTA and add Follow CTA, use A/B test with 3 variants - daria - dariakoko)

Generated by 🚫 dangerJS against 7210877

Copy link
Member

@MounirDhahri MounirDhahri left a comment

Choose a reason for hiding this comment

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

Nice one - I left a few comments. please let me know if something isn't clear

src/app/Components/Artist/useFollowArtist.ts Outdated Show resolved Hide resolved
src/app/Components/Artist/useFollowArtist.ts Outdated Show resolved Hide resolved
src/app/Components/ArtworkGrids/ArtworkGridItem.tsx Outdated Show resolved Hide resolved
src/app/store/migration.ts Outdated Show resolved Hide resolved
@@ -0,0 +1,26 @@
export const getExperimentVariant = (enabled: boolean, variant: string) => {
Copy link
Member

Choose a reason for hiding this comment

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

issue: is this really needed? I would rather suggest we rely on useExperimentVariant instead to avoid maintaining two methods that more or less do the same thing. It also works pretty well with our overrides unlike this new method which will also need to be updated to support it.

If there is something broken with useExperimentVariant, then we have a big problem and we need to fix it 😄 .

Ideally we would to get the variant like this or so:

  const experiment = useExperimentVariant(flag)
  const variant = experiment.variant

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added it to avoid implementing the same variant check in multiple files:

  const newSaveAndFollowOnArtworkCardExperiment = useExperimentVariant(
    "onyx_artwork-card-save-and-follow-cta-redesign"
  )
  const enableShowOldSaveCTA =
    newSaveAndFollowOnArtworkCardExperiment.enabled &&
    newSaveAndFollowOnArtworkCardExperiment.payload === "variant-a"
  const enableNewSaveCTA =
    newSaveAndFollowOnArtworkCardExperiment.enabled &&
    newSaveAndFollowOnArtworkCardExperiment.payload === "variant-b"
  const enableNewSaveAndFollowCTAs =
    newSaveAndFollowOnArtworkCardExperiment.enabled &&
    newSaveAndFollowOnArtworkCardExperiment.payload === "variant-c" 

It will only be used for this experiment and will be removed when the experiment is finished.
The experiment is taking a long time and I'm afraid, the logic can be messed up eventually is we keep these code duplicated.
I'm open to revert the change if you disagree

Copy link
Member

Choose a reason for hiding this comment

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

since it is currently within the experiments folder, I am afraid someone would use it accidentally and it would make removing it hard. Do you mind if you maybe rename it to something more specific to your feature and move it closer. Thank you

src/app/utils/experiments/hooks.ts Show resolved Hide resolved
MounirDhahri
MounirDhahri previously approved these changes Nov 12, 2024
Copy link
Member

@MounirDhahri MounirDhahri left a comment

Choose a reason for hiding this comment

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

thanks for addressing my comments. only one last comment left about getExperiment renaming.

@dariakoko dariakoko added the Squash On Green A label to indicate that Peril should squash-merge this PR when all statuses are green label Nov 12, 2024
@artsy-peril artsy-peril bot merged commit 7658d1e into main Nov 12, 2024
7 checks passed
@artsy-peril artsy-peril bot deleted the dariakoko/ONYX-1293/redesign-save-and-follow-cta branch November 12, 2024 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Jira Synced Squash On Green A label to indicate that Peril should squash-merge this PR when all statuses are green
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants