Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Experimental Link creation interface #17846
Experimental Link creation interface #17846
Changes from 101 commits
8dbc2bd
ee008be
e685003
70049ad
98e6aa5
85a6317
8ec1488
140cc90
d64608e
30e0eb6
53ce517
b53c13c
6d7259a
4f32429
4971e30
4aea19c
d554b65
26c4c1b
e778a04
3ca482e
aec9f39
70bd877
58220f8
5eeb819
d355133
2044065
b256d55
b55f557
2133fb1
70c5c04
4a031ed
5b5164c
664daad
9780959
5c3bf35
c962dc6
d4c0a70
8cff4c2
b4a3f66
fbe49e7
fa0dd36
f5a7e65
a88826e
ec9e2ad
11ca79f
779d440
4941bb8
452ec55
5484a7c
37de5d9
ba32148
33467f3
553be99
ad46c87
26c292f
17be2f8
13f5ce1
556088a
1cdd939
2588b9e
a065936
98836fd
5254015
811ad11
9cd6d18
bdb6217
d0a348b
da212f0
19d5e64
548279b
a844800
fd3a6ef
b314c49
5aeb531
1a7c285
63201c9
4918184
cd29ab5
2d8befb
d8895d5
2413016
e3042c8
0a9d558
89e92fb
ff57160
48e5f44
4e811db
43c30b2
158ea3e
4981a71
f1c54a6
797fd6c
e5e44e6
5ba4b65
d5abad2
5c1ec22
4d5b455
b8a01bd
7df9aa5
b6edb73
b435b49
8c5ed79
1fffe8e
1c1614d
0cdf706
2f80347
b93a0db
5b6715d
280db32
ba985eb
7d35791
e7585b8
8450bb1
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was there any planned usage for the various
type
s associated with manual entry? As part of the ongoing discussion in #18061, I've been considering whether this is something where the explicit absence of the type could be a reasonably good indicator on its own for marking a value as "manual entry". The sorts of things that someone might want to do withtype
should be equally achievable with the@wordpress/url
utilities, if a developer were so inclined. One of the issues I encountered in #19827 was trying to decide what the best complete set of these "subtypes" should be, where we would probably be better off to just not have to answer that.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Follow-up: #20051
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it might be tidier if all the code from
handleURLSearch
andhandleEntitySearch
were defined ingetSearchHandler
. There seems to be a lot of logic aroundisURL
,couldBeURL
,value.includes( 'www.' )
that could be streamlined by moving all the code to be in the same place.Other than that, this could use an array spread:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getSearchHandler
is an 'effect' according to the comment, butresetInput
isn't. Both seem to useuseCallback
. The name could possibly be changed as it doesn't return asearchHandler
from what I can tell, but thesearchResults
instead.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed when there's already a
showSuggestions
prop?fetchLinkSuggestions
beingundefined
could also indicate to the component that suggestions shouldn't be handled.