-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 Block: Logo #1851
Comments
How would we go about adjusting the size of the logo? |
In this instance, the theme sets the size, I think having it kept to that size makes sense. At least it should be the first version and then perhaps testing will show if it needs to change. This isn't placing an image, it's the site logo. |
@mtias Note that Also, an endpoint for updating the On the other hand, if the block is just going to be read-only, then really this can be implemented using server-side rendering of a block (#780), re-using a block's PHP rendering logic. |
@westonruter we can start with just display, and then add the necessary pieces for updating the data as well. We'll need a coherent system for specifying attributes that map to options, fields, user meta, etc, etc. |
@karmatosed Rather than showing the logo in the Inspector with instructions for editing, I think we can rely on having an "edit" icon when the block itself is selected, similar to the image block. Like the image block, we might also want to include a link option: |
Should not the block interface actually be identical to the image block in general? The key difference would be in the attribute storage, where the selected image is stored globally in the theme mod as opposed locally in the content. In that way, it should probably get the styling treatment as lifted/external/global blocks: #1516. |
There is no way Page "template" style and design will match rest of theme, be it custom theme or from repository. |
I think this as a block is very fitting for future vision. Maybe these should have been called modules rather than blocks? :P Some of us theme developers are looking at Gutenberg beyond just a page/post editor - we are looking at the possibility of creating sections/panels for global assignments into places like the header.php, footer.php and even sidebar.php We are looking at the possibility of pulling in things like the menu, an entire sidebar/widget area and not just an individual widget to build out these global sections/panels - so the blocks that can be brought in by core the better as it will save themes/plugins having to hack them in! |
Hey @WPDevHQ! That's the long-term goal, just going to take a couple iterations to get there :) |
As the project moves towards merge proposal, we are moving issues that aren't needed for that to projects. This doesn't mean they won't get done, they totally can and that's why we're moving to projects. This allows us to focus on the issues that have to happen to Gutenberg. I am closing this but it will live in projects. |
This is starting to be explored by @pablinos |
Thanks @karmatosed! The idea of this block came up during some discussions about full site editing. We were wondering what the future looks like for the logo theme option, and what would make this different from some kind of reusable image block? The main advantage would seem to be backwards compatibility with themes, but would it be worthwhile to fallback to another mechanism for themes (now or in the future) that don't have support for logos? Also, until we have the concept of a page header that we can add blocks to, how useful is this block? I can see circumstances where someone might want to include their logo in a sidebar or main post content, so maybe that's enough reason to build it. |
The logo set in theme can also be treated as a site-wide logo, setting site app icon, favicon, etc. |
Instead of a dedicated logo block, should the
The logo is so often used as well as the title or in place of it, so this feels like a logical evolution. |
@nickcernis: Though logo and site title are separate in traditional WordPress themes. |
This has been brought up before, that they should be in the same block, but you then end up with the need to add more alignment settings etc. Another option is to have separate |
This sounds good. I like that it avoids the need to have “show title above/below logo” controls. We should probably favour drag-and-drop placement over placement controls where we can. |
What can I use right now? |
This is the logo block PR #18811 - It's currently held up by a couple of problems with getting options from the API when you're not an admin. You might want to try rebasing that and installing it as a block. You could always use an image of course! |
We could still merge this and have it working like the other blocks in FSE... |
Agreed, I don't think the admin circumstance should be a blocker. @epiqueras curious what you think of this block? I am not entirely sure if the logo is automatically being used for other purposes (favicon, mobile icon, etc). |
Yeah, that's my question, too, because it seems much more straightforward to just put a regular Image block in your header template part. I don't see much point in a dedicated Site Logo block, especially if it's read-only. |
My guess is that Site Logo Block would be associated with the customizer. If one adds a site logo through Site Identity it would also automatically be added to the Site Logo block. That makes it different from a regular Image Block. |
I’d expect a Logo block to be different from a normal Image block in at least a few ways:
(It’s also possible I’m not understanding the discussion above. Feel free to ignore me if this is going off topic.) |
Shouldn't the favicon be handled in a site setting somewhere? Most of the time the logo is a different asset than the favicon right? |
@epiqueras: Right, but for full site editing, all site features should be somehow modeled as Gutenberg blocks? |
Only the ones that you would use in the front end. The asset used for the favicon is probably different from the one used by a template's header, for example. |
@epiqueras: The favicon/app icon can also be much more nuanced, with different icons (art direction) and postprocessing (background, margins, shadows) and app colors, see https://wordpress.org/plugins/favicon-by-realfavicongenerator/. |
Yeah, that's more reason just to use a regular image block, right? |
Just a friendly reminder..:) |
This block has been merged, so I think we can close this issue. |
Closing issue. |
@scruffian, @paaljoachim: It would be great to have a new Gutenberg release so I can use the Logo block in production! 🐱 |
It'd be nice to have a block that just renders the custom logo as registered with
add_theme_support
.The text was updated successfully, but these errors were encountered: