-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Gallery: Duplicate image IDs into easy-to-parse attribute (#11540)
* [TRY] Gallery: Duplicate images' IDs into easy-to-parse attribute * typo fix * Fixed a check in shortcode transform; Handled the file transform. * Corrected fixtures and snapshots. * Improved error message. * Update packages/block-library/src/gallery/index.js Co-Authored-By: jorgefilipecosta <[email protected]> * Update packages/block-library/src/gallery/index.js Co-Authored-By: jorgefilipecosta <[email protected]> * Update packages/block-library/src/gallery/index.js Co-Authored-By: jorgefilipecosta <[email protected]> * Update packages/block-library/src/gallery/index.js Co-Authored-By: jorgefilipecosta <[email protected]> * Add deprecation logic. * update fixtures
- Loading branch information
Showing
13 changed files
with
141 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,10 @@ | |
"caption": "" | ||
} | ||
], | ||
"ids": [ | ||
null, | ||
null | ||
], | ||
"imageCrop": true, | ||
"linkTo": "none" | ||
}, | ||
|
7 changes: 6 additions & 1 deletion
7
test/integration/full-content/fixtures/core__gallery.parsed.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
test/integration/full-content/fixtures/core__gallery.serialized.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<!-- wp:gallery --> | ||
<!-- wp:gallery {"ids":[null,null]} --> | ||
<ul class="wp-block-gallery columns-2 is-cropped"><li class="blocks-gallery-item"><figure><img src="https://cldup.com/uuUqE_dXzy.jpg" alt="title"/></figure></li><li class="blocks-gallery-item"><figure><img src="http://google.com/hi.png" alt="title"/></figure></li></ul> | ||
<!-- /wp:gallery --> |
2 changes: 1 addition & 1 deletion
2
test/integration/full-content/fixtures/core__gallery__columns.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,10 @@ | |
"caption": "" | ||
} | ||
], | ||
"ids": [ | ||
null, | ||
null | ||
], | ||
"columns": 1, | ||
"imageCrop": true, | ||
"linkTo": "none" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,10 @@ | |
{ | ||
"blockName": "core/gallery", | ||
"attrs": { | ||
"ids": [ | ||
null, | ||
null | ||
], | ||
"columns": 1 | ||
}, | ||
"innerBlocks": [], | ||
|
2 changes: 1 addition & 1 deletion
2
test/integration/full-content/fixtures/core__gallery__columns.serialized.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<!-- wp:gallery {"columns":1} --> | ||
<!-- wp:gallery {"ids":[null,null],"columns":1} --> | ||
<ul class="wp-block-gallery columns-1 is-cropped"><li class="blocks-gallery-item"><figure><img src="https://cldup.com/uuUqE_dXzy.jpg" alt="title"/></figure></li><li class="blocks-gallery-item"><figure><img src="http://google.com/hi.png" alt="title"/></figure></li></ul> | ||
<!-- /wp:gallery --> |