Skip to content

Conversation

@rishsanyal
Copy link

There's a small issue for first-time users where every page will show the Product Update Modal to the customer.

Playbooks currently depends on setting the last-login time cookie to know if this modal should be displayed or not. There's 2 issues with this:

New customers from the same browser won't get the chance to sign up for product updates
A first time customer will just face annoyances for the first time they interact with Playbooks' platform.
This PR fixes that by ensuring that on registering we focus on the new customer through setting the option in the redux store and clearing the last-login time cookie on re-registering

I've added 2 videos below. The first one shows the issue and the second validates the fix.

Issue:
https://github.com/user-attachments/assets/2f6c0db1-cc50-4bad-8b9c-fd38516a8887

Validated Fix:

modal_fix.mov

@rishsanyal
Copy link
Author

@droid-mohit @jayeshsadhwani99 Thank you for your patience and help. Created the new PR here.

Apologies for the confusion with the previous PR once again.

@rishsanyal rishsanyal changed the title Adding files to trigger modal as designed trigger product update modal Aug 14, 2024
@sidPhoenix17
Copy link
Contributor

@jayeshsadhwani99 can you please review this PR?

@dimittal
Copy link
Contributor

@rishsanyal Please update your branch from main branch. This was commented a while ago.
Also, please edit the PR to be raised against integration branch. That is where all changes go before it is merged into main.

@rishsanyal rishsanyal changed the base branch from main to integration August 20, 2024 17:15
@rishsanyal rishsanyal force-pushed the remove_updates_model_pr branch from d749b0c to 707ffc8 Compare August 21, 2024 17:41
Copy link
Contributor

@jayeshsadhwani99 jayeshsadhwani99 left a comment

Choose a reason for hiding this comment

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

The expected behaviour is:

  1. We click on Yes, the yes handler, or in your case the single handler works
  2. We click on No, similar behaviour
  3. When we click outside or click on the close button on the top right, It has the same behaviour as no.

In your case, yes and no work fine but when clicked outside the modal or clicked on cross, the same bug still arises.

There are 2 solutions I see:

  1. You can add the same event as in no and do it that way (simpler in this case)
  2. You can refresh the page whenever there is an event on this modal. Since everything is stored in localstorage should work without any problems since the state will be refreshed

You can do any of the above or if you have a better solution you can also do that

@rishsanyal
Copy link
Author

@jayeshsadhwani99 : Thank you for catching that. I've updated the code to register the event as the user not signing up for updates now.

Copy link
Contributor

@jayeshsadhwani99 jayeshsadhwani99 left a comment

Choose a reason for hiding this comment

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

The same issue occurs when the user clicks on the close icon, please change line 35 too

@jayeshsadhwani99 jayeshsadhwani99 self-requested a review August 27, 2024 09:20
@jayeshsadhwani99 jayeshsadhwani99 changed the base branch from integration to remove_updates_model_pr September 5, 2024 06:30
@jayeshsadhwani99 jayeshsadhwani99 merged commit 2941efa into DrDroidLab:remove_updates_model_pr Sep 5, 2024
@rishsanyal rishsanyal deleted the remove_updates_model_pr branch September 5, 2024 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants