Allow selection of unpublished documents in link picker and align display of URLs #19296
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.
Prerequisites
Resolves: #19294
Description
The linked issue notes that that the validation we have in place currently prevents selection of an unpublished document in the link picker, and that we supported that in 13.
This PR allows that now, but moving the validation to look at the
name
for the selected URL, which we will always have, rather than the URL. It also fixes an error that occurred when we didn't get a URL back from the request to retrieve it for the document.I also noticed that when selecting a document or media URL, we see it's actual URL displayed in the picker. But on the opening of the picker for a pre-selected link, we see the
localLink
syntax. So I've also aligned this by requesting the actual URL for display when the picker is loaded.Testing