WordPress.org

Make WordPress Core

Opened 5 weeks ago

Last modified 8 days ago

#54370 new enhancement

Add an option to configure the site icon in general settings

Reported by: jameskoster Owned by:
Milestone: 6.0 Priority: normal
Severity: normal Version:
Component: General Keywords: needs-patch
Focuses: Cc:

Description

In WordPress 5.9 the Customizer is disabled when using a block theme (unless a plugin re-enables it).

Since the Customizer is currently the only place to set a site icon, this means that once 5.9 lands, if you are using a block theme there will be no way to manage your site icon option.

I propose adding a section to handle this in the General settings section of wp-admin.

Attachments (2)

Screenshot 2021-11-03 at 12.34.17.png (103.5 KB) - added by jameskoster 5 weeks ago.
Screen Shot 2021-11-08 at 19.02.44.png (123.7 KB) - added by andraganescu 4 weeks ago.
Current Customizer UI

Download all attachments as: .zip

Change History (31)

This ticket was mentioned in Slack in #core by johnbillion. View the logs.


5 weeks ago

#2 @audrasjb
5 weeks ago

Thanks for spotting this @jameskoster!

It sounds like we have two choices here: add this site icon option in any case or add it only when a block theme is used.

#3 @audrasjb
5 weeks ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 5.9

This ticket was mentioned in Slack in #core-editor by noisysocks. View the logs.


5 weeks ago

#5 @jameskoster
5 weeks ago

Seems fair to make the option available regardless? Otherwise it might be confusing if you want to update your site icon after switching from a block theme to a classic theme.

#6 @andraganescu
4 weeks ago

there will be no way to manage your site icon option.

In a block theme the we have the site logo block and from the template itself we can change other options. I find it weird that only the site icon is relegated to the options page. Isn't there any room for this to be managed in the site editor?

In the customizer there is some cropping/previewing happening once you select a site icon so this should be accounted for as well in tthe options page, the upload form element is not enough.

#8 @jameskoster
4 weeks ago

I find it weird that only the site icon is relegated to the options page. Isn't there any room for this to be managed in the site editor?

