-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Closed
Labels
[Feature] Link EditingLink components (LinkControl, URLInput) and integrations (RichText link formatting)Link components (LinkControl, URLInput) and integrations (RichText link formatting)[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
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
- Create link to internal URL (ie: a Page or Post).
- Click on link again to see preview.
- See brief loading UI flash up.
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
- WordPress version:
- Gutenberg version:
- Are all plugins except Gutenberg deactivated?
- Are you using a default theme (e.g. Twenty Twenty-One)?
Device information
- Device:
- Operating system:
- Browser:
stokesman
Metadata
Metadata
Assignees
Labels
[Feature] Link EditingLink components (LinkControl, URLInput) and integrations (RichText link formatting)Link components (LinkControl, URLInput) and integrations (RichText link formatting)[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended