Gallery: Fix stuck image size options loader#36806
Merged
andrewserong merged 1 commit intotrunkfrom Nov 24, 2021
Merged
Conversation
|
Size Change: +12 B (0%) Total Size: 1.1 MB
ℹ️ View Unchanged
|
glendaviesnz
approved these changes
Nov 24, 2021
Contributor
glendaviesnz
left a comment
There was a problem hiding this comment.
Nice - thank for fixing this! This worked for me in both cases. I think not displaying the menu at all if there are no images with Ids makes the most sense.
Contributor
|
@andrewserong do you think this should be cherry picked into 5.9 release? |
Contributor
Author
Yes, good call. Like the other one, I've just added the Backport to WP Beta/RC label 👍. Thanks for the review! |
noisysocks
pushed a commit
that referenced
this pull request
Nov 29, 2021
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #36554
This PR fixes the two instances I could find where the Image size options in the Gallery block results in a stuck loader:
imageSizeOptionswill always be falsy, which results in the loader always displaying. In this case, because we can't set image sizes for external images, let's hide the control altogether.NaNwhenparseIntis called. This change explicitly sets it tonull.How has this been tested?
Test a v2 gallery block with all external images
use_balanceTagsis set to0), insert a gallery block into a post or page, add a couple of images, and then replace every image with an externally linked image.Test the update button on a v1 gallery block
Screenshots
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist:
*.native.jsfiles for terms that need renaming or removal).