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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃悰amp-consent scheduleLayout for prompt UI elements #15281
Conversation
@@ -553,6 +559,7 @@ export class AmpConsent extends AMP.BaseElement { | |||
this.getViewport().addToFixedLayer(this.element); | |||
setImportantStyles(dev().assertElement(this.postPromptUI_), | |||
{display: 'block'}); | |||
this.scheduleLayout(this.postPromptUI_); |
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.
as discussed, remove this.
{display: 'block'}); | ||
const uiElement = this.consentUI_[this.currentDisplayInstance_]; | ||
setImportantStyles(uiElement, {display: 'block'}); | ||
this.scheduleLayout(uiElement); |
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.
document this is for amp-iframe
which will be unlaid out on close.
@@ -131,6 +131,11 @@ export class AmpConsent extends AMP.BaseElement { | |||
// TODO: Decide what to do with incorrect configuration. | |||
this.assertAndParseConfig_(); | |||
|
|||
const children = this.getRealChildren(); |
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.
document this is for amp-iframe which will be unlaid out on close.
0332de5
to
9ae021b
Compare
* schedueLayout * add comment * linter
Ideally runtime will handle the layout of prompt element. But currently element won't be laid out on fixed layer update.
<amp-consent>
need to take ownership of its children's layout.