Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Social Link block within patterns are left aligned on preview, but centered on live site #59084

Open
zaguiini opened this issue Dec 10, 2021 · 2 comments
Labels
[Block] Social Icons [Pri] Normal Schedule for the next available opportuinity. Triaged To be used when issues have been triaged. [Type] Bug When a feature is broken and / or not performing as intended

Comments

@zaguiini
Copy link
Contributor

zaguiini commented Dec 10, 2021

Quick summary

WPCOM block patterns that are using the Social Links block are displaying that specific block contents on the left inside the preview, while correctly displaying them centered on the live site.

This only happens on patterns that are not surrounded by a Group block.

Editor Live site
image image

Steps to reproduce

  1. Open FSE;
  2. Choose a pattern listed inside Link in Bio, or one that has centered social links;

Verify that the social icons are left-aligned in the editor. Verify that the icons are centered on the live site.

What you expected to happen

Social icons to be centered in the editor.

What actually happened

Social icons are to the left inside the editor.

Context

No response

Browser

Google Chrome/Chromium

Simple/Atomic

Simple

Other notes

No response

Reproducibility

Consistent

Severity

All

Available workarounds?

Yes, easy to implement

Workaround details

It looks like we're using older block attributes inside the patterns:

<!-- wp:social-links {"align":"center","className":"is-style-default"} -->
<ul class="wp-block-social-links aligncenter is-style-default"></ul>
<!-- /wp:social-links -->

And this is the current structure when you add a Social Links block to the page:

<!-- wp:social-links {"layout":{"type":"flex","justifyContent":"center"}} -->
<ul class="wp-block-social-links">
</ul>
<!-- /wp:social-links -->

Doing a quick search in the posts on the patterns blog, it looks like there are 18 instances of wp:social-links \{.*"align that need to be replaced.

What reinforces my thesis about the old signature is that we're not even recognizing the settings inside the block editor. It's just straight set to the left, including layout settings:

image

@zaguiini zaguiini added [Type] Bug When a feature is broken and / or not performing as intended Needs triage Ticket needs to be triaged labels Dec 10, 2021
@Addison-Stavlo
Copy link
Contributor

Tested this today and can repro.

An example that will show this is the "Center-aligned header with logo and social icons" pattern.

Screen Shot 2022-06-15 at 1 02 54 PM

cc @ianstewart

@zachspears zachspears added [Pri] Normal Schedule for the next available opportuinity. Triaged To be used when issues have been triaged. [Block] Social Icons and removed Needs triage Ticket needs to be triaged labels Jun 29, 2022
@zachspears
Copy link

I was also able to reproduce the issue. I have marked it triaged and normal priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Social Icons [Pri] Normal Schedule for the next available opportuinity. Triaged To be used when issues have been triaged. [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

No branches or pull requests

3 participants