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

Block Editor: URLInput: Soft-deprecate label prop #22438

Open
Tracked by #35073
aduth opened this issue May 18, 2020 · 0 comments
Open
Tracked by #35073

Block Editor: URLInput: Soft-deprecate label prop #22438

aduth opened this issue May 18, 2020 · 0 comments
Labels
Backwards Compatibility Issues or PRs that impact backwards compatability [Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) [Package] Block editor /packages/block-editor [Type] Task Issues or PRs that have been broken down into an individual action to take

Comments

@aduth
Copy link
Member

aduth commented May 18, 2020

Previously: #18061 (comment)

As discussed in #18061, the new LinkControl component can be considered as a composite component of URLInput, plus labeling behaviors associated with similar *Control input control components.

Diagram (not including label):

image

In this model, URLInput should be considered a very barebones component whose sole responsibility should be to render an input field and associated URL autocompletion results from which to pick a value.

This component would not accept a label prop. However, since URLInput already does accept label, we should soft-deprecate it in the following manner:

  • Continue to accept label
  • If label is provided:
    • Log a deprecated message
    • Render <LinkControl /> with the given label and relevant props
      • LinkControl will recursively render URLInput, but it should not pass label, thus avoiding recursion
@aduth aduth added [Type] Task Issues or PRs that have been broken down into an individual action to take Backwards Compatibility Issues or PRs that impact backwards compatability [Package] Block editor /packages/block-editor [Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) labels May 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backwards Compatibility Issues or PRs that impact backwards compatability [Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) [Package] Block editor /packages/block-editor [Type] Task Issues or PRs that have been broken down into an individual action to take
Projects
None yet
Development

No branches or pull requests

1 participant