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

solved social icon alignment issue on front end #40226

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

theminaldiwan
Copy link
Contributor

This is occur when we wrap social icon block inside group block and changing social icon alignment from left or right
and applying background color using float:none property we solved this issue.

This pull request fixes a bug in which social icon alignment with full wrap background color as mentioned in #40131.

@github-actions
Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @theminaldiwan! 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 Apr 11, 2022
@amustaque97 amustaque97 self-requested a review April 12, 2022 23:16
@amustaque97
Copy link
Member

Hi @theminaldiwan, thank you for taking up #40131. In my machine, changes are not working. I would request you to please verify your changes once?

Also, I would like to request @jasmussen to review this PR once we get a reply from the author. 😄

@jasmussen
Copy link
Contributor

Thank you for the PR and thank you for the ping!

To better visualize the bug meant to be fixed, if you align left a social icons block inside a group, the act of it floating means the group no longer wraps the content:
before

This is a bit of a classic web-design problem, and is usually addressed by either applying overflow: hidden; to the parent container, or by unsetting the floating as this PR does.

However it is also the intended behavior of CSS and floats, and I'm reluctant to land this PR as is, because of that. Float behaviors are intrinsically a bit confusing, but I would think it more important to apply an align-left property inside a group block, and then not have any effect from it, despite the button being toggled. For example in this case, the social links block is aligned left, and text flows around it as it does with floats naturally. This use case would be broken with this PR:
Screenshot 2022-04-18 at 08 54 48

I searched but was unable to find it, I'm fairly sure that a ticket exists which suggests adding a toggle to the advanced section of the Group block to essentially apply overflow: hidden;. That seems like it might be a better solution. @paaljoachim do you recall such a ticket?

@paaljoachim
Copy link
Contributor

I am also not able to locate the issue related to adding a toggle in the advanced section of the Group block.
I know there has earlier been some discussions around floats, but do not recall how that landed.
I would suggest bringing up this PR in the Open Floor portion of the next Core Editor Meeting. As there seems to be a few aspects that will need to be discussed. Thanks!

@skorasaurus skorasaurus added the [Block] Social Affects the Social Block - used to display Social Media accounts label Aug 12, 2022
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants