Differential D287248
Bug 2022264 - IAB Ads Devtools toggle fix r=#home-newtab-reviewers Needs RevisionPublic Authored by Dre on Mar 11 2026, 10:42 PM. Tags Referenced Files
Details
Test Plan Prereqs — prefs to set (about:config)The ad-size and SPOC placement prefs are *written by the control*, so don't set
Build/launch: -> -> , Prefs the control writes (observe these, don't set them):
(All under the branch in about:config.)
Manual (devtools admin panel)Prereqs: then , launch with .
Diff Detail
Unit TestsBroken
Event TimelineDre planned changes to this revision.Mar 11 2026, 10:42 PM Dre created this revision. phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".Mar 11 2026, 10:44 PM phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)". phab-bot removed a project: secure-revision. Dre planned changes to this revision.Mar 11 2026, 11:01 PM Dre updated this revision to Diff 1222188. Dre requested review of this revision.Mar 11 2026, 11:08 PM Dre retitled this revision from WIP: Bug 2022264 - IAB Ads Devtools toggle fix r=#home-newtab-reviewers to Bug 2022264 - IAB Ads Devtools toggle fix r=#home-newtab-reviewers.Mar 11 2026, 11:08 PM Comment Actions SummaryIntentThe changes fix the IAB Ads DevTools toggle behavior in the Firefox New Tab page's Discovery Stream admin panel. The bug relates to the billboard and leaderboard ad size options, which should be mutually exclusive (only one can be active at a time), but the previous implementation using separate toggle switches allowed both to be enabled simultaneously. Additionally, toggling these options did not trigger a cache refresh, meaning changes wouldn't take effect immediately. SolutionThe solution replaces the two separate switches for billboard and leaderboard banner sizes with a single dropdown control that has three options: "Off", "Billboard", and "Leaderboard". This inherently enforces mutual exclusivity between the two banner sizes at the UI level. Key implementation details:
Automated review completed with no comments. Dre planned changes to this revision.Mar 17 2026, 5:34 PM Comment ActionsThere are PREFS used in here and with the new PrefsConstants file, I will update the prefs usage once that lands. Dre requested review of this revision.Mar 17 2026, 8:57 PM Dre marked an inline comment as done. Dre added inline comments.Mar 19 2026, 7:15 PM
Dre edited the test plan for this revision. (Show Details) ini accepted this revision.Mar 23 2026, 10:43 PM ini added a project: testing-approved. Comment Actionsr+! nice work This revision is now accepted and ready to land.Mar 23 2026, 10:43 PM Dre edited the summary of this revision. (Show Details) Dre edited the test plan for this revision. (Show Details) phab-bot added a subscriber: home-newtab-reviewers-rotation. Dre edited the summary of this revision. (Show Details) ini requested changes to this revision.Tue, Jun 16, 9:20 PM Comment ActionsSo it turns out the Leaderboard ad size is no longer supported, and per Amber's comment in Bug 2030401 we want to remove all code related to it. Was the intention of this patch to prevent the billboard and leaderboard from being enabled simultaneously? If so, we can just keep the old billboard toggle, and remove the leaderboard toggle. This revision now requires changes to proceed.Tue, Jun 16, 9:20 PM Comment Actions This revision makes changes to files both inside and in files outside of it. The New Tab page for Firefox Desktop supports train-hopping — a mechanism that allows New Tab code to be deployed to Beta and Release channels independently of the standard release train. Cross-layer changes can break train-hop compatibility, which may block New Tab deployments until fixes reach Release through normal channels. If your change modifies platform code that browser/extensions/newtab depends on (such as module URIs, DOM APIs, or Nimbus feature definitions), please check whether a compatibility shim is needed. Shims should be marked with a comment indicating the Firefox version that must reach Release before the shim can be removed. If your change is unrelated to the New Tab page's train-hop compatibility (for example, it only touches tests or documentation), you can possibly disregard this message - but if you are unsure whether your change affects train-hop compatibility, please ensure that someone from the home-newtab-reviewers-rotation review group has a chance to review before landing.
Revision Contents
Diff 1299175 browser/extensions/newtab/content-src/components/DiscoveryStreamAdmin/DiscoveryStreamAdmin.jsxLoading... browser/extensions/newtab/content-src/components/DiscoveryStreamAdmin/DiscoveryStreamAdmin.scssLoading... browser/extensions/newtab/test/unit/content-src/components/DiscoveryStreamAdmin.test.jsxLoading... | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
