-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Ship remote page attachments #27709
Ship remote page attachments #27709
Conversation
cramforce
commented
Apr 11, 2020
- Adds docs
- Adds validator rules
- Adds example
- Fixes robustness of drawer stylesheet (Ideally the UI would move into shadow DOM)
- Adds docs - Adds validator rules - Adds example - Fixes robustness of drawer stylesheet (Ideally the UI would move into shadow DOM)
Hey @ampproject/wg-caching, these files were changed:
|
attrs: { | ||
name: "href" | ||
value_url: { | ||
protocol: "http" | ||
protocol: "https" | ||
} | ||
} |
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.
Having any descendant today breaks the layout. I think we should have two separate validation specs for this <amp-story-page-attachment>
tag:
- The current one that allows descendants
- A new one with a mandatory
href
attribute, and 0 allowed descendants
The alternative would be to remove all descendants at build time, but the validation spec is more strict.
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.
Done.
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.
Can you push the changes?
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.
Sorry. Done
<amp-story-page-attachment layout="nodisplay" href="https://www.example.com" | ||
>...</amp-story-page-attachment | ||
> |
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.
Making it more clear that there is no children allowed:
<amp-story-page-attachment layout="nodisplay" href="https://www.example.com" | |
>...</amp-story-page-attachment | |
> | |
<amp-story-page-attachment layout="nodisplay" href="https://www.example.com"> | |
</amp-story-page-attachment> |
## Allowed content and components | ||
## Linked content | ||
|
||
When providing a `href` attribute as page attachment, the respective URL is opened when the user activates the page attachment. |
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.
Wdyt about adding one line about the fact that this is a page navigation on the web, but can be handled different in native contexts (in-app browser, customized app experience...)?
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 don't think we should specify what exactly happens.