static-layout: extract getEffectiveLayout and revert amp-layout buildDom extraction#35148
Merged
samouri merged 10 commits intoampproject:mainfrom Jul 13, 2021
Merged
static-layout: extract getEffectiveLayout and revert amp-layout buildDom extraction#35148samouri merged 10 commits intoampproject:mainfrom
samouri merged 10 commits intoampproject:mainfrom
Conversation
a8958d2 to
9ec2de0
Compare
c887a51 to
7da51a8
Compare
7da51a8 to
ad2586b
Compare
rcebulko
reviewed
Jul 12, 2021
src/static-layout.js
Outdated
| // If the layout was already done by server-side rendering (SSR), then the | ||
| // code below will not run. Any changes below will necessitate a change to SSR | ||
| // and must be coordinated with caches that implement SSR. See bit.ly/amp-ssr. | ||
| const {height, layout, width} = getEffectiveLayout(element); |
Contributor
There was a problem hiding this comment.
Does any of this code change as it is moved?
Member
Author
There was a problem hiding this comment.
The only change was that I return the these three values instead of them all being defined inline...I wonder if I can improve diff output.
rcebulko
reviewed
Jul 13, 2021
Co-authored-by: Ryan Cebulko <ryan@cebulko.com>
rcebulko
reviewed
Jul 13, 2021
| } | ||
|
|
||
| /** | ||
| * |
Contributor
There was a problem hiding this comment.
Suggested change
| * | |
| * Some explanation of how `buildDom` is different from most functions and a link to a more detailed doc/readme on how it's consumed and what its restrictions are |
Member
Author
There was a problem hiding this comment.
Planned as a followup! This is intended as a small-as-possible revert of a revert
rcebulko
approved these changes
Jul 13, 2021
jridgewell
reviewed
Jul 13, 2021
jridgewell
approved these changes
Jul 13, 2021
c4dcecb to
1ecd5ee
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
summary
Commits in order:
getEffectiveLayoutfrom applyStaticStyles so that layout calc can be done in isolation.getEffectiveLayoutwithinamp-layout's buildDom instead of parseLayoutTesting done
<amp-layout>content #35154)