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

URLInput component needs a custom 'placeholder' attribute #11852

Closed
r-a-y opened this issue Nov 14, 2018 · 5 comments
Closed

URLInput component needs a custom 'placeholder' attribute #11852

r-a-y opened this issue Nov 14, 2018 · 5 comments
Labels
Good First Issue An issue that's suitable for someone looking to contribute for the first time [Package] Editor /packages/editor [Type] Developer Documentation Documentation for developers [Type] Enhancement A suggestion for improvement.

Comments

@r-a-y
Copy link

r-a-y commented Nov 14, 2018

Editor's Update 2019-12-05 (by @aduth): A placeholder prop now exists for URLInput as of #17846, but is not yet documented. The task should now reflect the need for documentation.


Describe the bug
Similar to other block components like RichText, the URLInput block needs to have a configurable placeholder attribute so custom blocks can set a different value other than the default Paste URL or type to search

It currently does not allow for one:
https://github.com/WordPress/gutenberg/blob/master/packages/editor/src/components/url-input/index.js#L243

Additional context

  • Tested on Gutenberg 4.3.0

I also encountered other bugs with URLInput that I'll file new issues for.

@designsimply designsimply added [Type] Enhancement A suggestion for improvement. Needs Decision Needs a decision to be actionable or relevant [Package] Url /packages/url labels Nov 14, 2018
@gziolo gziolo added [Package] Editor /packages/editor Good First Issue An issue that's suitable for someone looking to contribute for the first time Needs Dev Ready for, and needs developer efforts and removed [Package] Url /packages/url Needs Decision Needs a decision to be actionable or relevant labels May 23, 2019
@gziolo
Copy link
Member

gziolo commented May 23, 2019

Placeholder for URLInput is hardcoded as of today:

placeholder={ __( 'Paste URL or type to search' ) }

Please note that this component was moved to @wordpress/block-editor package.

@luckyape
Copy link

the hard coded placeholder provides a challenging user experience for disableSuggestions: true

@HardeepAsrani
Copy link
Contributor

Yea, it's weird to have the "or search" option when there's a prop to disable suggestions. I can take over this if an affirmative decision is made. :)

@aduth
Copy link
Member

aduth commented Dec 5, 2019

URLInput now has a placeholder prop as of #17846

It does not yet appear to be documented, so this issue should remain open until that is resolved.

@aduth aduth added [Type] Developer Documentation Documentation for developers and removed Needs Dev Ready for, and needs developer efforts labels Dec 5, 2019
@PypWalters
Copy link
Contributor

I believe this ticket can be closed now that #36799 has been merged.

@r-a-y r-a-y closed this as completed Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue An issue that's suitable for someone looking to contribute for the first time [Package] Editor /packages/editor [Type] Developer Documentation Documentation for developers [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

7 participants