Skip to content

Conversation

im3dabasia
Copy link
Contributor

@im3dabasia im3dabasia commented Mar 12, 2025

What?

Related to this issue: #58507 (comment)

Changes the placeholder in MediaReplaceFlow from "Search or type URL" to "Paste or type URL" to accurately reflect current functionality.

Why?

The MediaReplaceFlow component currently doesn't support search functionality, but the placeholder text incorrectly suggests it does. This change brings the placeholder text in line with the actual available features and maintains consistency with other similar components. Like "Insert from URL"

Search is set to false illustrated in the code below

<form className="block-editor-media-flow__url-input">
<span className="block-editor-media-replace-flow__image-url-label">
{ __( 'Current media URL:' ) }
</span>
<LinkControl
value={ { url: mediaURL } }
settings={ [] }
showSuggestions={ false }
onChange={ ( { url } ) => {
onSelectURL( url );
} }
/>
</form>

How?

Updated the placeholder text in the MediaReplaceFlow component to remove the reference to search functionality, as the "suggestions" option is set to false.

Screenshots or screencast

The MediaReplaceFlow does not have the search functionality but still search is mentioned in the placeholder

Screen.Recording.2025-03-12.at.7.13.46.PM.mov
Before After
image image

@im3dabasia im3dabasia marked this pull request as ready for review March 12, 2025 13:46
@im3dabasia im3dabasia requested a review from ellatrix as a code owner March 12, 2025 13:46
Copy link

github-actions bot commented Mar 12, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: im3dabasia <im3dabasia1@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@Mamaduka Mamaduka added [Type] Enhancement A suggestion for improvement. [Package] Block editor /packages/block-editor labels Mar 12, 2025
@Mamaduka
Copy link
Member

Mamaduka commented Mar 12, 2025

@im3dabasia, do we have an associated issue for this PR? Just checking; you don't have to create one for minor updates like this.

@im3dabasia
Copy link
Contributor Author

@im3dabasia, do we have an associated issue for this PR? Just checking; you don't have to create one for minor updates like this.

Hey @Mamaduka, No, there is no direct issue created for this, but I found this while working on a related issue #58507 (comment).

@Mamaduka
Copy link
Member

Thanks for the info. It looks like some failing e2e tests are related to the placeholder text change. Let's fix that, and then this is good to merge.

@im3dabasia im3dabasia force-pushed the fix/media-replace-flow-placeholder branch from c1947a5 to f87459a Compare March 12, 2025 17:56
@Mamaduka
Copy link
Member

The same goes for unit tests 😅

@Mamaduka Mamaduka merged commit 14a989d into WordPress:trunk Mar 12, 2025
60 checks passed
@github-actions github-actions bot added this to the Gutenberg 20.5 milestone Mar 12, 2025
@im3dabasia
Copy link
Contributor Author

Thanks 🚀 🚀

chriszarate pushed a commit to chriszarate/gutenberg that referenced this pull request Jul 1, 2025
…ress#69546)

Co-authored-by: im3dabasia <im3dabasia1@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Block editor /packages/block-editor [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants