diff --git a/extensions/amp-story/1.0/amp-story-scroll.css b/extensions/amp-story/1.0/amp-story-scroll.css deleted file mode 100644 index 969da90a44147..0000000000000 --- a/extensions/amp-story/1.0/amp-story-scroll.css +++ /dev/null @@ -1,28 +0,0 @@ -/** - * Copyright 2018 The AMP HTML Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS-IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -amp-story[scroll] { - overflow-y: auto !important; -} - -[scroll] amp-story-page { - position: relative !important; - height: 100vh !important; -} - -[scroll] amp-story-page[distance] { - transform: none !important; -} diff --git a/extensions/amp-story/1.0/amp-story-store-service.js b/extensions/amp-story/1.0/amp-story-store-service.js index fc1bc114762f0..7053809c3fe40 100644 --- a/extensions/amp-story/1.0/amp-story-store-service.js +++ b/extensions/amp-story/1.0/amp-story-store-service.js @@ -52,7 +52,6 @@ export const getStoreService = win => { export const UIType = { MOBILE: 0, DESKTOP: 1, - SCROLL: 2, }; diff --git a/extensions/amp-story/1.0/amp-story-system-layer.js b/extensions/amp-story/1.0/amp-story-system-layer.js index 53cc13c0473d7..30b3ff8aa316d 100644 --- a/extensions/amp-story/1.0/amp-story-system-layer.js +++ b/extensions/amp-story/1.0/amp-story-system-layer.js @@ -521,7 +521,7 @@ export class SystemLayer { * @private */ onUIStateUpdate_(uiState) { - if ([UIType.SCROLL, UIType.DESKTOP].includes(uiState)) { + if (uiState === UIType.DESKTOP) { this.buildSharePill_(); } diff --git a/extensions/amp-story/1.0/amp-story.css b/extensions/amp-story/1.0/amp-story.css index e3e0ff325b8c8..3e5b2e20ca2b9 100644 --- a/extensions/amp-story/1.0/amp-story.css +++ b/extensions/amp-story/1.0/amp-story.css @@ -15,7 +15,6 @@ */ @import './amp-story-access.css'; -@import './amp-story-scroll.css'; @import './amp-story-desktop.css'; @import './amp-story-user-overridable.css'; diff --git a/extensions/amp-story/1.0/amp-story.js b/extensions/amp-story/1.0/amp-story.js index 6eb95ab45aa2b..a05802871ff7e 100644 --- a/extensions/amp-story/1.0/amp-story.js +++ b/extensions/amp-story/1.0/amp-story.js @@ -351,10 +351,7 @@ export class AmpStory extends AMP.BaseElement { this.initializeListenersForDev_(); if (this.isDesktop_()) { - const uiState = - isExperimentOn(this.win, 'amp-story-scroll') ? - UIType.SCROLL : UIType.DESKTOP; - this.storeService_.dispatch(Action.TOGGLE_UI, uiState); + this.storeService_.dispatch(Action.TOGGLE_UI, UIType.DESKTOP); } this.navigationState_.observe(stateChangeEvent => { @@ -1259,12 +1256,7 @@ export class AmpStory extends AMP.BaseElement { onResize() { this.updateViewportSizeStyles_(); - let uiState = UIType.MOBILE; - - if (this.isDesktop_()) { - uiState = isExperimentOn(this.win, 'amp-story-scroll') ? - UIType.SCROLL : UIType.DESKTOP; - } + const uiState = this.isDesktop_() ? UIType.DESKTOP : UIType.MOBILE; this.storeService_.dispatch(Action.TOGGLE_UI, uiState); @@ -1315,16 +1307,14 @@ export class AmpStory extends AMP.BaseElement { * @private */ onUIStateUpdate_(uiState) { - this.vsync_.mutate(() => { - this.element.removeAttribute('desktop'); - this.element.removeAttribute('scroll'); - }); - switch (uiState) { case UIType.MOBILE: // Preloads and prerenders the share menu as the share button gets // visible on the mobile UI. No-op if already built. this.shareMenu_.build(); + this.vsync_.mutate(() => { + this.element.removeAttribute('desktop'); + }); break; case UIType.DESKTOP: this.setDesktopPositionAttributes_(this.activePage_); @@ -1339,11 +1329,6 @@ export class AmpStory extends AMP.BaseElement { this.updateBackground_(this.activePage_.element, /* initial */ true); } break; - case UIType.SCROLL: - this.vsync_.mutate(() => { - this.element.setAttribute('scroll', ''); - }); - break; } } diff --git a/tools/experiments/experiments.js b/tools/experiments/experiments.js index bcccf973f03ce..ebd8cd971110b 100644 --- a/tools/experiments/experiments.js +++ b/tools/experiments/experiments.js @@ -248,12 +248,6 @@ const EXPERIMENTS = [ spec: 'https://github.com/ampproject/amphtml/issues/15955', cleanupIssue: 'https://github.com/ampproject/amphtml/issues/15960', }, - { - id: 'amp-story-scroll', - name: 'Scrollable experience for amp-story', - spec: 'https://github.com/ampproject/amphtml/issues/16465', - cleanupIssue: 'https://github.com/ampproject/amphtml/issues/16466', - }, { id: 'amp-story-hold-to-pause', name: 'Hold to pause an amp-story',