You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Normally, the LinkControl 'link preview' displayes two lines:
the displayTitle, which can be a few things:
the document title of the fetched 'rich data' of the link destination page
or, the entered link text
or, the entered link URL
The displayURL which is the link URL, with the protocol part stripped out.
When the rich data info can not be fetched, the 'title' is, normally, the linked text. Screenshot:
When the link text is the same as the displayURL, there is some ogic in place to avoid to display two lines with the same identical information. That makes totally sense, and only one line is displayed. Screenshot:
Without this logic, there would be two lines that would repeate the same, identical, information. Screenshot:
So far, so good.
However, the logic in place doesn't take into account the case when the link text contains the protocol. In this case, the preview displayes both lines and they contain the same information, the only difference is the displayed protocol. Screenshot:
Visually and semantically, in this case the depeated information is redundant. It would be best to shoe only the displayTitle.
Step-by-step reproduction instructions
Add a Paragraph that contains the text test.org.
Select the text test.org and add a link to test.org without the protocol part.
Once the link is added, click the link in the Paragraph to open the link control preview.
Observe the link preview displays only one line: test.org.
Add a Paragraph with some text and paste https://test.org within the text. The pasted link should be automatically transformed to a link. If not, make sure to add a link to it with the value https://test.org. It doesn't matter whether the URL contaisn the protocol part.
Once the link is added, click the link in the Paragraph to open the link control preview.
Observe the link preview displays two lines: https://test.org and test.org.
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered:
Description
Normally, the LinkControl 'link preview' displayes two lines:
displayTitle
, which can be a few things:displayURL
which is the link URL, with the protocol part stripped out.When the rich data info can not be fetched, the 'title' is, normally, the linked text. Screenshot:
When the link text is the same as the
displayURL
, there is some ogic in place to avoid to display two lines with the same identical information. That makes totally sense, and only one line is displayed. Screenshot:Without this logic, there would be two lines that would repeate the same, identical, information. Screenshot:
So far, so good.
However, the logic in place doesn't take into account the case when the link text contains the protocol. In this case, the preview displayes both lines and they contain the same information, the only difference is the displayed protocol. Screenshot:
Visually and semantically, in this case the depeated information is redundant. It would be best to shoe only the
displayTitle
.Step-by-step reproduction instructions
test.org
.test.org
and add a link totest.org
without the protocol part.test.org
.https://test.org
within the text. The pasted link should be automatically transformed to a link. If not, make sure to add a link to it with the valuehttps://test.org
. It doesn't matter whether the URL contaisn the protocol part.https://test.org
andtest.org
.Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: