Skip to content

amp-story-desktop-one-panel Position distance="2" page below viewport#34834

Merged
processprocess merged 2 commits intoampproject:mainfrom
processprocess:distance-2
Jun 15, 2021
Merged

amp-story-desktop-one-panel Position distance="2" page below viewport#34834
processprocess merged 2 commits intoampproject:mainfrom
processprocess:distance-2

Conversation

@processprocess
Copy link
Copy Markdown
Contributor

@processprocess processprocess commented Jun 11, 2021

Context / Fixes #34830

Positions distance="2" page below viewport when amp-story-desktop-one-panel is active.

100vh will ensure the panel will always be off of the viewport.

@processprocess processprocess requested a review from gmajoulet June 11, 2021 15:15
@amp-owners-bot
Copy link
Copy Markdown

Hey @gmajoulet, @newmuis! These files were changed:

extensions/amp-story/1.0/amp-story.css

transform: translateY(100%) !important;
}

.i-amphtml-story-desktop-one-panel amp-story-page[distance="2"] {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Plz move to the one-panel CSS file

}

.i-amphtml-story-desktop-one-panel amp-story-page[distance="2"] {
transform: translateY(100vh) !important;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm wondering if we could just change it to 100vh all the time.
The historical context behind the 100% is that it's hard to trust VH because of browser expanded/minified UIs on user scroll. 100vh is not always 100%.

If you know the answer to this question (always using 100vh) and feel confident about it, plz do it. If not sure, let's keep it this way and simply move the override to the onepanel CSS file.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

AFAIK it should be fine, since 100vh >= 100%, so it should still be off-screen.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

AFAIK it should be fine, since 100vh >= 100%, so it should still be off-screen.

Agreed that in this case we can use 100vh since it will always be off screen. Lets go that route.

@processprocess processprocess merged commit bafe128 into ampproject:main Jun 15, 2021
@processprocess processprocess deleted the distance-2 branch June 15, 2021 12:23
westonruter added a commit to westonruter/amphtml that referenced this pull request Jun 16, 2021
…ebook-like-bento-version

* 'main' of github.com:ampproject/amphtml: (23 commits)
  `amp-story-desktop-one-panel` Update demo with usecases (ampproject#34867)
  🚮 Remove src/purifier.js rollup config (ampproject#34876)
  Validator Rollup (ampproject#34769)
  ✨ `amp-story-desktop-one-panel` Check UI type to get page dimension on tap (ampproject#34875)
  Refactor: move getRealChildNodes and getRealChildren to core (ampproject#34813)
  🏗📖 Fix some example files that do not validate (ampproject#34835)
  🏗Add `#test` and `#testing` to alias list (ampproject#34853)
  Add css files for missing components (ampproject#34861)
  Apply bulk transform to html tags (ampproject#34836)
  🐛 amp-ima-video: Fix duration label on livestreams (ampproject#34865)
  ♻️  Extract `applyFillContent` into a standalone function (ampproject#34858)
  Give script tag closing tag (ampproject#34832)
  🏗 Refinements to renovate config (ampproject#34862)
  Bento: Enable `SocialShare` for npm publishing (ampproject#34817)
  🏗 Use aliased paths in generated extensions (ampproject#34860)
  ✨ `amp-story-desktop-one-panel` Position distance="2" page below viewport (ampproject#34834)
  🏗 Set `wrapper` on generated Bento extensions (ampproject#34843)
  🧪[story-ads] Allow viewer to set progress bar segment experiment. (ampproject#34827)
  🏗 Allow extension bundles to specify their own wrapper (ampproject#34845)
  🏗🚀 Speed up validated example grouping ~45x (ampproject#34837)
  ...
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.

amp-story-desktop-one-panel resolve non-active page position on load

3 participants