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: convert gallery to a wrapper around the core image block #24039

Closed
wants to merge 20 commits into from
Closed
60 changes: 16 additions & 44 deletions packages/block-library/src/gallery/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,6 @@
"name": "core/gallery",
"category": "media",
"attributes": {
"images": {
"type": "array",
"default": [],
"source": "query",
"selector": ".blocks-gallery-item",
"query": {
"url": {
"type": "string",
"source": "attribute",
"selector": "img",
"attribute": "src"
},
"fullUrl": {
"type": "string",
"source": "attribute",
"selector": "img",
"attribute": "data-full-url"
},
"link": {
"type": "string",
"source": "attribute",
"selector": "img",
"attribute": "data-link"
},
"alt": {
"type": "string",
"source": "attribute",
"selector": "img",
"attribute": "alt",
"default": ""
},
"id": {
"type": "string",
"source": "attribute",
"selector": "img",
"attribute": "data-id"
},
"caption": {
"type": "string",
"source": "html",
"selector": ".blocks-gallery-item__caption"
}
}
},
"ids": {
"type": "array",
"items": {
Expand Down Expand Up @@ -73,8 +29,24 @@
"sizeSlug": {
"type": "string",
"default": "large"
},
"allowBlockAlign": {
"type": "boolean",
"default": false
},
"allowResize": {
"type": "boolean",
"default": false
},
"isList": {
"type": "boolean",
"default": true
}
},
"providesContext": {
"allowBlockAlign": "allowBlockAlign",
"allowResize": "allowResize"
},
"supports": {
"anchor": true,
"align": true
Expand Down
Loading