Skip to content

Media Replace Flow: Don't show the URL option unless there is a handler#19063

Merged
draganescu merged 1 commit into
WordPress:masterfrom
scruffian:update/media-replace-flow
Dec 18, 2019
Merged

Media Replace Flow: Don't show the URL option unless there is a handler#19063
draganescu merged 1 commit into
WordPress:masterfrom
scruffian:update/media-replace-flow

Conversation

@scruffian

Copy link
Copy Markdown
Contributor

Description

In the site logo block we want to use the MediaReplaceFlow component, but we don't want to offer the URL option. This change ensures that the "Insert From URL" option only shows when a onSelectURL handler is passed. This is what we do in MediaPlaceholder

How has this been tested?

  • Use the site logo branch (Full Site Editing: Add a Site Logo block #18811)
  • Then apply this change on top
  • Check that the site logo block doesn't have an "Insert From URL" option
  • Check that the image block still has a "Insert From URL" option

Screenshots

Types of changes

Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.

@scruffian scruffian force-pushed the update/media-replace-flow branch from 5b594de to 3ae1655 Compare December 18, 2019 09:51
@draganescu draganescu merged commit 993bfe0 into WordPress:master Dec 18, 2019
@youknowriad youknowriad added this to the Gutenberg 7.2 milestone Jan 6, 2020
@scruffian scruffian deleted the update/media-replace-flow branch January 16, 2020 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants