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

Add SocialLinks block to the Navigation block #25016

Closed
draganescu opened this issue Sep 2, 2020 · 10 comments
Closed

Add SocialLinks block to the Navigation block #25016

draganescu opened this issue Sep 2, 2020 · 10 comments
Assignees
Labels
Good First Issue An issue that's suitable for someone looking to contribute for the first time Needs Dev Ready for, and needs developer efforts

Comments

@draganescu
Copy link
Contributor

Description

Part of #24875

We should add the ability to place a SocialLinks block to a navigation block. Currently we can add a search block.

@talldan talldan added Good First Issue An issue that's suitable for someone looking to contribute for the first time Needs Dev Ready for, and needs developer efforts labels Sep 9, 2020
@talldan
Copy link
Contributor

talldan commented Sep 9, 2020

A first step for anyone interested in pick this up would be to update the allowedBlocks for the navigation block:

allowedBlocks={ [
'core/navigation-link',
'core/search',
] }

There may also be styling issues when social links is rendered in Navigation, but that can always be addressed in a separate PR.

@jordesign
Copy link
Contributor

I'm happy to jump in and get my feet wet with this one.

@talldan
Copy link
Contributor

talldan commented Sep 10, 2020

That'd be great, thanks @jordesign!

@jordesign
Copy link
Contributor

Allowing the nav block works well enough 👍

I'm wondering if we need to worry/think about the fact the alignment controls for the Social Links block don't make much sense in the context of a Nav Block?

At the moment you can set an alignment on the Social Icons which breaks the layout in the editor.

Screen Shot 2020-09-13 at 3 28 06 pm

This doesn't seem to impact things on the front-end (testing with TwentyTwenty) but it seems it needs to be a nicer experience in the editor?

@shaunandrews
Copy link
Contributor

Is it possible to hide the alignment options when the Social Links block is place within the Navigation block?

@jordesign
Copy link
Contributor

@shaunandrews That's essentially what I was thinking too. I'm not sure of the answer though 😂.

@draganescu
Copy link
Contributor Author

@jordesign I assigned this to you. Be sure to mention the issue when you open a PR with your work above thank you 🙏

@talldan
Copy link
Contributor

talldan commented Sep 16, 2020

@jordesign That's an interesting one. I don't think there's a good way to achieve this at the moment.

The problem you've outlined is a bit higher level than this issue, and probably needs some discussion and potentially a new API for blocks. I think it'd be good to create your PR as is, and move the discussion on this on problem to a separate issue.

@jordesign
Copy link
Contributor

PR is added ^

Will open a new issue regarding controlling whether alignment tools show when the block is inserted.

@draganescu
Copy link
Contributor Author

Closed by #25357

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Issue An issue that's suitable for someone looking to contribute for the first time Needs Dev Ready for, and needs developer efforts
Projects
None yet
Development

No branches or pull requests

4 participants