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

Snapshot release v5 #481

Merged
merged 14 commits into from
Oct 26, 2020
Merged

Snapshot release v5 #481

merged 14 commits into from
Oct 26, 2020

Conversation

twifkak
Copy link
Member

@twifkak twifkak commented Oct 24, 2020

No description provided.

Googler and others added 14 commits August 13, 2020 16:52
Adds validator support for the two new `<link rel=preload>` attributes, and adds srcset URL rewriting for imagesrcset.

Fixes ampproject/amphtml#29302

PiperOrigin-RevId: 325359140
…ackager request.proto was missing ACTIONS. ACTIONS is now deprecated so adding in comment that 5 is reserved.

github.com/ampproject/amppackager/transformer/request/request.proto
github.com/ampproject/amphtml/validator/validator.proto

PiperOrigin-RevId: 326555470
The inline style attribute is one of the first things checked for URLs. And we unfortunately skipped all the rest of the URL rewriting when there is one.

This also exposed a bug with rewriting an image with `src=#`. We would generate a new srcset for the image, but the validator will not accept `# 123w` as a valid source in the srcset. Now, we just skip such srcs.

PiperOrigin-RevId: 326745297
We will now transform (with `data-hero` and size-inferred hero images):
- `<amp-img>` with src/srcset
- `<amp-video>` with `[poster]` or `<amp-img placeholder>` child
- `<amp-video-iframe>` with `[poster]` or `<amp-img placeholder>` child
- `<amp-iframe>` with `<amp-img placeholder>` child

Additionally, it leaves a few TODOs for better support:
- Support pixel density srcsets
- Support arbitrary `<link rel=preload>`

Fixes ampproject/amphtml#28954
Re: #461
PiperOrigin-RevId: 327496988
Match the changes in ampproject/amphtml#30252

PiperOrigin-RevId: 334206765
…n x was missing.

PiperOrigin-RevId: 334982571
97% (and growing) of Chrome browsers that support SXG also support loading=lazy. We still prioritize (via preload and loading=eager img) hero images. Requires transforming with Version 5.

Re: #465
PiperOrigin-RevId: 336760832
Also updates the `<link>` generation to use `imagesrcset` and `imagesizes`, which are both supported in Chrome 73+. We don't need to do anything fancy!

Re: #461
PiperOrigin-RevId: 337974534
Running `go test ./...` causes these changes.
PiperOrigin-RevId: 338732974
@twifkak twifkak requested review from Gregable and banaag October 24, 2020 00:10
@CLAassistant
Copy link

CLAassistant commented Oct 24, 2020

CLA assistant check
All committers have signed the CLA.

@twifkak
Copy link
Member Author

twifkak commented Oct 24, 2020

/cc @Gregable @MichaelRybak @ddlfg @honeybadgerdontcare Please (re-)sign the CLA. Thanks!

@honeybadgerdontcare
Copy link
Collaborator

done

go.mod Show resolved Hide resolved
@Gregable
Copy link
Member

release signed

@twifkak twifkak merged commit f1d819c into releases Oct 26, 2020
@twifkak
Copy link
Member Author

twifkak commented Oct 26, 2020

Thanks all!

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.

8 participants