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

Auto add layout=responsive if missing #1115

Merged
merged 2 commits into from
Dec 16, 2020
Merged

Auto add layout=responsive if missing #1115

merged 2 commits into from
Dec 16, 2020

Conversation

sebastianbenz
Copy link
Collaborator

Fixes #959

// Transformed AMP validation requires layout attribute to be set
// See https://github.com/ampproject/amp-toolbox/issues/959
if (layout && layout === 'responsive') {
console.log('XXX setting custom layout ', layout);
Copy link
Collaborator

Choose a reason for hiding this comment

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

why console.log vs the log util?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

removed

@patrickkettner
Copy link
Collaborator

LGTM

wondering why responsive is the assumed default, and if there is a chance that having a different configurable default would make sense?

@sebastianbenz
Copy link
Collaborator Author

responsive is not the default. It's only that the validator does not auto infer the responsive layout as the server-side-rendering does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AMP Optimizer: Elements with the heights or sizes attributes produces invalid AMP when no layout is present.
2 participants