Skip to content

🐛 [amp story page attachment] reopen attachment on refresh#37431

Merged
processprocess merged 6 commits intoampproject:mainfrom
processprocess:reopen
Jan 27, 2022
Merged

🐛 [amp story page attachment] reopen attachment on refresh#37431
processprocess merged 6 commits intoampproject:mainfrom
processprocess:reopen

Conversation

@processprocess
Copy link
Copy Markdown
Contributor

Re-open the active page's attachment if it was previously open.

Context / Fixes #37430

@amp-owners-bot
Copy link
Copy Markdown

Hey @gmajoulet, @newmuis! These files were changed:

extensions/amp-story/1.0/amp-story.js

Copy link
Copy Markdown
Contributor

@mszylkowski mszylkowski left a comment

Choose a reason for hiding this comment

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

Nit: you can chain the promises like so:

whenUpgradedToCustomElement(attachmentEl)
    .then(() => attachmentEl.getImpl())
    .then(
        (attachment) => attachment.open(false /** shouldAnimate */)
    );

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.

[Amp story page attachment] Refreshing page while attachment is open throws error.

3 participants