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: Add Color and Radius support to Home Link Navigation element #66901

Open
yogeshbhutkar opened this issue Nov 11, 2024 · 4 comments · May be fixed by #66902
Open

Home Link: Add Color and Radius support to Home Link Navigation element #66901

yogeshbhutkar opened this issue Nov 11, 2024 · 4 comments · May be fixed by #66902
Labels
[Block] Home Link Affects the Home Link Block [Type] Enhancement A suggestion for improvement.

Comments

@yogeshbhutkar
Copy link
Contributor

What problem does this address?

The Home Link block currently lacks customization options for Color and Radius properties, limiting users' ability to style it according to their specific design requirements. Without these properties, achieving custom designs – such as those matching the provided reference image – is only possible through Custom CSS implementation. This limitation reduces the block's flexibility and forces users to rely on additional code solutions.

Image

While potential workarounds exist, such as encapsulating the Home Link within a Group Block, this approach presents two significant challenges. First, the Home Link Block does not support adding Group as a parent container, as specified in its block.json configuration, which strictly limits the parent element to core/navigation. Second, implementing Group blocks introduces additional DOM elements, potentially impacting performance in resource-intensive scenarios.

What is your proposed solution?

We can add Color and Radius support to the Home Link block to customize it further and let the users adjust the Home Link component according to their needs.

@yogeshbhutkar yogeshbhutkar added the [Type] Enhancement A suggestion for improvement. label Nov 11, 2024
@yogeshbhutkar yogeshbhutkar linked a pull request Nov 11, 2024 that will close this issue
@yogeshbhutkar
Copy link
Contributor Author

@t-hamano would love to hear your thoughts on this.

@carolinan carolinan added the [Block] Home Link Affects the Home Link Block label Nov 11, 2024
@carolinan
Copy link
Contributor

I understand the use case of styling the home link differently from other links in the navigation block.
But editing wise, it is not a great experience if only one navigation menu item has these options.

@carolinan
Copy link
Contributor

This is the corresponding PR for the navigation link block: #66483
Except it doesn't add the colors.

This is the corresponding PR for the submenu #68455
Except it doesn't add the colors.

The page list has both text, background, and link color options, but it is for the whole list: Not the individual menu items.

@yogeshbhutkar
Copy link
Contributor Author

I wonder if the colors should also apply to submenu items, given that the labels submenu & overlay text and submenu & overlay background suggest they affect both. At the very least, the labels should be clarified for better clarity—or maybe it’s just me who finds them a bit unclear.

Regardless, having the ability to style sub-menu items and the home link separately with different color options could be a useful feature in the future.
Image

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

Successfully merging a pull request may close this issue.

2 participants