-
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
Fix empty gray circle when site has no logo on template list page #37474
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 tasks
talldan
added
[Feature] Site Editor
Related to the overarching Site Editor (formerly "full site editing")
[Type] Bug
An existing feature does not function as intended
Backport to WP 6.7 Beta/RC
Pull request that needs to be backported to the WordPress major release that's currently in beta
labels
Dec 17, 2021
Size Change: +376 B (0%) Total Size: 1.13 MB
ℹ️ View Unchanged
|
talldan
changed the title
Fix empty gray circle when site has no logo on template list page
WIP: Fix empty gray circle when site has no logo on template list page
Dec 17, 2021
talldan
changed the title
WIP: Fix empty gray circle when site has no logo on template list page
Fix empty gray circle when site has no logo on template list page
Dec 17, 2021
I followed the testing instructions and the globe icon is showing correctly. Of course, the conflict has to be solved too. |
Fix handling of unresolved site Use globe icon Enforce single child for tooltip by using ternary
talldan
force-pushed
the
fix/empty-grey-circle
branch
from
January 14, 2022 05:27
ca282bb
to
3ecb8f4
Compare
talldan
added
Backport to WP Minor Release
Pull request that needs to be backported to a WordPress minor release
and removed
Backport to WP 6.7 Beta/RC
Pull request that needs to be backported to the WordPress major release that's currently in beta
labels
Jan 14, 2022
talldan
requested review from
Mamaduka,
Aljullu and
kevin940726
and removed request for
Mamaduka
January 14, 2022 06:25
Mamaduka
approved these changes
Jan 14, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It works as expected. Thanks, @talldan.
Cherry-picked for the minor. |
Mamaduka
removed
the
Backport to WP Minor Release
Pull request that needs to be backported to a WordPress minor release
label
Feb 16, 2022
Mamaduka
pushed a commit
that referenced
this pull request
Feb 16, 2022
…7474) * Refactor and show icon in place of missing site logo Fix handling of unresolved site Use globe icon Enforce single child for tooltip by using ternary * Fix handling of missing avatar
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[Feature] Site Editor
Related to the overarching Site Editor (formerly "full site editing")
[Type] Bug
An existing feature does not function as intended
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes #37086
Usually the template list page will show the author details for a custom template, but for older versions of WordPress/Gutenberg some templates may have been created before templates had author support.
In those cases there's a fallback to displaying the site logo and name. But if the user doesn't have a site logo set, then we need a fallback for the fallback, which would be to show an icon (the Globe icon).
How has this been tested?
This is a little hard to test, because you need to create a template or template part using an old version of WordPress and Gutenberg, and then update.
I found it easier to add a little hack into the code to test it:
AddedBy
component, after the early return add the following -template.author = undefined;
Screenshots
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist:
*.native.js
files for terms that need renaming or removal).