There is a PR (https://github.com/WordPress/gutenberg/pull/35892) to make it possible to set the Site Icon while working with the Site Logo block. But since the Site Icon doesn't appear on the site itself, a dedicated block would be inappropriate.

Therefore a dedicated site settings interface needs to exist in the Site Editor before we can think about making it possible to edit the Site Icon therein. I think we will need such an interface for managing home page settings and so on, but none of that has been designed yet.

#9 @andraganescu
4 weeks ago

  • Keywords 2nd-opinion needs-design-feedback added

Am I totally wrong in thinking the PR should be enough? For now block themes can only set site icon to be the same with site logo. That is really not so bad.

By adding a stop gap solution, IMO we just seem to create more cruft:

  • Will the site icon setting in settings remain for classic themes or would it only appear if there is a block theme active?
  • Either way it's not great that we're _adding_ things for temporary reasons.
  • If we add it, and it works for both classic and block themes, we'd have yet another thing which can be achieve in two places.
  • If we add it, and it works for block themes only, it will be confusing when a user saw it there and then it's gone.

Also what will happen to this setting once we do have the option to set it in the site editor? I assume it will remain and continue to set the site icon. But at that time we'd have three different implementations of code that sets the site icon: customizer (works only for classic themes), options page (works for both kinds of themes) and site editor settings page (works only for block themes). The setting itself however is shared across theme kinds, only the interface to set it wildly changes based on context.

So I say let's not add this setting to settings. It should have been added when it was coded in the customizer. Now however, seems to me we're just adding, as I said, cruft.

#10 @jameskoster
4 weeks ago

Am I totally wrong in thinking the PR should be enough? For now block themes can only set site icon to be the same with site logo. That is really not so bad.

If your block theme happens to utilise the Site Logo block then that PR will make the discrete flow for setting the site icon awkward at best. If no Site Logo block is present then the flow is almost entirely undiscoverable. I'd say that is quite bad.

I don't really see this as a temporary solution, unless you consider the entire wp-admin settings views to be temporary, which is another discussion altogether.

Also what will happen to this setting once we do have the option to set it in the site editor?

You can ask this question about all settings. What about the site name, tagline, etc? You can set those in the Site Editor, so should we remove them from Settings? I would say no, but acknowledge it is a bridge we're not ready to cross just yet. In the mean time we need to ensure that existing Customizer functionality (like setting the Site Icon) is at least moderately discoverable when that feature is disabled.

#11 @kjellr
4 weeks ago

It seems reasonable to me to place this here, next to the site title + tagline fields. We've traditionally displayed them alongside each other in the Customizer, and if I couldn't find a place for this control in the Site Editor UI, I think Settings > General is the first place I'd look.

#12 @shaunandrews
4 weeks ago

I agree with Jay; This wouldn't be temporary, nor would it be for block-based themes only.

Requiring people to edit a template (which is likely the only place a logo block would exist, if at all) seems unhelpful and not at all obvious.

#13 @shaunandrews
4 weeks ago

  • Keywords 2nd-opinion needs-design-feedback removed

@andraganescu
4 weeks ago

Current Customizer UI

#14 @andraganescu
4 weeks ago

Excellent then. If a site icon exists should we display the same UI that the Customizer has?

https://core.trac.wordpress.org/raw-attachment/ticket/54370/Screen%20Shot%202021-11-08%20at%2019.02.44.png

#15 @jameskoster
4 weeks ago

Yeah I think it makes sense to re-use as much as we can 👍

This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.


4 weeks ago

#17 @webcommsat
4 weeks ago

While there is further discussion on this ticket to achieve a great solution, adding a note for documentation/ marcomms awareness.
Customizer is often the place where less experienced site users update things like this. If it does not go into 5.9, it would be worth having easily accessible documentation / FAQ on what to do if you are using the block editor and want to add/ edit the site icon.

UPDATE with info from @poena that no one has built a way to re-enable it as yet with the block editor / global styles, that is why the change is needed. Re-adding the customizer menu item was reverted.

Last edited 4 weeks ago by webcommsat (previous) (diff)

This ticket was mentioned in Slack in #core by abhanonstopnews. View the logs.


4 weeks ago

#19 @mkaz
4 weeks ago

Thanks @webcommsat - I'm starting to track documentation and added it to the list here:
https://github.com/orgs/WordPress/projects/11/views/4

#20 @poena
4 weeks ago

Would it be enough, short term, to have link from this settings page to the customizer option?

This ticket was mentioned in Slack in #design by jameskoster. View the logs.


4 weeks ago

#22 @andraganescu
4 weeks ago

Investigated this a bit.

The Customizer has the site icon functionality as a control, but not a standalone one unfortunately: it is a special case of the cropped image control, which is itself a special case of the image control.

Reusing that implementation in the settings page is nearly impossible as we suffer from the "bananna -> gorilla holding the bananna -> entire jungle" problem. The UI is also wired to the customizer in terms of interactivity and CSS.

The settings admin section is quite lean. To replicate how setting the site icon behaves a new cropping and preview functionality should be added, which is a lot for one thing, which already exists in the Customizer for classic themes. I have not investigated thorroughly enough to see if there is some simple approach that I miss, but implementing a good UX will add quite a lot of stuff to the general settings part.

Therefore this ticket, IMO, is not just duplicating a feature, but instead a new implementation for a new context of this site icon feature. I believe that to make the most of it we should implement it keeping in mind how to turn this later in whatever Gutenberg will need for its settings panel, so maybe a REST site icon thing is good to have.

Given the above, this would be more worth it if - and I doubt it - these admin settings forms will not be later superseded by Site Editor settings panels and other related functionality. Otherwise it is a temporary solution in terms of usefulness, with potentially a lot of stuff required to be crammed in.

I agree with @jameskoster 's view that we should not remove settings because the site editor can set them. But to duplicate settings because the site editor can't set them yet is a different thing in my mind.

Last edited 4 weeks ago by andraganescu (previous) (diff)

#23 @jameskoster
4 weeks ago

But to duplicate settings because the site editor can't set them yet is a different thing in my mind.

The thing is, it isn't a duplication. When a block theme is active the Customizer is hidden, which means the only way to set the site icon is through an awkward flow in the Site Logo block.

This issue seeks to make it easy to manage the site icon when a block theme is active.

Apologies if this is a short-sighted suggestion, but wan we not use something like the Featured Image interface in the classic editor? That allowed you to upload, choose, and edit (crop) images all via the media library modal.

#24 @kjellr
4 weeks ago

I understand the technical reasons for not wanting to adding this in, but sending folks to the Customizer to edit this single setting is a really confusing user experience. I don't believe we can link directly to just this field in the Customizer, so when they land there, they're going to see two controls they've just navigated away from in the General settings UI (Site Title and Tagline).

Beyond that though, they'll end up in a totally different UI just to modify a single setting that's generally of minor importance. It seems like this would be the only entry-point to the Customizer that's still visible in the UI by default in 5.9, correct? It seems really weird to keep it around just for that.

Last edited 4 weeks ago by kjellr (previous) (diff)

#25 @shaunandrews
4 weeks ago

Given the above, this would be more worth it if - and I doubt it - these admin settings forms will not be later superseded by Site Editor settings panels and other related functionality. Otherwise it is a temporary solution in terms of usefulness, with potentially a lot of stuff required to be crammed in.

I don't understand why you think this would be temporary? I foresee the need to have a way to change a site's icon without having to use the visual site editor; Just like someone can edit a site's title or tagline without the need to use the site editor.

Involving the customizer as a solution is temporary. Creating a way to edit a site's icon _without_ the customizer or the site editor is the preferred solution for now, and the foreseeable future.

#26 @stacimc
3 weeks ago

Creating a way to edit a site's icon _without_ the customizer or the site editor is the preferred solution for now, and the foreseeable future.

I agree with @shaunandrews. The flow to set the Icon through the Site Logo block is not sufficient. The block only has an option to sync the Icon with the Logo. At the moment I have help text which links the user to the customizer (for now) to further edit the icon.

The logic to sync the logo and icon from the block is non-trivial, so if there's interest in moving that PR forward as part of this issue I'd love to get some more eyes on it: https://github.com/WordPress/gutenberg/pull/35892

That complexity is maybe another reason to +1 adding an option elsewhere/temporarily involving the customizer.

This ticket was mentioned in Slack in #core by audrasjb. View the logs.


8 days ago

#28 @audrasjb
8 days ago

  • Milestone changed from 5.9 to 6.0

Moving to milestone 6.0 as today is 5.9 beta 1.

This ticket was mentioned in Slack in #core by mkaz. View the logs.


8 days ago

Note: See TracTickets for help on using tickets.