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

Home Link block: add more shapes & allow inserting anywhere #49282

Open
annezazu opened this issue Mar 22, 2023 · 4 comments
Open

Home Link block: add more shapes & allow inserting anywhere #49282

annezazu opened this issue Mar 22, 2023 · 4 comments
Labels
[Block] Home Link Affects the Home Link Block Needs Design Needs design efforts. [Type] Enhancement A suggestion for improvement.

Comments

@annezazu
Copy link
Contributor

We should add some shapes to home link block (circle, dot, square, triangle) and allow inserting anywhere (outside nav menu). It's a highly convenient way of linking to the home if you don't want to use the site title name. Here's a video demonstrating current limitations (lack of shapes and inability to insert elsewhere):

home.link.mov

Pulled from: #48443

@annezazu annezazu added [Type] Enhancement A suggestion for improvement. Needs Design Needs design efforts. [Block] Home Link Affects the Home Link Block labels Mar 22, 2023
@richtabor
Copy link
Member

A shape block in general may be fun.

@carolinan
Copy link
Contributor

I found that to insert the block anywhere there needs to be a way to detect, in PHP, if the block is inside the navigation block or not. There is no built in way to do this currently.
This is because the default wrapping element is an <li> which should not be used when the block is placed elsewhere.

@ntsekouras
Copy link
Contributor

Navigation block seems to provides/adds lot of context. Maybe we could use this info to determine if it's inside a Navigation block? 🤔 .

From some super quick testing(removing the "parent": [ "core/navigation" ], the Home Link's block context was empty when outside the Navigation block and full when inside. If we could make sure that when inside Navigation a specific context property is always added, we could update the returned html. --cc @getdave

@getdave
Copy link
Contributor

getdave commented Jan 15, 2024

We should have block context coming from Navigation if it's a child of Navigation. So it should be possible. We probably do something similar for Page List.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Home Link Affects the Home Link Block Needs Design Needs design efforts. [Type] Enhancement A suggestion for improvement.
Projects
Status: Needs design, or refresh
Status: 🎨 Needs design
Development

No branches or pull requests

5 participants