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

[WordAds]: Add sticky ad format settings #98444

Open
wants to merge 3 commits into
base: trunk
Choose a base branch
from

Conversation

Alameen688
Copy link
Contributor

Related to #

Proposed Changes

  • This PR includes ad settings to manage the sticky ad formats included in the IPW migration code.
    (IT'S TO BE USED WHEN WE ACTIVATE THE MIGRATED FORMAT, WE CAN'T MERGE NOW AFAIK)

Why are these changes being made?

  • To allow users to turn off the sidebar right an bottom sticky ads if they want it on their site.

Testing Instructions

calypso sticky settings
  • Go to Ad settings via Tools > Monetize > Ads > Settings
  • You should be able to see both Stick to the bottom of each page and Stick to the right side of each page options
  • Toggling on Stick to the bottom of each page should enable the sticky ad format on the bottom of the page (i.e., bottom sticky) and vice versa.
  • Visit your test site including ?wordads-logging=true to see the logs (but without the query string bottom_sticky=true).
  • Confirm the bottom sticky ad runs when the setting is enabled and vice versa.
  • Toggling on Stick to the right side of each page should enable sticky ad format on the right side of the page (i.e. sticky sidebar right) and vice versa.
  • Visit your test site using a theme that has space to support sticky sidebar ad (without the query string sidebar_sticky_right=true)
  • Confirm the sidebar sticky ad runs when the setting is enabled and vice versa.

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@matticbot
Copy link
Contributor

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

Sections (~93 bytes added 📈 [gzipped])

name  parsed_size           gzip_size
earn       +586 B  (+0.1%)      +93 B  (+0.0%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

Copy link
Contributor

@cphilleo cphilleo left a comment

Choose a reason for hiding this comment

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

I think this is why you're not seeing the settings saved correctly. They are part of the display_options object.

Comment on lines +74 to +75
wordads_bottom_sticky_enabled: settings.bottom_sticky_enabled,
wordads_sidebar_sticky_right_enabled: settings.sidebar_sticky_right_enabled,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
wordads_bottom_sticky_enabled: settings.bottom_sticky_enabled,
wordads_sidebar_sticky_right_enabled: settings.sidebar_sticky_right_enabled,
wordads_bottom_sticky_enabled: settings.display_options.bottom_sticky_enabled,
wordads_sidebar_sticky_right_enabled: settings.display_options.sidebar_sticky_right_enabled,

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.

3 participants