Link UI briefly shows unwanted rich preview for internal URLs #32657
Labels
[Feature] Link Editing
Link components (LinkControl, URLInput) and integrations (RichText link formatting)
[Type] Bug
An existing feature does not function as intended
Description
Due to the introduction of loading placeholders towards the end of #31464, internal URLs will now briefly showing a "loading" state. This is not desirable.
This PR fixes this by testing against a base URL which is used to test if the URL being previewed is an internal URL. If it is then we bail out.
This baseURL has been added to the @wordpress/editor block editor settings as we cannot apply the test directly in as this must remain WordPress agnostic. Note however, that the concept of a internal URL applies to all types of application.
Step-by-step reproduction instructions
Expected behaviour
Should not show any rich preview loading state (or otherwise) for internal URLs.
Actual behaviour
Shows a briefly "loading" UI for rich previews even if the URL is internal.
Screenshots or screen recording (optional)
Code snippet (optional)
WordPress information
Device information
The text was updated successfully, but these errors were encountered: