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

Social Links: Add disableSuggestions to URLInput #18946

Merged
merged 1 commit into from Dec 6, 2019

Conversation

@mkaz
Copy link
Member

mkaz commented Dec 5, 2019

Description

In #18905 Social Links was switched from a generic input field to using URLInput, this change adds disableSuggetions to prevent the field to suggest internal links or pages since Social Links are typically an external link.

Related, but not dependent, the Social Links can probably also benefit from this issue
#11852

How has this been tested?

  1. Base Case. Add a Social Links block, insert a link and in the URL field type "About" or other page or post name and you should see a list of suggestions.

  2. Apply PR. Repeat 1 and as you start typing you should not see the suggestions

Types of changes

Adds disableSuggestions parameter to URLInput component for Social Links.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
In #18905 Social Links was switched from a generic input field to using
URLInput, this change adds disableSuggetions to prevent the field to
suggest internal links or pages since Social Links are typically an
external link.
@mkaz mkaz added the [Block] Social label Dec 5, 2019
@mkaz mkaz requested review from jasmussen and aduth Dec 5, 2019
Copy link
Contributor

jasmussen left a comment

Yep, nice and simple.

Before:

before

After:

after

@youknowriad

This comment has been minimized.

Copy link
Contributor

youknowriad commented Dec 6, 2019

Based on the screenshot, I might think the loaded is unnecessary when the suggestions are disabled. The API shouldn't be called at all?

@youknowriad

This comment has been minimized.

Copy link
Contributor

youknowriad commented Dec 6, 2019

It could be a separate fix though as it seems that this prop already exists.

@mkaz mkaz merged commit fee02da into master Dec 6, 2019
2 checks passed
2 checks passed
pull-request-automation
Details
Travis CI - Pull Request Build Passed
Details
@mkaz mkaz deleted the update/social-links-disable-suggestions branch Dec 6, 2019
@aduth aduth changed the title Social Links: Add disableSuggetions to URLInput Social Links: Add disableSuggestions to URLInput Dec 6, 2019
@youknowriad youknowriad added this to the Gutenberg 7.1 milestone Dec 9, 2019
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.