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

Social Icon: Add variation placeholder state #59190

Open
Mamaduka opened this issue Feb 20, 2024 · 5 comments
Open

Social Icon: Add variation placeholder state #59190

Mamaduka opened this issue Feb 20, 2024 · 5 comments
Labels
[Block] Social Affects the Social Block - used to display Social Media accounts Needs Design Needs design efforts. [Type] Enhancement A suggestion for improvement.

Comments

@Mamaduka
Copy link
Member

Based on the discussion at #59162 (comment).

A proposal to introduce a placeholder state for the Social Icon/Link block when no variation is selected - the service attribute is undefined. Currently, it defaults to a Link (chain) variation.

The placeholder will let the user choose the block variation.

Why?

This will allow the editor to programmatically insert the block without variation and let the user pick the desired one.

Screenshot

A group block placeholder.

CleanShot 2024-02-20 at 08 32 09

@Mamaduka Mamaduka added [Type] Enhancement A suggestion for improvement. Needs Design Needs design efforts. [Block] Social Affects the Social Block - used to display Social Media accounts labels Feb 20, 2024
@Mamaduka
Copy link
Member Author

Mamaduka commented Feb 21, 2024

An alternative solution could be opening the main inserter for blocks that have a single child with many variations. You can see a dome here - #29490 (comment).

The approach could also resolve #46753.

@jasmussen and @richtabor, I would appreciate your input here.

@jasmussen
Copy link
Contributor

Thanks for the issue, thanks for the ping!

I would avoid the big white/black-bordered placeholder pattern. The problem with that one is it doesn't scale well to narrow contexts, like if you're inserting social links into a Navigation block. It also causes layout shifts — the row of icons will nearly always be smaller than this setup state.

I quite liked what Rich did here:

social.mp4

If we went that direction, I even think we could move towards a place where Social Links wasn't a container block with individual icons inside, but just a single block with multiple icon transforms. This would vastly simplify inserting social links in other contexts, including the navigtion block. What do you think?

@Mamaduka
Copy link
Member Author

I used the Group placeholder as rough example. A small + button will be more suitable here.

What do you think an alternative approach I shared in the latest comment - #59190 (comment)?

@jasmussen
Copy link
Contributor

What do you think an alternative approach I shared in the latest comment - #59190 (comment)?

This still requires a social links container, no? I'd love to find a pattern that would let us have a single "Social Link" block that could hold the full interface, so that it would work in any context. That's not to say the container couldn't remain there, it's useful to style colors across — just that mostly abstracting it away seems like it would help the majority of pattern and building cases.

@Mamaduka
Copy link
Member Author

@jasmussen, let's start with the ideas you and Rich provided in #56259. I have a feeling after it's implemented, we can also close this issue.

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 Needs Design Needs design efforts. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

2 participants