-
Notifications
You must be signed in to change notification settings - Fork 982
Android: Add dismiss option to contextual onboarding #5866
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
Android: Add dismiss option to contextual onboarding #5866
Conversation
…longer needed. Removed the use of the skip button in the Privacy Pro CTA. Removed unused test related to removed pixel. Updated.
54048f1
to
73e8729
Compare
…ed to show the new tab when bubble dismissed.
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.
@anikiki this looks great! 💯 I’ve suggested a couple of changes, feel free to correct me if any of my assumptions are off:
- When the 'Fire dialog' is dismissed, the expected behavior is to simply close it without showing the 'End dialog'. I’ve pointed out the part of the logic that might need to be removed.
- The new pixel should ideally be triggered from the
CtaViewModel
, in line with how we handle other pixels. This helps keep the code consistent and clean.
fun onUserClickCtaDismissButton(cta: Cta) { | ||
viewModelScope.launch { | ||
onUserDismissedCta(cta) | ||
if (cta is DaxBubbleCta) { | ||
command.value = HideOnboardingDaxBubbleCta(cta) | ||
pixel.fire(ONBOARDING_DAX_CTA_DISMISS_BUTTON, mapOf(PixelParameter.CTA_SHOWN to cta.ctaPixelParam)) | ||
} else if (cta is OnboardingDaxDialogCta) { | ||
command.value = HideOnboardingDaxDialog(cta) | ||
pixel.fire(ONBOARDING_DAX_CTA_DISMISS_BUTTON, mapOf(PixelParameter.CTA_SHOWN to cta.ctaPixelParam)) | ||
if (cta is OnboardingDaxDialogCta.DaxFireButtonCta) { | ||
val updatedCta = ctaViewModel.getEndStaticDialogCta() | ||
ctaViewState.value = currentCtaViewState().copy(cta = updatedCta) | ||
} else if (cta is OnboardingDaxDialogCta.DaxTrackersBlockedCta) { | ||
ctaViewModel.dismissPulseAnimation() | ||
} |
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.
Pixel firing should be handled on the CtaViewModel
. I would follow the same pattern as we already have for shown
and ok
pixels.
val updatedCta = ctaViewModel.getEndStaticDialogCta() | ||
ctaViewState.value = currentCtaViewState().copy(cta = updatedCta) |
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.
This is no longer needed. The expected behavior when a user dismisses the fire dialog is simply to close it and not show the end dialog anymore.
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.
Good catch! Removed it 👍
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.
Ship it!! 🚀
Task/Issue URL: https://app.asana.com/0/488551667048375/1209734574040696/f
Description
Added a dismiss button to onboarding context and in-context Dax dialogs. The implementation includes:
ONBOARDING_DAX_CTA_DISMISS_BUTTON
to track dismissalsSteps to test this PR
Onboarding DAX Dialogs
cta
param and noatb
param) .UI changes (added a dismiss button, removed the skip buttons)