-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Update Site Icon block to better align with rest of core #59382
Comments
Good idea! I think it'll likely need a check for which WP core version is running, though, as Gutenberg can be running on core versions < 6.5, so I imagine we'll need to have a check in place until the required version is at least 6.5. Does anyone know the right way to check for a WP core version in Gutenberg JS?
I've put up a PR for this over in #59383 |
It's possible to add the WP Version to editor settings I suppose. We could have a hook with a condition similar to this one:
The only hesitation I would have is that the version might be used too much, thereby creating maintenance burden. cc @WordPress/gutenberg-core for opinions |
We may also be able to define it as follows using the is_wp_version_compatible() function. function gutenberg_get_block_editor_settings( $settings ) {
// ...
$settings['hasDashboardSiteIconSetting'] = is_wp_version_compatible( '6.5' );
return $settings;
}
add_filter( 'block_editor_settings_all', 'gutenberg_get_block_editor_settings', 0 ); |
The settings are public API; once introduced, we have to keep them around for backward compatibility even after the minimum supported version is WP 6.5. |
So maybe something generic like the WP version number? Still, that could invite a lot of crud conditional code in the codebase 🤔 Maybe it's not so bad to just keep the link to the customizer |
Instead of linking to the settings page I think we should remove the site icon option completely from the site logo block. |
That partially defeats the purpose of adding the setting to the general options page. For block themes, the customizer is a dead end. This is the one link from inside the block editor that many people will find. They can end up on that screen that is very different from the rest of their WordPress experience. As shaunandrews noted on trac "Involving the customizer as a solution is temporary"
I think that's worth considering, but to me it's a bit late in the 6.5 cycle to be making that decision. Perhaps a separate issue should be opened to discuss that? @andrewserong Thank you for getting the first part in. What needs to be done to ensure #59383 is included in the next package sync to core? |
I think it's quite important to keep the site icon option in the block. Not every site uses a different icon/logo, and it'd be quite unexpected to remove functionality that's been in for a number of releases. And we have to consider discoverability. |
Apologies, I forgot to add the |
A handful of ideas for solving this if the suggestion from @t-hamano isn't acceptable.
|
@WordPress/gutenberg-core Which of the above options sound best to y'all? Or do you have an alternative? I want to make sure this is completed before RC1. |
One other potential idea, is to add another I should have a little bit of time today, so I'll see if I can get a proof of concept PR up for that idea. |
I have a PR up with the idea of adding a I might not have time to iterate on that PR, so if anyone feels strongly about taking a different approach, feel free to close that one out! |
That sounds like a good approach to me. Thanks for looking @andrewserong |
Description
This is a follow-up to #35892, #30406 and https://core.trac.wordpress.org/ticket/54370. Two things discovered:
/wp-admin/customize.php?autofocus[section]=title_tagline
in https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/site-logo/edit.js#L281 . As the Site Icon can now be edited on the general setting screen, that should be linked instead.Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: