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

Ensure that the settings remain persistent between logging out of the account and logging in again. #66

Merged
merged 2 commits into from
Oct 10, 2024

Conversation

iamdharmesh
Copy link
Collaborator

@iamdharmesh iamdharmesh commented Oct 2, 2024

Description of the Change

As reported internally in Slack, when logging out of the Mailchimp account, the settings do not remain persistent between logging out and logging in again. Although we are not clearing the settings, the saved list ID is cleared upon logout (added in #54), which requires re-selection after login. Additionally, updating the list sets default values for the settings, overwriting the saved ones.

This PR resolves the issue by preventing the saved Mailchimp list ID from being cleared on logout. The list ID will only be cleared on login if it is not available under the account. Therefore, if we log in with a different user account, the ID will be cleared. otherwise, it will remain unchanged

How to test the Change

  1. Log in with Mailchimp and save the settings.
  2. Log out.
  3. Log in again with the same account and verify that all settings and the list remain selected as they were.
  4. Log out again.
  5. Log in with a different account and verify that the list in the Mailchimp settings is not selected.
  6. Verify that the signup form on the front end does not render until the list is selected and saved in the settings.

Changelog Entry

Fixed - Ensure that the settings remain persistent between logging out of the account and logging in again.

Credits

Props @jeffpaul @iamdharmesh

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@iamdharmesh iamdharmesh requested a review from dkotter October 2, 2024 06:13
@github-actions github-actions bot added this to the 1.7.0 milestone Oct 2, 2024
@github-actions github-actions bot added the needs:code-review This requires code review. label Oct 2, 2024
@qasumitbagthariya
Copy link
Collaborator

QA Update ✅


I have verified this PR in the fix/persist-list branch which has been fixed and is functioning as intended.

I tested the following on this branch:

  • Persistent setting on logout and login with the same account ✅
  • The form does not render until a list is selected and saved. ✅
Another_account.mov
Seting.persistent.mov

Testing Environment

  • WordPress: 6.6.2
  • Theme: Twenty Twenty-Four 1.2
  • PHP: 8.0.30
  • Web Server: Nginx 1.20.2
  • Browser: Chrome
  • OS: macOS Ventura 13.3
  • Branch: fix/persist-list

Steps to Test- As mentioned in the PR description.
Test Results - It is working as expected.
Functional Demo / Screencast -
Special Notes - Ready for code review (Woo)
Testing Document status:
Cases related to this Issue/PR are added to the Critical Flow Wiki pages:

  • Yes
  • Not Required/Applicable for this PR

@jeffpaul jeffpaul self-requested a review October 8, 2024 22:04
Copy link
Collaborator

@jeffpaul jeffpaul left a comment

Choose a reason for hiding this comment

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

Looks good to me in testing, ok to move to Regression Testing if you're 👍🏼 @dkotter

@qasumitbagthariya
Copy link
Collaborator

Regression / Smoke Test Report ✅

I have verified this PR in the smoke-test branch and it is working as expected.

Testing Environment

  • WordPress: 6.6.2
  • Theme: Twenty Twenty-Four 1.2
  • WooCommerce - 9.3.3
  • PHP: 8.0.30
  • Web Server: Nginx 1.20.2
  • Browser: Chrome
  • OS: macOS Ventura 13.3
  • Branch: smoke-testing

Next Step- Ready to Merge 🚀

@vikrampm1 vikrampm1 modified the milestones: 1.7.0, 1.6.1 Oct 10, 2024
@vikrampm1 vikrampm1 merged commit df5f5f8 into develop Oct 10, 2024
12 checks passed
@vikrampm1 vikrampm1 mentioned this pull request Oct 10, 2024
22 tasks
@dkotter dkotter deleted the fix/persist-list branch October 10, 2024 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs:code-review This requires code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants