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

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

Merged
merged 1 commit into from Dec 18, 2019

Conversation

@scruffian
Copy link
Contributor

scruffian commented Dec 11, 2019

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 (#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 mentioned this pull request Dec 11, 2019
3 of 3 tasks complete
@draganescu draganescu assigned draganescu and unassigned draganescu Dec 11, 2019
@scruffian scruffian force-pushed the scruffian:update/media-replace-flow branch from 5b594de to 3ae1655 Dec 18, 2019
@draganescu draganescu merged commit 993bfe0 into WordPress:master Dec 18, 2019
2 checks passed
2 checks passed
pull-request-automation
Details
Travis CI - Pull Request Build Passed
Details
@youknowriad youknowriad added this to the Gutenberg 7.2 milestone Jan 6, 2020
@scruffian scruffian deleted the scruffian:update/media-replace-flow branch Jan 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.