Skip to content

Image block: Hide Size options when Image object is undefined#1669

Merged
etoledom merged 6 commits intodevelopfrom
issue/hide-image-size-option-conditionally
Dec 19, 2019
Merged

Image block: Hide Size options when Image object is undefined#1669
etoledom merged 6 commits intodevelopfrom
issue/hide-image-size-option-conditionally

Conversation

@etoledom
Copy link
Copy Markdown
Contributor

This PR fixes point 3 of #1593

gutenberg side PR: WordPress/gutenberg#19037

When the image object is not present, the Image Size option won't be present in the Image Options.

The Image object is fetched on a network call for images stored in the WP Media Library. For images added via link, this object is never fetched.

Other cause of the object being missing is network call errors.

With this change we are looking to avoid the case when the ImageSize is displayed in the UI, but it does nothing.

Test:

Update release notes:

  • If there are user facing changes, I have added an item to RELEASE-NOTES.txt.

@etoledom etoledom added the [Type] Enhancement Improves a current area of the editor label Dec 10, 2019
@etoledom etoledom added this to the 1.20 milestone Dec 10, 2019
@etoledom etoledom requested a review from mchowning December 10, 2019 14:51
@etoledom etoledom self-assigned this Dec 10, 2019
@etoledom etoledom changed the title Update gutenberg ref Image block: Hide Size options when Image object is undefined Dec 10, 2019
@etoledom etoledom mentioned this pull request Dec 16, 2019
8 tasks
@etoledom etoledom force-pushed the issue/hide-image-size-option-conditionally branch from 54b8fe2 to d845357 Compare December 18, 2019 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Enhancement Improves a current area of the editor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants