ampproject / amphtml

The AMP web component framework.
https://amp.dev
Apache License 2.0
14.89k stars 3.89k forks source link

[amp story shopping] Remove attachment templates when far from active page #37517

Open processprocess opened 2 years ago

processprocess commented 2 years ago

Description

Attachment templates can potentially build a lot of dom that may not be necessary if the user navigates far away from them. They should be removed from the dom at a certain distance and can be re-built if the user goes back.

Alternatives Considered

Leave them in the dom. It's okay to leave them but it keeps lots of un-needed dom in the document, which may slow down the experience.

Additional Context

Distance can be read using a pattern used in panning-media

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.