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

Promos Adjustments #251

Merged
merged 12 commits into from
Aug 9, 2024
Merged

Promos Adjustments #251

merged 12 commits into from
Aug 9, 2024

Conversation

abaicus
Copy link
Contributor

@abaicus abaicus commented Aug 5, 2024

Changes summary:

  • Simplifies the CF7 Redirection plugin notice;
  • Decouples promotion delay so we can enable it individually per promo;
  • Removes the Neve FSE promo and replaces it with a Neve promo;
  • Removes the delay for Sparks & PPOM notices;
  • Reworks the Optimole promos stacked layout;
  • Removes the email registration flow from the Optimole promos;
  • Changes how the Optimole promos are displayed according to what was stated here: https://github.com/Codeinwp/themeisle/issues/1656#issuecomment-2264977637;

Testing instructions:

Tip

You can use the debug filter to show all the notices available in the SDK. Just add the filter below to a mu-plugin, or use the QA plugin built in the comment to this PR.
add_filter( 'themeisle_sdk_promo_debug', '__return_true' );

CF7 Redirection notice:

  • Be sure that you're enabling debug using the filter so the promo shows up;
  • Install Contact Form 7;
  • Go to its' main admin page;
  • The notice should be visible & work just like before;

Neve Notice:

  • Go to the themes.php admin page;
  • The new Neve notice should have replaced the Neve FSE notice;
  • The notice should work as expected and show up without any delay;
  • If the theme is active, it should not show up;
  • If the theme is installed but not active, it should prompt for activation;
  • If the theme is not installed, it should prompt for installation and activation;
  • If the theme has been installed and activated via the promo, it should not show up;

PPOM & Sparks notices:

  • Install WooCommerce and create a product;
  • In the product edit admin page, the Sparks & PPOM promos should show up without needing any additional steps taken;

Optimole notices:


Closes Codeinwp/themeisle#1654
Closes Codeinwp/themeisle#1655
Closes Codeinwp/themeisle#1656

@abaicus abaicus changed the base branch from master to development August 5, 2024 07:46
@abaicus abaicus marked this pull request as ready for review August 5, 2024 11:12
Copy link

github-actions bot commented Aug 5, 2024

Plugin build for c13ebf0 is ready 🛎️!

Copy link
Collaborator

@carlalexander carlalexander left a comment

Choose a reason for hiding this comment

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

Ok, I've done a first pass just looking at the code. There are a few logic things, but mainly I want to promote the use of the ternary operator as much as possible. We can discuss how that might look like with large HTML blocks to make it readable.

There are a lot of commits in this PR. If you want to start looking at merging the chore commits to their respective commits. That would be good. Otherwise, we can leave that for the end.

assets/js/src/OptimoleNotice/index.js Outdated Show resolved Hide resolved
assets/js/src/OptimoleNotice/index.js Show resolved Hide resolved
assets/js/src/RedirectionForCF7/index.js Show resolved Hide resolved
assets/js/src/common/utils.js Outdated Show resolved Hide resolved
src/Modules/Promotions.php Outdated Show resolved Hide resolved
src/Modules/Promotions.php Outdated Show resolved Hide resolved
src/Modules/Promotions.php Outdated Show resolved Hide resolved
src/Modules/Promotions.php Outdated Show resolved Hide resolved
@abaicus
Copy link
Contributor Author

abaicus commented Aug 6, 2024

@carlalexander I've addressed the issues you pointed out. Let me know if you think there are more things that could be improved. Thank you!

@carlalexander
Copy link
Collaborator

@abaicus This all looks great. Thank you!

Next, we should try to merge some of the commits together and clean up the commit history as I mentioned:

There are a lot of commits in this PR. If you want to start looking at merging the chore commits to their respective commits. That would be good. Otherwise, we can leave that for the end.

@abaicus abaicus force-pushed the fix/promos branch 2 times, most recently from db574a0 to 0771374 Compare August 7, 2024 12:29
@abaicus
Copy link
Contributor Author

abaicus commented Aug 7, 2024

@carlalexander It should be fine now. Some commits were mislabeled as chore instead of fix. Let me know if there's anything else left here! Thank you!

@carlalexander carlalexander self-requested a review August 7, 2024 14:16
Copy link
Collaborator

@carlalexander carlalexander left a comment

Choose a reason for hiding this comment

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

This looks a lot better! I'd rather we didn't have a commit for the code review changes, but this PR is too big.

Another thing I noticed is that all the fix commits didn't have any tests. Not sure if there's a large test suite in the SDK. But something I'll look at more next time.

Great work!! 🙌

@abaicus abaicus merged commit aa2dcda into development Aug 9, 2024
4 checks passed
@abaicus abaicus deleted the fix/promos branch August 9, 2024 07:23
@pirate-bot
Copy link
Contributor

🎉 This PR is included in version 3.3.28 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@pirate-bot pirate-bot added the released Indicate that an issue has been resolved and released in a particular version of the product. label Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Indicate that an issue has been resolved and released in a particular version of the product.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants