-
Notifications
You must be signed in to change notification settings - Fork 582
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
fix: fix progressive onboarding is not showing up #11404
base: main
Are you sure you want to change the base?
Conversation
@@ -339,7 +336,6 @@ const InfiniteScrollArtworksGrid: React.FC<Props & PrivateProps> = ({ | |||
const displayToolTip = | |||
enableMyCollectionSellOnboarding && | |||
isMyCollection && | |||
!isDismissed(PROGRESSIVE_ONBOARDING_MY_COLLECTION_SELL_THIS_WORK).status && |
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.
moving this into the MyCollectionArtworkGridItem.tsx to have all logic in one place
/** | ||
* using ToolTip instead of Popover here because we cannot display a Popover inside | ||
* of a modal (which is where this component is used) | ||
* */ |
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.
adding comments for clarity
// we only enable the alerts flow if the save artwork is completed | ||
isDismissed("save-highlight").status && | ||
isDismissed(PROGRESSIVE_ONBOARDING_SAVE_ARTWORK) && |
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.
replacing the strings here because save-highlight
is no longer in use and is removed in this PR
export const ArtworkListsQR = () => { | ||
useDismissSavedHighlight() | ||
|
||
return ( | ||
<Suspense fallback={<ArtworkListsPlaceHolder />}> | ||
<ArtworkLists /> | ||
</Suspense> | ||
) | ||
} | ||
|
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.
not used anywhere - removing
I am removing the isActive variable because for me it was always false because isActivePopover is always undefined. If you prefer to keep it, would love to hear your thoughts on how to make it work better 🙏 |
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.
Thanks for all the code cleaning! 🧹
Do you know the purpose of isActive
? Understanding would be great to avoid issues when we remove it.
@@ -54,7 +54,7 @@ describe("ProgressiveOnboardingSaveAlert", () => { | |||
__globalStoreTestUtils__?.injectState({ | |||
progressiveOnboarding: { | |||
sessionState: { isReady: true }, | |||
dismissed: [{ key: "save-highlight", timestamp: Date.now() }], | |||
dismissed: [{ key: "offer-settings", timestamp: Date.now() }], |
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.
👀
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.
save-highlight is no longer used, the previously dismissed popover has to be offer-settings
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.
or are you referring to the string used instead of the const?
|
||
const handleDismiss = () => { | ||
setIsReady(false) | ||
dismiss("alert-create") | ||
dismiss(PROGRESSIVE_ONBOARDING_ALERT_CREATE) |
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.
🙏
Sure @olerichter00, isActive is coming from useSetActivePopover.ts and is used to tell whether there is an active popover on the app. It was done to make sure we don't show 1+ popovers on the screen at the same time. Somehow for me |
Thanks for the explanation 🙏 If I would be okay with removing the check for the upcoming release to display tooltips again. But then we should definitely look into it more. |
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 legit 👍
@@ -19,16 +23,16 @@ export const ProgressiveOnboardingOfferSettings: React.FC = ({ children }) => { | |||
const isDisplayable = | |||
isArtworkListOfferabilityEnabled && | |||
isReady && | |||
!isDismissed("offer-settings").status && | |||
!!isDismissed("signal-interest").status && | |||
!isDismissed(PROGRESSIVE_ONBOARDING_OFFER_SETTINGS).status && |
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.
not sure about these changes since the template literal value is also auto-completed by IDEs, but I assume maybe the constants are clearer in some way?
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.
Hm, yeah, you're right, I guess it doesn't matter then. Will revert this change, a string is way more readable
@olerichter00 agree. I think for now the alternative solution would be making sure that popovers that can be displayed on the same screen are dismissed. We can do it manually. We have only one popover that can conflict with other - |
@dariakoko Ok, for now let's test manually to make sure that the case of more than one tooltip at the same time cannot happen. But I think we need to have a general mechanism in the onboarding to prevent it from happening in the future when we add more onboarding tooltips. |
This PR resolves []
Description
This PR fixes progressive onboarding. Some of the steps of the onboarding were not showing up blocking the onboarding flow and preventing future work with it.
Slack thread: https://artsy.slack.com/archives/C02BAQ5K7/p1736527757095689
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.