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

Form integration bug fixes and improvements #889

Merged
merged 3 commits into from
Oct 19, 2020

Conversation

fpcorso
Copy link
Contributor

@fpcorso fpcorso commented Oct 19, 2020

Description

Collection of commits relating to fixing the bugs in the form integration system

Related Issue

Issues: #886, #887, #706

Types of changes

  1. Switches the check within cookies for form integration to check the popup from the args argument instead of using the passed form.
  2. Creates three new methods within the abstract class for getting the popup ID, increasing conversion count, and for checking if we should process the submission.

This has been tested in the following browsers

  • Chrome
  • Firefox
  • Edge
  • Safari

Checklist:

  • My code has been tested in the latest version of WordPress.
  • My code does not have any warnings from ESLint.
  • My code does not have any warnings from StyleLint.
  • My code does not have any warnings from PHPCS.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • All new functions and classes have code documentation.

args.popup.length &&
args.popup.is($popup)) ||
!settings.only_in_popup
) {
Copy link
Contributor Author

@fpcorso fpcorso Oct 19, 2020

Choose a reason for hiding this comment

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

Fixed spaces to tabs so it shows the whole file changed. The only actual code changes is this conditional.

Copy link
Member

Choose a reason for hiding this comment

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

PHPStorm doesn't allow line by line staging which is ashame, but VSCode does which is nice, you can highlight the changed lines, stage them, commit, then stage the rest of the file for a second commit.

…mine if we should process the submission

Since we repeat the same code for getting the popup ID and for increasing the conversion in all integrations, we should also move that here in case we need to change how that works in the future.

Issue #887
@fpcorso fpcorso changed the title Form integration bug fixes and improvements [WIP] Form integration bug fixes and improvements Oct 19, 2020
@fpcorso fpcorso requested a review from danieliser October 19, 2020 16:51
Copy link
Member

@danieliser danieliser left a comment

Choose a reason for hiding this comment

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

Like the massive deduplication of code. Looks good!

@fpcorso fpcorso merged commit 06a6935 into develop Oct 19, 2020
@fpcorso fpcorso deleted the feature/form-integrations-improvements branch October 19, 2020 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants