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

Navigation Block: Add social link singular to list of blocks to be allowed #46374

Merged
merged 1 commit into from
Dec 7, 2022

Conversation

getdave
Copy link
Contributor

@getdave getdave commented Dec 7, 2022

What?

Fixes #46371 by allowing singular Social Link block within the Social Links block.

This bug was introduced by #46279.

Why?

Singular social links blocks should be allowed in a social links plural block.

How?

Add to whitelist.

Testing Instructions

Add Nav block. Add social links block. Add one or more social link (singular) blocks.

Check no errors on front end as reported on Issue #46371.

Testing Instructions for Keyboard

Screenshots or screencast

@getdave getdave self-assigned this Dec 7, 2022
@getdave getdave added [Type] Regression Related to a regression in the latest release [Block] Navigation Affects the Navigation Block labels Dec 7, 2022
@getdave
Copy link
Contributor Author

getdave commented Dec 7, 2022

Once this fix is out I will write Unit tests to provide full coverage.

@getdave
Copy link
Contributor Author

getdave commented Dec 7, 2022

Also note this doesn't solve the root cause which was that whilst social-link was being filtered out as an inner block of social-links this was causing an error. Surely this should be allowed to be an empty array!?

Copy link
Contributor

@ajlende ajlende left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@ajlende ajlende merged commit 394590b into trunk Dec 7, 2022
@ajlende ajlende deleted the fix/nav-block-filter-inner-blocks branch December 7, 2022 21:09
@github-actions github-actions bot added this to the Gutenberg 14.8 milestone Dec 7, 2022
ajlende pushed a commit that referenced this pull request Dec 7, 2022
scruffian pushed a commit that referenced this pull request Dec 8, 2022
* Revert "Handle innerContent too when removing innerBlocks (#46377)"

This reverts commit 181b383.

* Revert "Add social link singular to list of blocks to be allowed (#46374)"

This reverts commit 394590b.

* Revert "Recursively remove Navigation block’s from appearing inside Navigation block on front of site (#46279)"

This reverts commit afc8b42.

* Refactor ul code for readability

* Refactor li wrapper conditional

* Prevent rendering nav refs that have already been seen

* Fix PHP lint
@ryanwelcher ryanwelcher changed the title Add social link singular to list of blocks to be allowed Navigation Block: Add social link singular to list of blocks to be allowed Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block [Type] Regression Related to a regression in the latest release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Navigation: Social Icons block doesn't work in the navigation block
2 participants