Inline Link: Set link text to post title when post selected from dropdown #12726
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.
Fixes #11930
Description
In #11930, it was requested that the link selector insert the post title as the link text instead of the link href as the link text.
This PR will ensure that when creating a new link, after searching for and selecting a post, that new link does use the post title. Updating a link does not change the link's text.
Design consideration: When updating an existing link by searching for a post, should the link text become the post title of the post? For example, let's say I search for "Same Page" and insert a link to that page. The link text would be "Sample Page". Now, let's say I edit that link, search for "Hello World!" and select the "Hello World!" post. Should the link text now be "Hello World!"?
How has this been tested?
I am on Mac and Chrome 70.0.3538.110 (Official Build) (64-bit). I tested by:
https://facebook.com
into the new link UIhttps://facebook.com
Screenshots
Types of changes
Checklist: