You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a developer,
I want to know the context of a Block,
so that I can use that for its configuration.
For example: when you know where an ImageBlock is on the page, you can configure its image loading strategy (instantly when on top, lazily when lower on the page). And similar behaviour for lazy embeds (#107), and native video element preload: auto|none (#33).
Possible solution
Right now, Blocks are registered in and included from src/blocks/Blocks.astro, like:
Page models have a bodyBlocks field, and could be extended with a headerBlocks and footerBlocks field in the future. This could then be passed in the context as location like in the example above.
User story
As a developer,
I want to know the context of a Block,
so that I can use that for its configuration.
For example: when you know where an ImageBlock is on the page, you can configure its image loading strategy (instantly when on top, lazily when lower on the page). And similar behaviour for lazy embeds (#107), and native video element
preload: auto|none
(#33).Possible solution
Right now, Blocks are registered in and included from
src/blocks/Blocks.astro
, like:We could add a context like so:
Page models have a
bodyBlocks
field, and could be extended with aheaderBlocks
andfooterBlocks
field in the future. This could then be passed in the context aslocation
like in the example above.This concept is based on discussion with @Siilwyn about Shopify: Announcing new Liquid features for better web performance:
The text was updated successfully, but these errors were encountered: