Skip to content
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

Gallery block: explore options for indicating context to the nested image blocks #33531

Open
glendaviesnz opened this issue Jul 19, 2021 · 2 comments
Labels
[Block] Gallery Affects the Gallery Block - used to display groups of images [Type] Enhancement A suggestion for improvement.

Comments

@glendaviesnz
Copy link
Contributor

glendaviesnz commented Jul 19, 2021

With the Gallery refactor PR the Image block modifies its behaviour slightly based on a context vars that is passed down from the Gallery block - allowResize. This is set to false for the Gallery blocks, which disables the image resize option as most resizing of images breaks the gallery layout with the current flex layout.

There may be a better way to handle this via the data module as the post block does when a child of the query block, or to at least indicate that the context var is a constant that isn't serialised as is normally the case with context.

It also may be possible to switch the gallery to a more robust css grid layout that can cope with individual image resizing in which case the context value can be removed.

@mtias
Copy link
Member

mtias commented Jul 19, 2021

Can you expand a bit, for clarity, what the modifications are from the perspective of image blocks?

@glendaviesnz
Copy link
Contributor Author

Can you expand a bit, for clarity, what the modifications are from the perspective of image blocks?

It turned out that due to recent updates in the Image block the isGrouped context was not needed, so just allowResize left. which I am optimistic can be removed once we make resizing of images reliable within the gallery block.

@jordesign jordesign added the [Type] Enhancement A suggestion for improvement. label Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Gallery Affects the Gallery Block - used to display groups of images [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

3 participants