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

Improve Styles for Social Icons list placeholders #56887

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

colinduwe
Copy link
Contributor

What?

Improves the appearance of the placeholders shown on the Social Icons list block.

Why?

#55296
The squares for the placeholders don't completely represent how the block will look once a user add actual social icons to the container block.

How?

A few minor style updates.

Testing Instructions

Insert a new Social Icons block. Remove focus from the block and observe that the placeholders have the correct gap between them.
You can also apply the the logos only and pill shape block style variations and the placeholders will appare the same size and shape as actual inner blocks.

Note that setting the icon color will not change the colors of the placeholders.

Testing Instructions for Keyboard

Screenshots or screencast

Copy link

github-actions bot commented Dec 8, 2023

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @colinduwe! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Dec 8, 2023
@skorasaurus skorasaurus added the [Block] Social Affects the Social Block - used to display Social Media accounts label Dec 8, 2023
@apeatling
Copy link
Contributor

Can you provide a before/after image so it's clear we're looking at the right thing? Thanks.

@apeatling apeatling added the [Type] Enhancement A suggestion for improvement. label Dec 8, 2023
@colinduwe
Copy link
Contributor Author

Sure thing. First is the initial state of the placeholder. Note that there is no gap between placeholder items:
Screenshot 2023-12-08 at 3 24 35 PM
With this patch they use the theme.json gap:
Screenshot 2023-12-08 at 3 31 02 PM
Currently if you choose the "icons only" style variation there is no gap and the placeholders are too small:
Screenshot 2023-12-08 at 3 24 55 PM
Now they are the spaced and correct size:
Screenshot 2023-12-08 at 3 33 22 PM
Similar if we choose the pill style:
Screenshot 2023-12-08 at 3 25 10 PM
Corrected in this PR:
Screenshot 2023-12-08 at 3 34 46 PM
If you set a background color:
Screenshot 2023-12-08 at 3 25 54 PM
Now it is the correct color
Screenshot 2023-12-08 at 3 36 23 PM
Finally, if you choose icon only and set an icon color
Screenshot 2023-12-08 at 3 26 14 PM
Now it takes the icon color
Screenshot 2023-12-08 at 3 38 56 PM
Note that if you use the default or pill styles and set an icon color and a background color it displays the background color for the placeholders. Only if you choose the icon only style and set an icon color does the placeholder display in the icon color.

@colinduwe
Copy link
Contributor Author

I'll also note that because the placeholders are actually contained within a single list item in the social icons list container they do not respond to the block spacing controls. Let me know if you'd like me to pursue that as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Social Affects the Social Block - used to display Social Media accounts First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Type] Enhancement A suggestion for improvement.
3 participants