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

✨Do not require amp-autocomplete to be a child of a form #23800

Merged
merged 2 commits into from Aug 8, 2019
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Prev

Fix inaccurate comment

  • Loading branch information...
cvializ committed Aug 8, 2019
commit 434a5bcd9823922a75667eede6e3b0154b7d7fb9
@@ -32,18 +32,18 @@
<script async src="https://cdn.ampproject.org/v0.js"></script>
</head>
<body>
<!-- Valid: input and script tags as direct child to FORM -->
<!-- Valid: input and script tags -->
<amp-autocomplete>
<input>
<script type="application/json"> {} </script>
</amp-autocomplete>

<!-- Valid: input and src attr as direct child to FORM -->
<!-- Valid: input and src attr -->
<amp-autocomplete src="https://data.com/articles.json?ref=CANONICAL_URL">
<input>
</amp-autocomplete>

<!-- Valid: input and [src] attr as direct child to FORM -->
<!-- Valid: input and [src] attr -->
<amp-autocomplete [src]="foo.bar">
<input>
</amp-autocomplete>
@@ -65,29 +65,6 @@
<input>
</amp-autocomplete>

<!-- Valid: deeply nested with FORM still as ancestor -->
<div>
<div>
<div>
<amp-autocomplete>
<input>
<script type="application/json"> {} </script>
</amp-autocomplete>
</div>
</div>
</div>

<!-- Valid: deeply nested with remote data and FORM still as ancestor -->
<div>
<div>
<div>
<amp-autocomplete src="https://data.com/articles.json?ref=CANONICAL_URL">
<input>
</amp-autocomplete>
</div>
</div>
</div>

