-
Notifications
You must be signed in to change notification settings - Fork 383
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
Update amphtml spec to dc6cd22a52 #6530
Conversation
array( | ||
'attr_spec_list' => array( | ||
'data-href' => array( | ||
'mandatory' => true, | ||
), | ||
'media' => array(), | ||
'noloading' => array( | ||
'value' => array( | ||
'', | ||
), | ||
), | ||
), | ||
'tag_spec' => array( | ||
'amp_layout' => array( | ||
'supported_layouts' => array( | ||
6, | ||
2, | ||
3, | ||
7, | ||
1, | ||
4, | ||
), | ||
), | ||
'requires_extension' => array( | ||
'amp-facebook', | ||
), | ||
'spec_name' => 'amp-facebook-comments 1.0', | ||
), | ||
), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is problematic for our existing auto-extension importing logic, since the two versions look the same but one requires amp-facebook-comments
and the other requires amp-facebook
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to add a new bento
boolean flag to each tag_spec
that requires_extension
so we can easily differentiate between Bento and non-Bento specs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or rather, requires_extension
should be a mapping from component to the version(s). In this way, we could supply to components and versions that we are wanting and it can automatically omit tag specs that don't have a matching version.
Plugin builds for 69b99b0 are ready 🛎️!
|
0688b00
to
6e282a3
Compare
6e282a3
to
7406336
Compare
if ( | ||
isset( $rule_spec['tag_spec']['bento'] ) | ||
&& | ||
$this->args['prefer_bento'] !== $rule_spec['tag_spec']['bento'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this is temporary, but just a note that this will load the bento and non-bento versions once the prefer_bento
argument is true
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will it? How so?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When prefer_bento
is true
, then it will exclude the Bento versions because where bento => false
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah OK I missed the bento => false
, this is good then 👍.
Co-authored-by: Pierre Gordon <16200219+pierlon@users.noreply.github.com>
Co-authored-by: Pierre Gordon <pierregordon@protonmail.com>
…-2.1 [2.1] Update amphtml spec to dc6cd22a52 (#6530)
Previously #6436.
./bin/amphtml-update.sh
(lando ssh -c 'bash ./bin/amphtml-update.sh vendor/amphtml'
).Changelog
loop
as boolean attribute onamp-base-carousel
,amp-inline-gallery-thumbnails
, andamp-stream-gallery
. See Validation ofloop
attribute swissspidy/gutenberg-bento#1 and Cannot use loop as boolean attribute for amp-base-carousel amphtml#35555.amp-brightcove
(v1.0) as Bento component.amp-facebook
(v1.0) as Bento component (includingamp-facebook-comments
,amp-facebook-like
, andamp-facebook-page
). This required some hoops to go through since there are Bento-specific tag specs which are identical to the non-Bento tag specs except that the Bento version requiresamp-facebook
(1.0) and the non-Bento versions require their own respective non-Bento scripts. I'm not super happy with the changes toamphtml-update.py
but they'll hold us over for now, given that we'll be replacing the plugin's entire spec generation with the spec fromamp-toolbox-php
(see Consumebundles.config.extensions.json
to amendTagWithExtensionSpec
classes with extension version meta amp-toolbox-php#297). See also Bento: Validate Facebook components amphtml#35395 (comment).amp-render
inamp-story
.data-amp-autocomplete-opt-in
validator hack.Details