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 the ability to add a link to the logo block #56820

Open
Sam-Xronn opened this issue Dec 6, 2023 · 13 comments
Open

Add the ability to add a link to the logo block #56820

Sam-Xronn opened this issue Dec 6, 2023 · 13 comments
Labels
[Block] Site Logo Affects the Site Logo Block [Type] Enhancement A suggestion for improvement.

Comments

@Sam-Xronn
Copy link
Contributor

What problem does this address?

It's currently not possible to link the site logo anywhere other than homepage. If you build a website on a sub-domain e.g. blog.site-name.com it's not possible to link back to the parent website. This renders the logo block useless and instead requires an image block which won't add favicon support.

What is your proposed solution?

Add the ability to add a free text URL link to the site logo block if the "Link image to home" toggle is not enabled.

@Sam-Xronn Sam-Xronn added the [Type] Enhancement A suggestion for improvement. label Dec 6, 2023
@skorasaurus skorasaurus added the [Block] Site Logo Affects the Site Logo Block label Dec 6, 2023
@richtabor
Copy link
Member

Perhaps, though my hesitation is that this makes it confusing for most users — even if the URL control is only added when the link toggle is disabled.

This renders the logo block useless and instead requires an image block which won't add favicon support.

Why not add your site icon (i.e. favicon) then replace the site logo block with an image/link of your choice?

@Sam-Xronn
Copy link
Contributor Author

Sam-Xronn commented Dec 7, 2023

Perhaps, though my hesitation is that this makes it confusing for most users — even if the URL control is only added when the link toggle is disabled.

This renders the logo block useless and instead requires an image block which won't add favicon support.

Why not add your site icon (i.e. favicon) then replace the site logo block with an image/link of your choice?

I would say the link to homepage toggle has been used as a quick fix. As far as I’m aware this format isn’t consistent with any other blocks. We already have an excellent linking system which supports internal and external links. These are also used on image blocks. I’m not sure why this wouldn’t be added to the logo block.

You have correctly identified a temporary solution for this issue but I don’t believe that should be the recommend approach.

@Sam-Xronn Sam-Xronn reopened this Dec 7, 2023
@richtabor
Copy link
Member

I’m not sure why this wouldn’t be added to the logo block.

Because site logos link to the homepage on nearly every website. :)

@Sam-Xronn
Copy link
Contributor Author

I’m not sure why this wouldn’t be added to the logo block.

Because site logos link to the homepage on nearly every website. :)

That’s an easy perspective to have now WordPress has fully fledged page builder. But WordPress (the blogging platform) has also commonly be used for micro sites. Such as blogs, events, job boards, recipe sites, small WooCommerce sites, running on sub-domains.

I do agree with your point I just don’t know why you would purposely limit functionality, and not follow an already established design pattern.

Would be interested to hear alternative perspectives on this topic.

@richtabor
Copy link
Member

Just to be clear, I'm not entirely opposed to this—I'm just keeping in mind the additional complexity it introduces by showing/hiding an alternate control for the link.

There's weight to consider if the majority of users would not necessarily benefit from an additional control, or feature.

Would be interested to hear alternative perspectives on this topic.

Agreed! @WordPress/gutenberg-design thoughts?

@paaljoachim
Copy link
Contributor

paaljoachim commented Dec 8, 2023

Brainstorming...

The current Site Logo controls are very constrained compared to other blocks.
We look at the purpose of each block and compare with other blocks and the purpose these have. Then look at controls of one block and how another similar block is handled. We work on adding consistency between blocks where it is natural to do so.

We can compare the Image block and the Site Logo block. Look at controls of the Image block in comparison with the Site Logo block.

Image block has a much wider toolbar compared to the Site Logo block. The Site Logo is usually fairly small and having a smaller toolbar helps because of the small space it is in. But should it have a Replace button, an alignment option and a link option added to the toolbar?
Adding a Replace button keeping the consistency with the Image block. Right away adding the word/button Replace would make the toolbar much wider.
Adding an Alignment icon. Would be by default not be selected (as in off). User would be able to align it left, center or right.
Adding a link option to where the default link goes to home but can be adjusted by the user.


Now in the Site Logo block. There is a toggle "Link image to home" Toggling this off could add a field to where one can add a custom link or leave blank for no link.

Screenshot 2023-12-08 at 09 12 31

Toggling image to not link to home could add the option to link to another location.

Site Logo custom link

Not filling in a custom link would then not link the Site Logo to go anywhere.


Btw Rich @richtabor
Use as site icon toggle option. The link "Site Icon settings" opens the customizer in a new tab. Here one can add the open in new window icon beside the link to show the user that the link opens in a new tab/window.

@jasmussen
Copy link
Contributor

I'll echo Rich, that having the site logo's link be defined by the values set in Reading Settings in WordPress is likely going to be the most predictable user experience, and avoid complexity.

Though I want to also say, we could come back to this at a later time, for example once reading settings get revisited. That might be a better place to explore a holistic solution to this. Because keep in mind, there's not just the site logo block, there's also a "Home Link" in the navigation block. So changing what is defined as a "homepage" is risky to do on a per-block basis, it can easily get out of sync and confusing.

In the mean time, I'd echo the idea that an image with an aspect ratio applied can be a good solution, just like a custom "Home" link in navigation would.

@jameskoster
Copy link
Contributor

I wonder if the Image block could entertain refs in the future. So you could tell an Image block to use the site logo, similar to how the Cover block can reference the featured image.

@Sam-Xronn
Copy link
Contributor Author

I wonder if the Image block could entertain refs in the future. So you could tell an Image block to use the site logo, similar to how the Cover block can reference the featured image.

Personally I see a lot of value in keeping the logo block separate. It adds a lot of future-proofing, knowing you can use this to return the site logo.

I’d also say as much as I’d like the logo to support a custom link I think it’s important to keep the UX as familiar as possible. I’m not sure an additional input field for the link based on the toggle status is correct.

Personally I’d have the logo block by default always link to the site homepage. But add the link to the logo block toolbar so it can be changed or completely removed if required.

@jameskoster
Copy link
Contributor

Personally I see a lot of value in keeping the logo block separate

I meant in addition to, not instead of :)

@Sam-Xronn
Copy link
Contributor Author

I would like to just update this thread to mention that its not possible to include an image inside the navigation block. The impact of this decision means that you can't display the logo (image) on the mobile menu overlay without custom code.

Regardless of the discussion surrounding if you should be able to add a custom link to the site logo the proposed intermediary solution isn't viable.

@Sam-Xronn
Copy link
Contributor Author

I'd just like to update this thread to keep it maintained with WordPress releases.

The Site logo still offers a site icon option which is now covered under Settings > General. Potentially making this option redundant.

I'd also note using an Image instead of the site logo means the image doesn't render on the mobile menu, meaning you have no logo when the mobile menu is open/active.

@richtabor
Copy link
Member

The Site logo still offers a site icon option which is now covered under Settings > General. Potentially making this option redundant.

It's the same option that powers both. If you change the site logo in general settings, it is reflected in the site logo block (and vise-versa).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Site Logo Affects the Site Logo Block [Type] Enhancement A suggestion for improvement.
6 participants