<!-- Valid: amp-component with static data and filter=prefix attribute -->
<amp-autocomplete filter="prefix">
<input>
@@ -33,18 +33,18 @@ FAIL
| <script async src="https://cdn.ampproject.org/v0.js"></script>
| </head>
| <body>
| <!-- Valid: input and script tags as direct child to FORM -->
| <!-- Valid: input and script tags -->
| <amp-autocomplete>
| <input>
| <script type="application/json"> {} </script>
| </amp-autocomplete>
|
| <!-- Valid: input and src attr as direct child to FORM -->
| <!-- Valid: input and src attr -->
| <amp-autocomplete src="https://data.com/articles.json?ref=CANONICAL_URL">
| <input>
| </amp-autocomplete>
|
| <!-- Valid: input and [src] attr as direct child to FORM -->
| <!-- Valid: input and [src] attr -->
| <amp-autocomplete [src]="foo.bar">
| <input>
| </amp-autocomplete>
@@ -66,29 +66,6 @@ FAIL
| <input>
| </amp-autocomplete>
|
| <!-- Valid: deeply nested with FORM still as ancestor -->
| <div>
| <div>
| <div>
| <amp-autocomplete>
| <input>
| <script type="application/json"> {} </script>
| </amp-autocomplete>
| </div>
| </div>
| </div>
|
| <!-- Valid: deeply nested with remote data and FORM still as ancestor -->
| <div>
| <div>
| <div>
| <amp-autocomplete src="https://data.com/articles.json?ref=CANONICAL_URL">
| <input>
| </amp-autocomplete>
| </div>
| </div>
| </div>
|
| <!-- Valid: amp-component with static data and filter=prefix attribute -->
| <amp-autocomplete filter="prefix">
| <input>
@@ -295,64 +272,64 @@ FAIL
| <!-- Invalid: width is mistyped -->
| <amp-autocomplete widht=100>
>> ^~~~~~~~~
amp-autocomplete/0.1/test/validator-amp-autocomplete.html:295:2 The attribute 'widht' may not appear in tag 'amp-autocomplete'. (see https://amp.dev/documentation/components/amp-autocomplete) [DISALLOWED_HTML]
amp-autocomplete/0.1/test/validator-amp-autocomplete.html:272:2 The attribute 'widht' may not appear in tag 'amp-autocomplete'. (see https://amp.dev/documentation/components/amp-autocomplete) [DISALLOWED_HTML]
| <input>
| <script type="application/json"> {} </script>
| </amp-autocomplete>
|
| <!-- Invalid: responsive layout is not supported -->
| <amp-autocomplete layout="responsive">
>> ^~~~~~~~~
amp-autocomplete/0.1/test/validator-amp-autocomplete.html:301:2 The specified layout 'RESPONSIVE' is not supported by tag 'amp-autocomplete'. (see https://amp.dev/documentation/components/amp-autocomplete) [AMP_LAYOUT_PROBLEM]
amp-autocomplete/0.1/test/validator-amp-autocomplete.html:278:2 The specified layout 'RESPONSIVE' is not supported by tag 'amp-autocomplete'. (see https://amp.dev/documentation/components/amp-autocomplete) [AMP_LAYOUT_PROBLEM]
| <input>
| <script type="application/json"> {} </script>
| </amp-autocomplete>
|
| <!-- Invalid: amp-autocomplete with invalid input types -->
| <amp-autocomplete widht=100>
>> ^~~~~~~~~
amp-autocomplete/0.1/test/validator-amp-autocomplete.html:307:2 The attribute 'widht' may not appear in tag 'amp-autocomplete'. (see https://amp.dev/documentation/components/amp-autocomplete) [DISALLOWED_HTML]
amp-autocomplete/0.1/test/validator-amp-autocomplete.html:284:2 The attribute 'widht' may not appear in tag 'amp-autocomplete'. (see https://amp.dev/documentation/components/amp-autocomplete) [DISALLOWED_HTML]
| <input type="button">
>> ^~~~~~~~~
amp-autocomplete/0.1/test/validator-amp-autocomplete.html:308:4 The attribute 'type' in tag 'input' is set to the invalid value 'button'. (see https://amp.dev/documentation/components/amp-form) [DISALLOWED_HTML]
amp-autocomplete/0.1/test/validator-amp-autocomplete.html:285:4 The attribute 'type' in tag 'input' is set to the invalid value 'button'. (see https://amp.dev/documentation/components/amp-form) [DISALLOWED_HTML]
| <script type="application/json"> {} </script>
| </amp-autocomplete>
|
| <!-- Invalid: amp-autocomplete with filter=custom and no filter-expr attribute -->
| <amp-autocomplete filter="custom">
>> ^~~~~~~~~
amp-autocomplete/0.1/test/validator-amp-autocomplete.html:313:2 The attribute 'filter-expr' in tag 'amp-autocomplete' is missing or incorrect, but required by attribute 'filter'. (see https://amp.dev/documentation/components/amp-autocomplete) [DISALLOWED_HTML]
amp-autocomplete/0.1/test/validator-amp-autocomplete.html:290:2 The attribute 'filter-expr' in tag 'amp-autocomplete' is missing or incorrect, but required by attribute 'filter'. (see https://amp.dev/documentation/components/amp-autocomplete) [DISALLOWED_HTML]
| <input>
| <script type="application/json"> {} </script>
| </amp-autocomplete>
|
| <!-- Invalid: amp-autocomplete with filter=custom and no filter-expr attribute -->
| <amp-autocomplete filter="custom" src="https://data.com/articles.json?ref=CANONICAL_URL">
>> ^~~~~~~~~
amp-autocomplete/0.1/test/validator-amp-autocomplete.html:319:2 The attribute 'filter-expr' in tag 'amp-autocomplete' is missing or incorrect, but required by attribute 'filter'. (see https://amp.dev/documentation/components/amp-autocomplete) [DISALLOWED_HTML]
amp-autocomplete/0.1/test/validator-amp-autocomplete.html:296:2 The attribute 'filter-expr' in tag 'amp-autocomplete' is missing or incorrect, but required by attribute 'filter'. (see https://amp.dev/documentation/components/amp-autocomplete) [DISALLOWED_HTML]
| <input>
| </amp-autocomplete>
|
| <!-- Invalid: amp-component suggest-first attribute and no filter attribute-->
| <amp-autocomplete suggest-first>
>> ^~~~~~~~~
amp-autocomplete/0.1/test/validator-amp-autocomplete.html:324:2 The attribute 'filter' in tag 'amp-autocomplete' is missing or incorrect, but required by attribute 'suggest-first'. (see https://amp.dev/documentation/components/amp-autocomplete) [DISALLOWED_HTML]
amp-autocomplete/0.1/test/validator-amp-autocomplete.html:301:2 The attribute 'filter' in tag 'amp-autocomplete' is missing or incorrect, but required by attribute 'suggest-first'. (see https://amp.dev/documentation/components/amp-autocomplete) [DISALLOWED_HTML]
| <input type="text">
| <script type="application/json"> {} </script>
| </amp-autocomplete>
|
| <!-- Invalid: amp-autocomplete with unexpected filter -->
| <amp-autocomplete filter="random">
>> ^~~~~~~~~
amp-autocomplete/0.1/test/validator-amp-autocomplete.html:330:2 The attribute 'filter' in tag 'amp-autocomplete' is set to the invalid value 'random'. (see https://amp.dev/documentation/components/amp-autocomplete) [DISALLOWED_HTML]
amp-autocomplete/0.1/test/validator-amp-autocomplete.html:307:2 The attribute 'filter' in tag 'amp-autocomplete' is set to the invalid value 'random'. (see https://amp.dev/documentation/components/amp-autocomplete) [DISALLOWED_HTML]
| <input>
| <script type="application/json"> {} </script>
| </amp-autocomplete>
|
| <!-- Invalid: amp-autocomplete with unexpected filter and src attr -->
| <amp-autocomplete filter="random" src="https://data.com/articles.json?ref=CANONICAL_URL">
>> ^~~~~~~~~
amp-autocomplete/0.1/test/validator-amp-autocomplete.html:336:2 The attribute 'filter' in tag 'amp-autocomplete' is set to the invalid value 'random'. (see https://amp.dev/documentation/components/amp-autocomplete) [DISALLOWED_HTML]
amp-autocomplete/0.1/test/validator-amp-autocomplete.html:313:2 The attribute 'filter' in tag 'amp-autocomplete' is set to the invalid value 'random'. (see https://amp.dev/documentation/components/amp-autocomplete) [DISALLOWED_HTML]
| <input>
| </amp-autocomplete>
| </body>
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.