Skip to content

Image Block: URL preview layout is broken #33096

Closed

Description

@Mamaduka

Description

When opening the "Replace" dropdown for an Image block, the Link/URL preview styling is broken. See screenshot.

Step-by-step reproduction instructions

  1. Create a post.
  2. Add Image block and select media
  3. Click on the "Replace" toolbar button.
  4. See the "glob" icon.

Expected behaviour

The layout should look more "stacked" without overlapping elements. It should not be visually "broken".

Actual behaviour

It looks visually broken.

Screenshots or screen recording (optional)

CleanShot 2021-06-30 at 16 43 12

WordPress information

  • WordPress version: 5.8 RC1
  • Gutenberg version: 10.9.1
  • Are all plugins except Gutenberg deactivated? Yes
  • Are you using a default theme (e.g. Twenty Twenty-One)? TT1 Blocks

Activity

  1. added
    [Feature] Link EditingLink components (LinkControl, URLInput) and integrations (RichText link formatting)
    [Type] BugAn existing feature does not function as intended
    on Jun 30, 2021
  2. changed the title [-]Image Block: Displays partial rich URL preview[/-] [+]Image Block: URL preview layout is broken[/+] on Jun 30, 2021
  3. getdave commented on Jun 30, 2021

    @getdave
    Contributor

    Thanks for reporting @Mamaduka. I updated the title and description to reflect the fact that it isn't showing a rich preview but rather the CSS styles are slightly broken in this context.

  4. added
    CSS StylingRelated to editor and front end styles, CSS-specific issues.
    on Jun 30, 2021
  5. JustinyAhin commented on Jul 6, 2021

    @JustinyAhin
    Member

    I think some styling can be applied to the block-editor-media-replace-flow__image-url-label element. Maybe adding a margin-left to it. `margin-left: 2em;" seems to align the text correctly with the image link; but it is overflows a bit on the edit button.

    CleanShot 2021-07-06 at 12 22 21@2x

    We could increase also the popover width.

  6. getdave commented on Jul 9, 2021

    @getdave
    Contributor

    @JustinyAhin Thanks for your suggestion above. I think we can solve this relatively easily by removing some of the previous CSS rules that are no longer needed in this context thanks to the new rules in the base <LinkControl> component itself.

    Let me know if #33326 works for you

    You can test it using the following workflow https://make.wordpress.org/design/2021/03/03/testing-a-gutenberg-pull-request-pr/

  7. JustinyAhin commented on Jul 12, 2021

    @JustinyAhin
    Member

    Let me know if #33326 works for you

    @getdave it works as expected. I've added a comment on the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

CSS StylingRelated to editor and front end styles, CSS-specific issues.[Block] ImageAffects the Image Block[Feature] Link EditingLink components (LinkControl, URLInput) and integrations (RichText link formatting)[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions