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

Clean ad-loader-v1 ad-loader-v2 flag #10656

Merged
merged 1 commit into from Jul 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 1 addition & 5 deletions css/amp.css
Expand Up @@ -403,12 +403,8 @@ i-amphtml-scroll-container.amp-active, i-amp-scroll-container.amp-active {
position: absolute;
width: 100%;
height: 100% !important;
background-color: rgba(0, 0, 0, 0.5);
z-index: 2;
}

.i-amphtml-loader-moving-line[experiment] {
background-color: rgba(151, 151, 151, 0.65);
z-index: 2;
}

@keyframes i-amphtml-loader-line-moving {
Expand Down
8 changes: 1 addition & 7 deletions extensions/amp-ad/0.1/amp-ad-ui.js
Expand Up @@ -15,7 +15,6 @@
*/

import {getAdContainer} from '../../../src/ad-helper';
import {isExperimentOn} from '../../../src/experiments';

export class AmpAdUIHandler {

Expand Down Expand Up @@ -89,12 +88,7 @@ export class AmpAdUIHandler {

const content = this.doc_.createElement('div');
content.classList.add('i-amphtml-ad-default-holder');
if (isExperimentOn(this.baseInstance_.win, 'ad-loader-v1')) {
content.setAttribute('experiment1', '');
}
if (isExperimentOn(this.baseInstance_.win, 'ad-loader-v2')) {
content.setAttribute('experiment2', '');
}

// TODO(aghassemi, #4146) i18n
content.setAttribute('data-ad-holder-text', 'Ad');
uiComponent.appendChild(content);
Expand Down
24 changes: 4 additions & 20 deletions extensions/amp-ad/0.1/amp-ad.css
Expand Up @@ -34,36 +34,20 @@ amp-embed iframe {
display: flex;
align-items: center;
justify-content: center;
background-color: rgba(200, 200, 200, 0.5);
}

.i-amphtml-ad-default-holder[experiment1] {
background-color: rgba(0, 0, 0, 0.01);
}

.i-amphtml-ad-default-holder[experiment2] {
background-color: rgba(200, 200, 200, 0.05);
}

.i-amphtml-ad-default-holder:after {
content: "Ad";
content: attr(data-ad-holder-text);
background-color: rgba(0, 0, 0, 0.5);
background-color: transparent;
border-radius: 2px;
color: #fff;
font-size: 16px;
color: #696969;
font-size: 10px;
line-height: 1;
font-family: Arial, sans-serif;
padding: 2px 4px;
}

.i-amphtml-ad-default-holder[experiment1]:after,
.i-amphtml-ad-default-holder[experiment2]:after {
font-size: 10px;
color: #696969;
background-color: transparent;
border: 1px, solid, #696969;
padding: 3px 4px 1px;
border: 1px, solid, #696969;
}

amp-ad[data-a4a-upgrade-type="amp-ad-network-doubleclick-impl"] > iframe,
Expand Down
8 changes: 0 additions & 8 deletions src/loader.js
Expand Up @@ -14,8 +14,6 @@
* limitations under the License.
*/

import {isExperimentOn} from './experiments';

/** @private @const */
const LINE_LOADER_ELEMENTS = {
'AMP-AD': true,
Expand All @@ -34,12 +32,6 @@ export function createLoaderElement(doc, elementName) {
loader.classList.add('i-amphtml-loader-line');
const line = doc.createElement('div');
line.classList.add('i-amphtml-loader-moving-line');
// Experiment with new loader design
const win = doc.defaultView;
if (isExperimentOn(win, 'ad-loader-v1')
|| isExperimentOn(win, 'ad-loader-v2')) {
line.setAttribute('experiment', '');
};
loader.appendChild(line);
} else {
loader.classList.add('i-amphtml-loader');
Expand Down
10 changes: 0 additions & 10 deletions tools/experiments/experiments.js
Expand Up @@ -240,16 +240,6 @@ const EXPERIMENTS = [
id: 'as-use-attr-for-format',
name: 'Use slot width/height attribute for AdSense size format',
},
{
id: 'ad-loader-v1',
name: 'New ad loader version 1',
cleanupIssue: 'https://github.com/ampproject/amphtml/issues/8261',
},
{
id: 'ad-loader-v2',
name: 'New ad loader version 2',
cleanupIssue: 'https://github.com/ampproject/amphtml/issues/8261',
},
{
id: 'amp-form-verifiers',
name: 'Asynchronous form verifiers',
Expand Down