Skip to content

Admin Page: Ads Settings - Fix settings toggling#9136

Merged
dereksmart merged 2 commits intomasterfrom
fix/ads-settings
Mar 26, 2018
Merged

Admin Page: Ads Settings - Fix settings toggling#9136
dereksmart merged 2 commits intomasterfrom
fix/ads-settings

Conversation

@oskosk
Copy link
Copy Markdown
Contributor

@oskosk oskosk commented Mar 23, 2018

Fixes wrong state for the toggles perceived as soon as the Ads module is enabled. Feature states is left in the opposite of current expected state. So toggling a setting to off, ends up enabling the setting on the site.

Fixes 1568-gh-jpop-issues

Changes proposed in this Pull Request:

  • Removes unnecessary handling of internal state from the Ads component

Testing instructions:

  1. On a site with Professional Plan, check out this branch and build the admin page (Or use the Jetpack Beta Tester plugin to test this PR out)
  2. Reset ads settings to their defaults:
    wp jetpack module deactivate wordads
    wp option delete wordads_display_archive
    wp option delete wordads_display_post
    wp option delete wordads_display_front_page
    wp option delete wordads_display_page
  3. Go to Jetpack > Settings > Traffic > Ads
  4. Toggle on Enable ads and under Display an ad below each post, toggle off Front page and Pages (or any two options).
    • After getting the notification "Updated Settings" refresh the page
  5. Expect settings to be preserved
  6. Expect the Site to not show ads on Front page

Proposed changelog entry for your changes:

WordAds: Fixed settings for different type of location for Ads.

@oskosk oskosk added Bug When a feature is broken and / or not performing as intended [Status] Needs Review This PR is ready for review. Admin Page React-powered dashboard under the Jetpack menu [Feature] WordAds [Focus] FixTheFlows labels Mar 23, 2018
@oskosk oskosk requested a review from a team as a code owner March 23, 2018 16:28
@oskosk oskosk requested review from dereksmart and zinigor March 23, 2018 16:30
@oskosk oskosk added this to the 6.0 milestone Mar 23, 2018
@oskosk
Copy link
Copy Markdown
Contributor Author

oskosk commented Mar 23, 2018

@rclations Can I bother you with a review of this one ?

Copy link
Copy Markdown
Contributor

@rclachance rclachance left a comment

Choose a reason for hiding this comment

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

Awesome. Huge UI improvement for our users.
Thanks!

@jeherve jeherve added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review This PR is ready for review. labels Mar 26, 2018
@oskosk
Copy link
Copy Markdown
Contributor Author

oskosk commented Mar 26, 2018

Thanks @rclations !

@dereksmart dereksmart merged commit 08b020b into master Mar 26, 2018
@dereksmart dereksmart deleted the fix/ads-settings branch March 26, 2018 20:38
@ghost ghost removed the [Status] Ready to Merge Go ahead, you can push that green button! label Mar 26, 2018
dereksmart added a commit that referenced this pull request Mar 27, 2018
dereksmart pushed a commit that referenced this pull request Mar 27, 2018
* Changelog 6.0: create base for changelog.

* Add #8938 to changelog

* Add #8962 to changelog

* Add #8974 to changelog

* Add #8975 to changelog

* Add #8978 to changelog

* Add #8867 to changelog

* Add #8937 to changelog

* Add #8961 to changelog

* Add #8855 to changelog

* Add #8944 to changelog

* Add #8973 to changelog

* Add #8977 to changelog

* Add #8979 to changelog

* Add #8980 to changelog

* Add #8982 to changelog

* Add #8983 to changelog

* Add #8984 to changelog

* Add #8986 to changelog

* Add #9005 to changelog

* Add #9010 to changelog

* Add #9012 to changelog

* Add #9021 to changelog

* Add #9022 to changelog

* Add #9056 to changelog

* Add #9061 to changelog

* Add #9079 to changelog

* Add #9080 to changelog

* Add #9088 to changelog

* Add #9096 to changelog

* Add #9097 to changelog

* Add #9100 to changelog

* Add #9107 to changelog

* Add #8969 to changelog

* Add #8993 to changelog

* Add #9003 to changelog

* Add #9031 to changelog

* Add #8945 to changelog

* Add #9052 to changelog

* Add #9058 to changelog

* Add #9066 to changelog

* Add #9076 to changelog

* Add #9053 to changelog

* Add #9108 to changelog

* Add #9135 to changelog

* Add #9148 to changelog

* Add #9125 to changelog

* Add #9137 to changelog

* Added testing instructions for 6.0.

* Added IS testing instructions, huge props to @tiagonoronha.

* Added #8498 to changelog.

* Added #8954 to changelog.

* Added #8985 to changelog.

* add #9027

* add #9112 to changelog

* add #9136 to changelog

* add #9102 to changelog

* add #9093 to changelog

* add #9062 to changelog

* add #9172 to changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Admin Page React-powered dashboard under the Jetpack menu Bug When a feature is broken and / or not performing as intended [Feature] WordAds [Focus] FixTheFlows [Pri] High

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants