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

Add validation rules for amp-fit-text:1.0 on websites #33464

Merged
merged 5 commits into from
Apr 22, 2021

Conversation

caroqliu
Copy link
Contributor

@caroqliu caroqliu commented Mar 24, 2021

Note: bento-fit-text experiment is still active, so this PR does not "launch" the component, only widens the pool for experimental usage and feedback to include valid AMP documents on the web.

Open question:

  • 1.0 allows binding to the existing min-font-size/max-font-size attributes with amp-bind. Is it possible to allow [min-font-size] and [max-font-size] for amp-fit-text exclusively on documents where 1.0 is used? cc / @ampproject/wg-caching

Partial for #28281. cc/ @nainar @dvoytenko

@amp-owners-bot
Copy link

amp-owners-bot bot commented Mar 24, 2021

Hey @ampproject/wg-caching! These files were changed:

extensions/amp-fit-text/1.0/test/validator-amp-fit-text.html
extensions/amp-fit-text/1.0/test/validator-amp-fit-text.out
extensions/amp-fit-text/validator-amp-fit-text.protoascii

Copy link
Contributor

@krdwan krdwan left a comment

Choose a reason for hiding this comment

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

Thanks for doing the first one for Bento.

LGTM!

Copy link
Member

@twifkak twifkak left a comment

Choose a reason for hiding this comment

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

Validator changes LGTM, thanks!

@caroqliu
Copy link
Contributor Author

caroqliu commented Mar 30, 2021

Validator changes LGTM, thanks!

Added a unique spec_name to each script definition in ae294e0, due to failure linked below, PTAL! This won't have any impact on existing amp-fit-text used in ads format, correct? @twifkak

https://app.circleci.com/pipelines/github/ampproject/amphtml/5466/workflows/312184da-0892-4f2b-afb5-7ee3810dad81/jobs/78502

@caroqliu caroqliu requested a review from twifkak March 30, 2021 19:37
Comment on lines 22 to 24
version: "0.1"
version: "1.0"
version: "latest"
Copy link
Member

Choose a reason for hiding this comment

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

This removes

    requires_usage: EXEMPTED
    deprecated_allow_duplicates: true

for the existing cases of 0.1 and latest on AMP (in websites). This could cause errors on existing pages. If we can split up the tag_specs, it should be by version: one tag spec for 1.0 with the new requirements, and one for 0.1 and latest keeping the old leniency.

Copy link
Contributor Author

@caroqliu caroqliu Apr 1, 2021

Choose a reason for hiding this comment

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

Why does this change remove those specifications? I don't see them previously here, are they default values that get modified somehow?

Edit: NVM, I see it wasn't diffed since it's lower down inside the ads block.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hey @twifkak, recently updated this PR to follow the guidance described in cl/366320502 and #33478, can you please (1) do one more code review pass of these changes, and (2) verify that this will not cause errors on existing pages?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ping @twifkak, PTAL

@caroqliu
Copy link
Contributor Author

caroqliu commented Apr 2, 2021

This PR should not be merged until this thread is resolved.

@caroqliu caroqliu changed the title Add validation rules for amp-fit-text:1.0 on websites Do not merge: Add validation rules for amp-fit-text:1.0 on websites Apr 2, 2021
@caroqliu caroqliu requested review from twifkak and krdwan April 13, 2021 18:48
@caroqliu caroqliu changed the title Do not merge: Add validation rules for amp-fit-text:1.0 on websites Add validation rules for amp-fit-text:1.0 on websites Apr 13, 2021
Copy link
Member

@twifkak twifkak left a comment

Choose a reason for hiding this comment

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

Sorry for the delay!

@caroqliu caroqliu merged commit 81f9ee5 into ampproject:main Apr 22, 2021
MichaelRybak added a commit to MichaelRybak/amphtml that referenced this pull request Apr 27, 2021
MichaelRybak added a commit that referenced this pull request Apr 27, 2021
* cl/369984001 Revision bump for #33464

* cl/370113162 Revision bump for #33611
rochapablo pushed a commit to rochapablo/amphtml that referenced this pull request Aug 30, 2021
* Allow websites format to import amp-fit-text:1.0

* Add validator test file for 1.0

* 2018 -> 2021

* Add unique spec_name for ad format

* Update amp-fit-text validations according to ampproject#33478
rochapablo pushed a commit to rochapablo/amphtml that referenced this pull request Aug 30, 2021
* cl/369984001 Revision bump for ampproject#33464

* cl/370113162 Revision bump for ampproject#33611
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.

None yet

6 participants